@checksum-ai/runtime 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/checksumlib.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! For license information please see main.eb61fffc.js.LICENSE.txt */
2
- !function(){var e={603:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var r={queryParams:void 0},i=function(){return r.queryParams||(r.queryParams=Object.fromEntries(new URLSearchParams(window.location.search).entries())),r.queryParams}},6336:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var r=n(2982),i=n(5671),o=n(3144),a=n(573),s=n(199),u=new(function(){function e(){(0,i.Z)(this,e),this.weightsSum=0,this.config={attributes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},classes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},tagName:{decisionWeight:this.makeWeight(.6)},style:{inlineWeight:.6,computedWeight:.4,decisionWeight:this.makeWeight(.4)},innerText:{decisionWeight:this.makeWeight(.6),qualification:{exactMatchMax:20,containsMatchMax:10,maxLength:256,minLength:1},ignoreSimilarityScoreBelow:.6},innerFeatures:{decisionWeight:this.makeWeight(.8)},visualVicinity:{decisionWeight:this.makeWeight(.2)},structuralVicinity:{decisionWeight:this.makeWeight(.2)}}}return(0,o.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"get",value:function(){return this.config}},{key:"weight",value:function(e){return e/this.weightsSum}}]),e}()),c=function(){function e(t){var n=this;(0,i.Z)(this,e),this.targetElementESRAMetadata=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.unqualifiedClasses=[],this.qualifiedInnerText=void 0,this.visualVicinityComparable=[],this.structuralVicinityComparable=[],this.innerFeaturesComparable=[],this.rank=function(e){if(n.isDealBreaker(e))return{score:0,scores:{}};var t=n.tagSimilarity(e),r=n.attributesSimilarity(e),i=n.classSimilarity(e),o=n.styleSimilarity(e),a=n.innerTextSimilarity(e),s=n.innerFeaturesSimilarity(e),c=n.visualVicinitySimilarity(e),l=n.structuralVicinitySimilarity(e),d={tagScore:t,attributesScore:r,classesScore:i,styleScore:o,innerTextScore:a,innerFeaturesScore:s,visualVicinityScore:c,structuralVicinityScore:l,svgsScore:n.svgsSimilarity(e)},f={tagScore:u.weight(u.get().tagName.decisionWeight)*t,attributesScore:u.weight(u.get().attributes.decisionWeight)*r,classesScore:u.weight(u.get().classes.decisionWeight)*i,innerTextScore:u.weight(u.get().innerText.decisionWeight)*a,innerFeaturesScore:u.weight(u.get().innerFeatures.decisionWeight)*s,styleScore:u.weight(u.get().style.decisionWeight)*o,visualVicinityScore:u.weight(u.get().visualVicinity.decisionWeight)*c,structuralVicinityScore:u.weight(u.get().structuralVicinity.decisionWeight)*l};return{score:Object.values(f).reduce((function(e,t){return e+t}),0),scores:d}},this.targetElementESRAMetadata=t,this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}return(0,o.Z)(e,[{key:"getQualifiedAttributes",value:function(){return this.qualifiedAttributes}},{key:"getQualifiedClasses",value:function(){return this.qualifiedClasses}},{key:"getQualifiedInnerText",value:function(){return this.qualifiedInnerText}},{key:"setQualifiedAttributes",value:function(){var e=this.targetElementESRAMetadata.attributes,t=this.makeQualifiedAttributes(e),n=t.qualifiedAttributes,r=t.qualifiedAttributesMap;this.qualifiedAttributes=n,this.qualifiedAttributesMap=r}},{key:"makeQualifiedAttributes",value:function(e,t){var n=Object.keys(e).filter((function(n){if("input"===t)if("value"===n)return!1;var r=e[n];for(var i in r)i.endsWith("Uniqenuess")&&(r[i.replace("Uniqenuess","Uniqueness")]=r[i]);return r.globalUniqueness>u.get().attributes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.get().attributes.qualification.tagUniquenessThreshold})),r=n.reduce((function(t,n){return t[n]=e[n].value,t}),{});return{qualifiedAttributes:n,qualifiedAttributesMap:r}}},{key:"setQualifiedClasses",value:function(){var e=this;this.qualifiedClasses=this.makeQualifiedClasses(this.targetElementESRAMetadata.classes),this.unqualifiedClasses=Object.keys(this.targetElementESRAMetadata.classes).filter((function(t){return!e.qualifiedClasses.includes(t)}))}},{key:"isValidClass",value:function(e){return/^[A-Za-z_-][0-9A-Za-z_-]*$/.test(e)}},{key:"makeQualifiedClasses",value:function(e){var t=this;return Object.keys(e).filter((function(n){var r=e[n];return!!t.isValidClass(n)&&(!n.startsWith("jss")&&!n.startsWith("css-")&&":hover"!==n&&(r.globalUniqueness>u.get().classes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.get().classes.qualification.tagUniquenessThreshold))}))}},{key:"setQualifiedInnerText",value:function(){this.qualifiedInnerText=this.makeQualifiedInnerText(this.targetElementESRAMetadata.innerText)}},{key:"makeQualifiedInnerText",value:function(e){return e&&e.content.length<=u.get().innerText.qualification.maxLength&&e.content.length>=u.get().innerText.qualification.minLength?e:null}},{key:"makeBasicElementPropertiesComparable",value:function(e){var t=this;return e.reduce((function(e,n){var i=n.position?"".concat(n.tag,".").concat(n.position.slice(0,2).join(",")):n.tag,o="".concat(i,"+").concat(n.relativePosition),a=t.makeQualifiedClasses(n.classes).map((function(e){return"".concat(i,".").concat(e)})),u=[];t.makeQualifiedAttributes(n.attributes).qualifiedAttributes.forEach((function(e){u.push("".concat(i,"[").concat(e,"]")),u.push("".concat(i,"[").concat(e,"]=").concat(n.attributes[e].value))}));var c=n.feature?t.makeInnerFeaturesComparable([n.feature],{customTag:i,includeTag:!1,featureTypeWhiteList:[s.EI.SVG]}):[],l=[].concat((0,r.Z)(e),[i,o],(0,r.Z)(a),u,(0,r.Z)(c));return n.text&&(l.push("".concat(i,"<>")),l.push("".concat(i,"<").concat(n.text,">"))),n.distance&&(l.push("".concat(i,"->").concat(n.distance)),l.push("".concat(i,"->[]").concat(t.getDistanceRange(n.distance)))),l}),[])}},{key:"getDistanceRange",value:function(e){for(var t=[10,20,30,40,50,60,70,80,90,100],n=0,r=t;n<r.length;n++){var i=r[n];if(e<i)return i}return t[t.length-1]}},{key:"setVisualVicinityComparable",value:function(){this.visualVicinityComparable=this.makeVisualVicinityComparable(this.targetElementESRAMetadata.visualVicinity)}},{key:"makeVisualVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"setStructuralVicinityComparable",value:function(){this.structuralVicinityComparable=this.makeStructuralVicinityComparable(this.targetElementESRAMetadata.structuralVicinity)}},{key:"makeStructuralVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"makeInnerFeaturesComparable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.customTag,i=void 0===n?void 0:n,o=t.includeTag,a=void 0===o||o,u=t.featureTypeWhiteList,c=void 0===u?void 0:u;return e.reduce((function(e,t){if(c&&!c.includes(t.type)||t.isHidden)return e;var n=null!==i&&void 0!==i?i:t.tag,o=a?[].concat((0,r.Z)(e),[n]):e;switch(t.type){case s.EI.Button:o.push("".concat(n,"[type=").concat(t.buttonType,"]"));break;case s.EI.Input:t.inputType&&o.push("".concat(n,"[type=").concat(t.inputType,"]")),t.placeholder&&o.push("".concat(n,"[placeholder=").concat(t.placeholder,"]"));break;case s.EI.SVG:t.components.forEach((function(e){var t=[];for(var r in e.attributes)t.push("[".concat(r,"=").concat(e.attributes[r],"]"));o.push("".concat(n).concat(t.join("")))}))}return"text"in t&&t.text&&(o.push("".concat(n,"<>")),o.push("".concat(n,"<").concat(t.text,">"))),o}),[])}},{key:"setInnerFeaturesComparable",value:function(){this.innerFeaturesComparable=this.makeInnerFeaturesComparable(this.targetElementESRAMetadata.innerFeatures)}},{key:"isDealBreaker",value:function(e){if("input"===this.targetElementESRAMetadata.tag&&"input"===e.tag){var t=function(e){return e.type?e.type.value:"text"};if(t(this.targetElementESRAMetadata.attributes)!==t(e.attributes))return!0}return!1}},{key:"tagSimilarity",value:function(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}},{key:"attributesSimilarity",value:function(e){var t=this,n=function(e){return[].concat((0,r.Z)(t.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},i=this.makeQualifiedAttributes(e.attributes).qualifiedAttributesMap;return this.jaccard(n(this.qualifiedAttributesMap),n(i))}},{key:"indicativeAttributesSimilarity",value:function(e){return this.qualifiedAttributesMap.placehoder&&e.attributes.placehoder&&this.qualifiedAttributesMap.placehoder===e.attributes.placehoder.value?1:0}},{key:"classSimilarity",value:function(e){return this.jaccard(this.qualifiedClasses,this.makeQualifiedClasses(e.classes))}},{key:"innerTextSimilarity",value:function(e){var t=this;if(!this.targetElementESRAMetadata.innerText&&!e.innerText)return 1;var n=this.makeQualifiedInnerText(e.innerText);if(!this.qualifiedInnerText||!n)return 0;if(this.qualifiedInnerText.content===n.content)return 1;Object.values({email:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,url:/^(http|https):\/\/[^ "]+$/}).forEach((function(e){if(e.test(t.qualifiedInnerText.content)&&e.test(n.content))return.5}));try{return new Date(this.qualifiedInnerText.content),new Date(n.content),.5}catch(i){}var r=function(e){return e.replace(/\d/g,"d").replace(/[a-zA-Z]/g,"s")};return r(this.qualifiedInnerText.content)===r(n.content)?.5:0}},{key:"innerFeaturesSimilarity",value:function(e){return this.jaccard(this.innerFeaturesComparable,this.makeInnerFeaturesComparable(e.innerFeatures))}},{key:"visualVicinitySimilarity",value:function(e){return this.jaccard(this.visualVicinityComparable,this.makeVisualVicinityComparable(e.visualVicinity))}},{key:"structuralVicinitySimilarity",value:function(e){return this.jaccard(this.structuralVicinityComparable,this.makeStructuralVicinityComparable(e.structuralVicinity))}},{key:"styleSimilarity",value:function(e){var t,n,i,o,a=this,s=function(e){return[].concat((0,r.Z)(a.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},c=this.jaccard(s(null!==(t=this.targetElementESRAMetadata.style.inline)&&void 0!==t?t:{}),s(null!==(n=e.style.inline)&&void 0!==n?n:{})),l=this.jaccard(s(null!==(i=this.targetElementESRAMetadata.style.computed)&&void 0!==i?i:{}),s(null!==(o=e.style.computed)&&void 0!==o?o:{}));return c*u.get().style.inlineWeight+l*u.get().style.computedWeight}},{key:"svgsSimilarity",value:function(e){return this.targetElementESRAMetadata.svgs||e.svgs?this.targetElementESRAMetadata.svgs&&e.svgs&&JSON.stringify(this.targetElementESRAMetadata.svgs)===JSON.stringify(e.svgs)?1:0:1}},{key:"keyValueObjectToArray",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 Object.keys(e).map((function(r){return"".concat(r).concat(t).concat(function(t){return n?n(e,t):e[t]}(r))}))}},{key:"jaccard",value:function(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,a.$m)(e,t)}}]),e}()},199:function(e,t,n){"use strict";n.d(t,{BM:function(){return o},EI:function(){return r},Qy:function(){return a},i7:function(){return i}});var r=function(e){return e[e.Media=0]="Media",e[e.NoData=1]="NoData",e[e.Anchor=2]="Anchor",e[e.Button=3]="Button",e[e.Input=4]="Input",e[e.Text=5]="Text",e[e.SVG=6]="SVG",e}({}),i=function(e){return e.Element="element",e.Parent="parent",e.Child="child",e.LeftSibling="left-sibling",e.RightSibling="right-sibling",e}({}),o=function(e){return e.Center="center",e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e.TopRight="top-right",e.TopLeft="top-left",e.BottomRight="bottom-right",e.BottomLeft="bottom-left",e}({}),a=function(e){return e[e.Query=0]="Query",e[e.Intersection=1]="Intersection",e[e.Interactables=2]="Interactables",e[e.All=3]="All",e}({})},6842:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});var r=function(e){return e.Click="click",e.DoubleClick="double_click",e.DragAndDrop="drag_and_drop",e.Input="input",e.ClickAndType="click_and_type",e.ClearAndType="clear_and_type",e.Check="check",e.UnCheck="uncheck",e.Hover="hover",e.Navigation="navigation",e.Keystroke="keystroke",e.SelectOption="selectoption",e.UploadFiles="upload_files",e.Wait="wait",e}({})},9478:function(e,t,n){"use strict";n.d(t,{De:function(){return o},hj:function(){return i},pR:function(){return r}});var r=function(e){return e.Script="script",e.App="app",e}({}),i=function(e){return e.TodoListApp="todo",e.ReplayerApp="replayer",e.SessionGraphApp="sessiongraph",e}({}),o={appType:"script",testAppName:"sessiongraph"}},8739:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(5671),i=n(3144),o=function(){function e(){(0,r.Z)(this,e)}return(0,i.Z)(e,[{key:"skipEvents",value:function(e){}},{key:"preCastEvent",value:function(e){}},{key:"preEvent",value:function(e){}},{key:"postEvent",value:function(e,t){return t}},{key:"handleMeta",value:function(e,t){}},{key:"handleViewportResize",value:function(e){}},{key:"handleMutation",value:function(e,t){}},{key:"handleInput",value:function(e,t){}},{key:"handleClick",value:function(e,t){}},{key:"handleMouseDown",value:function(e,t){}},{key:"handleMouseUp",value:function(e,t){}},{key:"handleMouseMove",value:function(e,t){}},{key:"handleFocus",value:function(e,t){}}]),e}()},7666:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(2982),i=n(4165),o=n(5861),a=n(5671),s=n(3144),u=n(1414),c=function(){function e(t){var n=this,s=t.eventHandlers;(0,a.Z)(this,e),this.handlers=void 0,this.events=[],this.getEvents=function(){return n.events},this.preCastEvent=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.handlers.preCastEvent(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.processEvent=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){var r,o;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.events.push(t),n.handlers.preEvent(t),e.next=4,n.handleEvent(t);case 4:return r=e.sent,e.next=7,n.handlers.postEvent(t,r);case 7:return o=e.sent,e.abrupt("return",n.handlers.controlledReturn?n.handlers.getReturnValue():o);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.skipEvents=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){var o;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=n.events).push.apply(o,(0,r.Z)(t)),e.abrupt("return",n.handlers.skipEvents(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.handlers=s}return(0,s.Z)(e,[{key:"setHandlers",value:function(e){this.handlers=e}},{key:"handleEvent",value:function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===u.tw.Meta?3:e.t0===u.tw.IncrementalSnapshot?4:14;break;case 3:return e.abrupt("return",this.handlers.handleMeta(t.data,t));case 4:e.t1=t.data.source,e.next=e.t1===u.yh.ViewportResize?7:e.t1===u.yh.Mutation?8:e.t1===u.yh.Input?9:e.t1===u.yh.MouseInteraction?10:e.t1===u.yh.MouseMove?11:12;break;case 7:return e.abrupt("return",this.handlers.handleViewportResize(t.data,t));case 8:return e.abrupt("return",this.handlers.handleMutation(t.data,t));case 9:return e.abrupt("return",this.handlers.handleInput(t.data,t));case 10:return e.abrupt("return",this.handleMouseInteraction(t.data,t));case 11:return e.abrupt("return",this.handlers.handleMouseMove(t.data,t));case 12:return e.abrupt("break",13);case 13:case 14:return e.abrupt("break",15);case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseInteraction",value:function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t,n){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===u.Y2.Click?3:e.t0===u.Y2.MouseDown?4:e.t0===u.Y2.MouseUp?5:e.t0===u.Y2.Focus?6:7;break;case 3:return e.abrupt("return",this.handlers.handleClick(t,n));case 4:return e.abrupt("return",this.handlers.handleMouseDown(t,n));case 5:return e.abrupt("return",this.handlers.handleMouseUp(t,n));case 6:return e.abrupt("return",this.handlers.handleFocus(t,n));case 7:return e.abrupt("break",8);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}()},5473:function(e,t,n){"use strict";n.d(t,{L:function(){return fe}});var r=n(7762),i=n(3144),o=n(5671),a=n(5512),s=n(885),u=n(2982),c=n(1737),l=n(1414);function d(e){return"__ln"in e}var f=function(){function e(){(0,o.Z)(this,e),this.length=0,this.head=null}return(0,i.Z)(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null===t||void 0===t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&d(e.previousSibling)){var 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&&d(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}]),e}(),h=function(e,t){return"".concat(e,"@").concat(t)},p=function(){function e(){var t=this;(0,o.Z)(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],n=new f,r=function(e){for(var n=e,r=a.zi;r===a.zi;)r=(n=n&&n.nextSibling)&&t.mirror.getId(n);return r},i=function(i){if(i.parentNode&&(0,c._f)(i)){var o=(0,a.Zq)(i.parentNode)?t.mirror.getId((0,c.jB)(i)):t.mirror.getId(i.parentNode),s=r(i);if(-1===o||-1===s)return n.addNode(i);var u=(0,a.eD)(i,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){(0,c.Cj)(e,t.mirror)&&t.iframeManager.addIframe(e),(0,c.qs)(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),(0,c.He)(i)&&t.shadowDomManager.addShadowRoot(i.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});u&&e.push({parentId:o,nextId:s,node:u})}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());for(var o=0,s=Array.from(t.movedSet.values());o<s.length;o++){var u=s[o];m(t.removes,u,t.mirror)&&!t.movedSet.has(u.parentNode)||i(u)}for(var l=0,d=Array.from(t.addedSet.values());l<d.length;l++){var h=d[l];y(t.droppedSet,h)||m(t.removes,h,t.mirror)?y(t.movedSet,h)?i(h):t.droppedSet.add(h):i(h)}for(var p=null;n.length;){var v=null;if(p){var g=t.mirror.getId(p.value.parentNode),b=r(p.value);-1!==g&&-1!==b&&(v=p)}if(!v)for(var w=n.length-1;w>=0;w--){var S=n.get(w);if(S){var I=t.mirror.getId(S.value.parentNode);if(-1===r(S.value))continue;if(-1!==I){v=S;break}var C=S.value;if(C.parentNode&&C.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var k=C.parentNode.host;if(-1!==t.mirror.getId(k)){v=S;break}}}}if(!v){for(;n.head;)n.removeNode(n.head.value);break}p=v.previous,n.removeNode(v.value),i(v.value)}var E={texts:t.texts.map((function(e){return{id:t.mirror.getId(e.node),value:e.value}})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){return{id:t.mirror.getId(e.node),attributes:e.attributes}})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};(E.texts.length||E.attributes.length||E.removes.length||E.adds.length)&&(t.texts=[],t.attributes=[],t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(E))}},this.processMutation=function(e){if(!(0,c.WU)(e.target,t.mirror))switch(e.type){case"characterData":var n=e.target.textContent;(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:(0,a.IG)(e.target,t.maskTextClass,t.maskTextSelector)&&n?t.maskTextFn?t.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,i=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(i=(0,a.wR)({maskInputOptions:t.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:i,maskInputFn:t.maskInputFn})),(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||i===e.oldValue)return;var o=t.attributes.find((function(t){return t.node===e.target}));if("IFRAME"===r.tagName&&"src"===e.attributeName&&!t.keepIframeSrcFn(i)){if(r.contentDocument)return;e.attributeName="rr_src"}if(o||(o={node:e.target,attributes:{}},t.attributes.push(o)),"style"===e.attributeName){var s=t.doc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue),void 0!==o.attributes.style&&null!==o.attributes.style||(o.attributes.style={});for(var u=o.attributes.style,l=0,d=Array.from(r.style);l<d.length;l++){var f=d[l],p=r.style.getPropertyValue(f),m=r.style.getPropertyPriority(f);p===s.style.getPropertyValue(f)&&m===s.style.getPropertyPriority(f)||(u[f]=""===m?p:[p,m])}for(var g=0,y=Array.from(s.style);g<y.length;g++){var b=y[g];""===r.style.getPropertyValue(b)&&(u[b]=!1)}}else o.attributes[e.attributeName]=(0,a.We)(t.doc,r.tagName,e.attributeName,i);break;case"childList":if((0,c.IT)(e.target,t.blockClass,t.blockSelector,!0))return;e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(n){var r=t.mirror.getId(n),i=(0,a.Zq)(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||(0,c.WU)(n,t.mirror)||!(0,c.nF)(n,t.mirror)||(t.addedSet.has(n)?(v(t.addedSet,n),t.droppedSet.add(n)):t.addedSet.has(e.target)&&-1===r||(0,c.y5)(e.target,t.mirror)||(t.movedSet.has(n)&&t.movedMap[h(r,i)]?v(t.movedSet,n):t.removes.push({parentId:i,id:r,isShadow:!(!(0,a.Zq)(e.target)||!(0,a.DS)(e.target))||void 0})),t.mapRemoves.push(n))}))}},this.genAdds=function(e,n){if(!t.processedNodeManager.inOtherBuffer(e,t)){if(t.mirror.hasNode(e)){if((0,c.WU)(e,t.mirror))return;t.movedSet.add(e);var r=null;n&&t.mirror.hasNode(n)&&(r=t.mirror.getId(n)),r&&-1!==r&&(t.movedMap[h(t.mirror.getId(e),r)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);(0,c.IT)(e,t.blockClass,t.blockSelector,!1)||(e.childNodes.forEach((function(e){return t.genAdds(e)})),(0,c.He)(e)&&e.shadowRoot.childNodes.forEach((function(n){t.processedNodeManager.add(n,t),t.genAdds(n,e)})))}}}return(0,i.Z)(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function v(e,t){e.delete(t),t.childNodes.forEach((function(t){return v(e,t)}))}function m(e,t,n){return 0!==e.length&&g(e,t,n)}function g(e,t,n){var r=t.parentNode;if(!r)return!1;var i=n.getId(r);return!!e.some((function(e){return e.id===i}))||g(e,r,n)}function y(e,t){return 0!==e.size&&b(e,t)}function b(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||b(e,n))}var w=[],S=new(function(){function e(){(0,o.Z)(this,e),this.nodeMap=new WeakMap,this.periodicallyClear()}return(0,i.Z)(e,[{key:"periodicallyClear",value:function(){var e=this;requestAnimationFrame((function(){e.clear(),e.periodicallyClear()}))}},{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some((function(e){return e!==t}))}},{key:"add",value:function(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"clear",value:function(){this.nodeMap=new WeakMap}}]),e}());function I(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(n){return e.target}}function C(e,t){var n,r,i=new p;w.push(i),i.init(e);var o=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(o=window[a]);var s=new o(i.processMutations.bind(i));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function k(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[];return Object.keys(l.Y2).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(e){var a=e.toLowerCase(),s=function(e){return function(n){var a=I(n);if(!(0,c.IT)(a,i,o,!0)){var s=(0,c.z6)(n)?n.changedTouches[0]:n;if(s){var u=r.getId(a),d=s.clientX,f=s.clientY;t({type:l.Y2[e],id:u,x:d,y:f})}}}}(e);u.push((0,c.on)(a,s,n))})),function(){u.forEach((function(e){return e()}))}}function E(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling,s=(0,c.P2)((function(e){var a=I(e);if(a&&!(0,c.IT)(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var u=(0,c.$1)(n.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}}),a.scroll||100);return(0,c.on)("scroll",s,n)}function x(e,t){var n=Object.assign({},e);return t||delete n.userTriggered,n}var A=["INPUT","TEXTAREA","SELECT"],T=new WeakMap;function M(e){return function(e,t){if(D("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||D("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||D("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||D("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function N(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function _(e,t){var n,r,i,o=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(t.host);var u="#document"===t.nodeName?null===(n=t.defaultView)||void 0===n?void 0:n.Document:null===(i=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===i?void 0:i.ShadowRoot,c=Object.getOwnPropertyDescriptor(null===u||void 0===u?void 0:u.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&u&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null===(e=c.get)||void 0===e?void 0:e.call(this)},set:function(e){var t,n=null===(t=c.set)||void 0===t?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(r){}return n}}),function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}):function(){}}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.doc.defaultView;if(!n)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,f=e.fontCb,h=e.selectionCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),r.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),i.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),o.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),a.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),u.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),c.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),l.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),f.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),h.apply(void 0,arguments)}}(e,t);var i,o=C(e,e.doc),d=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,a="number"===typeof n.mousemove?n.mousemove:50,s="number"===typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],d=(0,c.P2)((function(e){var n=Date.now()-o;t(u.map((function(e){return e.timeOffset-=n,e})),e),u=[],o=null}),s),f=(0,c.P2)((function(e){var t=I(e),n=(0,c.z6)(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;o||(o=Date.now()),u.push({x:r,y:a,id:i.getId(t),timeOffset:Date.now()-o}),d("undefined"!==typeof DragEvent&&e instanceof DragEvent?l.yh.Drag:e instanceof MouseEvent?l.yh.MouseMove:l.yh.TouchMove)}),a,{trailing:!1}),h=[(0,c.on)("mousemove",f,r),(0,c.on)("touchmove",f,r),(0,c.on)("drag",f,r)];return function(){h.forEach((function(e){return e()}))}}(e),f=k(e),h=E(e),p=function(e){var t=e.viewportResizeCb,n=-1,r=-1,i=(0,c.P2)((function(){var e=(0,c.gp)(),i=(0,c.fM)();n===e&&r===i||(t({width:Number(i),height:Number(e)}),n=e,r=i)}),200);return(0,c.on)("resize",i,window)}(e),v=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.ignoreClass,l=e.maskInputOptions,d=e.maskInputFn,f=e.sampling,h=e.userTriggeredOnInput;function p(e){var t=I(e),r=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(A.indexOf(t.tagName)<0)&&!(0,c.IT)(t,i,o,!0)){var u=t.type;if(!t.classList.contains(s)){var f=t.value,p=!1;"radio"===u||"checkbox"===u?p=t.checked:(l[t.tagName.toLowerCase()]||l[u])&&(f=(0,a.wR)({maskInputOptions:l,tagName:t.tagName,type:u,value:f,maskInputFn:d})),v(t,x({text:f,isChecked:p,userTriggered:r},h));var m=t.name;"radio"===u&&m&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(m,'"]')).forEach((function(e){e!==t&&v(e,x({text:e.value,isChecked:!p,userTriggered:!1},h))}))}}}function v(e,n){var i=T.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){T.set(e,n);var o=r.getId(e);t(Object.assign(Object.assign({},n),{id:o}))}}var m=("last"===f.input?["change"]:["input","change"]).map((function(e){return(0,c.on)(e,p,n)})),g=n.defaultView;if(!g)return function(){m.forEach((function(e){return e()}))};var y=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),b=[[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 y&&y.set&&m.push.apply(m,(0,u.Z)(b.map((function(e){return(0,c.yU)(e[0],e[1],{set:function(){p({target:this})}},!1,g)})))),function(){m.forEach((function(e){return e()}))}}(e),m=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,a=function(e){return(0,c.P2)((function(o){var a=I(o);if(a&&!(0,c.IT)(a,n,r,!0)){var s=a.currentTime,u=a.volume,l=a.muted,d=a.playbackRate;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:l,playbackRate:d})}}),o.media||500)},s=[(0,c.on)("play",a(0)),(0,c.on)("pause",a(1)),(0,c.on)("seeked",a(2)),(0,c.on)("volumechange",a(3)),(0,c.on)("ratechange",a(4))];return function(){s.forEach((function(e){return e()}))}}(e),g=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=function(e,t){var o=N(this,r,i.styleMirror),s=o.id,u=o.styleId;return(s&&-1!==s||u&&-1!==u)&&n({id:s,styleId:u,adds:[{rule:e,index:t}]}),a.apply(this,[e,t])};var c,l,d=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=function(e){var t=N(this,r,i.styleMirror),o=t.id,a=t.styleId;return(o&&-1!==o||a&&-1!==a)&&n({id:o,styleId:a,removes:[{index:e}]}),d.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=function(e){var t=N(this,r,i.styleMirror),o=t.id,a=t.styleId;return(o&&-1!==o||a&&-1!==a)&&n({id:o,styleId:a,replace:e}),c.apply(this,[e])}),o.CSSStyleSheet.prototype.replaceSync&&(l=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=function(e){var t=N(this,r,i.styleMirror),o=t.id,a=t.styleId;return(o&&-1!==o||a&&-1!==a)&&n({id:o,styleId:a,replaceSync:e}),l.apply(this,[e])});var f={};O("CSSGroupingRule")?f.CSSGroupingRule=o.CSSGroupingRule:(O("CSSMediaRule")&&(f.CSSMediaRule=o.CSSMediaRule),O("CSSConditionRule")&&(f.CSSConditionRule=o.CSSConditionRule),O("CSSSupportsRule")&&(f.CSSSupportsRule=o.CSSSupportsRule));var h={};return Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),o=t[0],a=t[1];h[o]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=function(e,t){var a=N(this.parentStyleSheet,r,i.styleMirror),s=a.id,c=a.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,adds:[{rule:e,index:[].concat((0,u.Z)(M(this)),[t||0])}]}),h[o].insertRule.apply(this,[e,t])},a.prototype.deleteRule=function(e){var t=N(this.parentStyleSheet,r,i.styleMirror),a=t.id,s=t.styleId;return(a&&-1!==a||s&&-1!==s)&&n({id:a,styleId:s,removes:[{index:[].concat((0,u.Z)(M(this)),[e])}]}),h[o].deleteRule.apply(this,[e])}})),function(){o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=d,c&&(o.CSSStyleSheet.prototype.replace=c),l&&(o.CSSStyleSheet.prototype.replaceSync=l),Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),n=t[0],r=t[1];r.prototype.insertRule=h[n].insertRule,r.prototype.deleteRule=h[n].deleteRule}))}}(e,{win:n}),y=_(e,e.doc),b=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,a=t.win,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=function(e,t,a){var u;if(i.has(e))return s.apply(this,[e,t,a]);var c=N(null===(u=this.parentRule)||void 0===u?void 0:u.parentStyleSheet,r,o.styleMirror),l=c.id,d=c.styleId;return(l&&-1!==l||d&&-1!==d)&&n({id:l,styleId:d,set:{property:e,value:t,priority:a},index:M(this.parentRule)}),s.apply(this,[e,t,a])};var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=function(e){var t;if(i.has(e))return u.apply(this,[e]);var a=N(null===(t=this.parentRule)||void 0===t?void 0:t.parentStyleSheet,r,o.styleMirror),s=a.id,c=a.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,remove:{property:e},index:M(this.parentRule)}),u.apply(this,[e])},function(){a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=u}}(e,{win:n}),S=e.collectFonts?function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(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};var s=(0,c.r$)(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=o.get(n);e&&(t(e),o.delete(n))}),0),e.apply(this,[n])}}));return i.push((function(){r.FontFace=a})),i.push(s),function(){i.forEach((function(e){return e()}))}}(e):function(){},R=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,a=!0,s=function(){var e=t.getSelection();if(!(!e||a&&(null===e||void 0===e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,l=0;l<u;l++){var d=e.getRangeAt(l),f=d.startContainer,h=d.startOffset,p=d.endContainer,v=d.endOffset;(0,c.IT)(f,r,i,!0)||(0,c.IT)(p,r,i,!0)||s.push({start:n.getId(f),startOffset:h,end:n.getId(p),endOffset:v})}o({ranges:s})}};return s(),(0,c.on)("selectionchange",s)}(e),D=[],Z=(0,r.Z)(e.plugins);try{for(Z.s();!(i=Z.n()).done;){var L=i.value;D.push(L.observer(L.callback,n,L.options))}}catch(F){Z.e(F)}finally{Z.f()}return function(){w.forEach((function(e){return e.reset()})),o.disconnect(),d(),f(),h(),p(),v(),m(),g(),y(),b(),S(),R(),D.forEach((function(e){return e()}))}}function D(e){return"undefined"!==typeof window[e]}function O(e){return Boolean("undefined"!==typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Z=function(){function e(t){(0,o.Z)(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return(0,i.Z)(e,[{key:"getId",value:function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}},{key:"getIds",value:function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,r,i)}))}},{key:"getRemoteId",value:function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!==typeof t)return t;var i=r.get(t);return i||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,r)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),L=function(){function e(t){(0,o.Z)(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Z(a.Bu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Z(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return(0,i.Z)(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case l.tw.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:l.tw.IncrementalSnapshot,data:{source:l.yh.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case l.tw.Meta:case l.tw.Load:case l.tw.DomContentLoaded:return!1;case l.tw.Plugin:return t;case l.tw.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case l.tw.IncrementalSnapshot:switch(t.data.source){case l.yh.Mutation:return t.data.adds.forEach((function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((function(t){r.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){r.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.Drag:case l.yh.TouchMove:case l.yh.MouseMove:return t.data.positions.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.ViewportResize:return!1;case l.yh.MediaInteraction:case l.yh.MouseInteraction:case l.yh.Scroll:case l.yh.CanvasMutation:case l.yh.Input:return this.replaceIds(t.data,e,["id"]),t;case l.yh.StyleSheetRule:case l.yh.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case l.yh.Font:return t;case l.yh.Selection:return t.data.ranges.forEach((function(t){r.replaceIds(t,e,["start","end"])})),t;case l.yh.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((function(t){r.replaceStyleIds(t,e,["styleId"])})),t}}}},{key:"replace",value:function(e,t,n,i){var o,a=(0,r.Z)(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;(Array.isArray(t[s])||"number"===typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]))}}catch(u){a.e(u)}finally{a.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===a.Jq.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((function(e){n.patchRootIdOnNode(e,t)}))}}]),e}(),F=function(){function e(t){(0,o.Z)(this,e),this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return(0,i.Z)(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if((0,a.DS)(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=C(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((function(){return r.disconnect()})),this.restoreHandlers.push(E(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),n.restoreHandlers.push(_({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))}),0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push((0,c.r$)(e.prototype,"attachShadow",(function(e){return function(r){var i=e.call(this,r);return this.shadowRoot&&(0,c._f)(this)&&n.addShadowRoot(this.shadowRoot,t),i}})))}},{key:"reset",value:function(){this.restoreHandlers.forEach((function(e){try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}(),B=n(4165),V=n(3246),P=n(3464),j=new Map;var W=function(e,t,n){if(e&&(G(e,t)||"object"===typeof e)){var r=function(e,t){var n=j.get(e);return n||(n=new Map,j.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function U(e,t,n){if(e instanceof Array)return e.map((function(e){return U(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:(0,P.c)(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[U(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[U(e.data,t,n),e.width,e.height]}:G(e,t)||"object"===typeof e?{rr_type:e.constructor.name,index:W(e,t,n)}:e}var H=function(e,t,n){return(0,u.Z)(e).map((function(e){return U(e,t,n)}))},G=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"===typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function z(e,t,n){var r=[];try{var i=(0,c.r$)(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){(0,c.IT)(this,t,n,!0)||"__context"in this||(this.__context=r);for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return e.apply(this,[r].concat(o))}}));r.push(i)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){r.forEach((function(e){return e()}))}}function q(e,t,n,i,o,a,s){var u,l=[],d=Object.getOwnPropertyNames(e),f=(0,r.Z)(d);try{var h=function(){var r=u.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(r))return 0;try{if("function"!==typeof e[r])return 0;var a=(0,c.r$)(e,r,(function(e){return function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var d=e.apply(this,u);if(W(d,s,this),!(0,c.IT)(this.canvas,i,o,!0)){var f=H([].concat(u),s,this),h={type:t,property:r,args:f};n(this.canvas,h)}return d}}));l.push(a)}catch(f){var d=(0,c.yU)(e,r,{set:function(e){n(this.canvas,{type:t,property:r,args:[e],setter:!0})}});l.push(d)}};for(f.s();!(u=f.n()).done;)h()}catch(p){f.e(p)}finally{f.f()}return l}var Y=null;try{var Q="undefined"!==typeof module&&"function"===typeof module.require&&module.require("worker_threads")||"function"===typeof require&&require("worker_threads")||"function"===typeof require&&require("worker_threads");Y=Q.Worker}catch(he){}function K(e,t,n){var r=void 0===t?null:t,i=function(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}(e,void 0!==n&&n),o=i.indexOf("\n",10)+1,a=i.substring(o)+(r?"//# sourceMappingURL="+r:"");return function(e){return new Y(a,Object.assign({},e,{eval:!0}))}}function X(e,t,n){var r=void 0===t?null:t,i=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),i=0,o=n.length;i<o;++i)r[i]=n.charCodeAt(i);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),o=i.indexOf("\n",10)+1,a=i.substring(o)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var J="[object process]"===Object.prototype.toString.call("undefined"!==typeof process?process:0);var $,ee,te,ne,re,ie,oe=($="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",ee=null,te=!1,J?K($,ee,te):function(e,t,n){var r;return function(i){return r=r||X(e,t,n),new Worker(r,i)}}($,ee,te)),ae=function(){function e(t){var n=this;(0,o.Z)(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId)&&n.rafStamps.invokeId||(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var r=t.sampling,i=void 0===r?"all":r,a=t.win,s=t.blockClass,u=t.blockSelector,c=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&"all"===i&&this.initCanvasMutationObserver(a,s,u),c&&"number"===typeof i&&this.initCanvasFPSObserver(i,a,s,u,{dataURLOptions:l})}return(0,i.Z)(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,r,i){var o=this,a=z(t,n,r),s=new Map,u=new oe;u.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,a=n.width,u=n.height;o.mutationCb({id:t,type:l.FX["2D"],commands:[{property:"clearRect",args:[0,0,a,u]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var d,f=1e3/e,h=0;d=requestAnimationFrame((function e(a){h&&a-h<f||(h=a,function(){var e=[];return t.document.querySelectorAll("canvas").forEach((function(t){(0,c.IT)(t,n,r,!0)||e.push(t)})),e}().forEach((function(e){return(0,V.m)(o,void 0,void 0,(0,B.Z)().mark((function t(){var n,r,o,a;return(0,B.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.mirror.getId(e),!s.get(r)){t.next=3;break}return t.abrupt("return");case 3:return s.set(r,!0),["webgl","webgl2"].includes(e.__context)&&(o=e.getContext(e.__context),!1===(null===(n=null===o||void 0===o?void 0:o.getContextAttributes())||void 0===n?void 0:n.preserveDrawingBuffer)&&(null===o||void 0===o||o.clear(o.COLOR_BUFFER_BIT))),t.next=7,createImageBitmap(e);case 7:a=t.sent,u.postMessage({id:r,bitmap:a,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[a]);case 9:case"end":return t.stop()}}),t,this)})))}))),d=requestAnimationFrame(e)})),this.resetObservers=function(){a(),cancelAnimationFrame(d)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var i=z(e,t,n),o=function(e,t,n,i){var o,a=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=(0,r.Z)(s);try{var d=function(){var r=o.value;try{if("function"!==typeof t.CanvasRenderingContext2D.prototype[r])return 1;var s=(0,c.r$)(t.CanvasRenderingContext2D.prototype,r,(function(o){return function(){for(var a=this,s=arguments.length,u=new Array(s),d=0;d<s;d++)u[d]=arguments[d];return(0,c.IT)(this.canvas,n,i,!0)||setTimeout((function(){var n=H([].concat(u),t,a);e(a.canvas,{type:l.FX["2D"],property:r,args:n})}),0),o.apply(this,u)}}));a.push(s)}catch(d){var u=(0,c.yU)(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e(this.canvas,{type:l.FX["2D"],property:r,args:[t],setter:!0})}});a.push(u)}};for(u.s();!(o=u.n()).done;)d()}catch(f){u.e(f)}finally{u.f()}return function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),a=function(e,t,n,r,i){var o=[];return o.push.apply(o,(0,u.Z)(q(t.WebGLRenderingContext.prototype,l.FX.WebGL,e,n,r,0,t))),"undefined"!==typeof t.WebGL2RenderingContext&&o.push.apply(o,(0,u.Z)(q(t.WebGL2RenderingContext.prototype,l.FX.WebGL2,e,n,r,0,t))),function(){o.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){i(),o(),a()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){return(0,V._)(e,["type"])})),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),se=function(){function e(t){(0,o.Z)(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new c.ug,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return(0,i.Z)(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,i={id:t,styleIds:[]},o=[],s=(0,r.Z)(e);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=void 0;if(this.styleMirror.has(u))c=this.styleMirror.getId(u);else{c=this.styleMirror.add(u);var l=Array.from(u.rules||CSSRule);o.push({styleId:c,rules:l.map((function(e,t){return{rule:(0,a.LS)(e),index:t}}))})}i.styleIds.push(c)}}catch(d){s.e(d)}finally{s.f()}o.length>0&&(i.styles=o),this.adoptedStyleSheetCb(i)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}();function ue(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}var ce=!1,le=(0,a.bZ)();function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,i=e.checkoutEveryNth,o=e.blockClass,s=void 0===o?"rr-block":o,u=e.blockSelector,d=void 0===u?null:u,f=e.ignoreClass,h=void 0===f?"rr-ignore":f,p=e.maskTextClass,v=void 0===p?"rr-mask":p,m=e.maskTextSelector,g=void 0===m?null:m,y=e.inlineStylesheet,b=void 0===y||y,I=e.maskAllInputs,C=e.maskInputOptions,k=e.slimDOMOptions,E=e.maskInputFn,x=e.maskTextFn,A=e.hooks,T=e.packFn,M=e.sampling,N=void 0===M?{}:M,_=e.dataURLOptions,D=void 0===_?{}:_,O=e.mousemoveWait,Z=e.recordCanvas,B=void 0!==Z&&Z,V=e.recordCrossOriginIframes,P=void 0!==V&&V,j=e.recordAfter,W=void 0===j?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":j,U=e.userTriggeredOnInput,H=void 0!==U&&U,G=e.collectFonts,z=void 0!==G&&G,q=e.inlineImages,Y=void 0!==q&&q,Q=e.plugins,K=e.keepIframeSrcFn,X=void 0===K?function(){return!1}:K,J=e.ignoreCSSAttributes,$=void 0===J?new Set([]):J,ee=!P||window.parent===window,te=!1;if(!ee)try{window.parent.document,te=!1}catch(he){te=!0}if(ee&&!t)throw new Error("emit function is required");void 0!==O&&void 0===N.mousemove&&(N.mousemove=O),le.reset();var oe,de=!0===I?{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!==C?C:{password:!0},fe=!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===k,headMetaDescKeywords:"all"===k}:k||{};(0,c.OK)();var pe=0,ve=function(e){var t,n=(0,r.Z)(Q||[]);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.eventProcessor&&(e=i.eventProcessor(e))}}catch(o){n.e(o)}finally{n.f()}return T&&!te&&(e=T(e)),e};ne=function(e,r){var o;if(!(null===(o=w[0])||void 0===o?void 0:o.isFrozen())||e.type===l.tw.FullSnapshot||e.type===l.tw.IncrementalSnapshot&&e.data.source===l.yh.Mutation||w.forEach((function(e){return e.unfreeze()})),ee)null===t||void 0===t||t(ve(e),r);else if(te){var a={type:"rrweb",event:ve(e),origin:window.location.origin,isCheckout:r};window.parent.postMessage(a,"*")}if(e.type===l.tw.FullSnapshot)oe=e,pe=0;else if(e.type===l.tw.IncrementalSnapshot){if(e.data.source===l.yh.Mutation&&e.data.isAttachIframe)return;pe++;var s=i&&pe>=i,u=n&&e.timestamp-oe.timestamp>n;(s||u)&&re(!0)}};var me,ge=function(e){ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Mutation},e)}))},ye=function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Scroll},e)}))},be=function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.CanvasMutation},e)}))},we=new se({mutationCb:ge,adoptedStyleSheetCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.AdoptedStyleSheet},e)}))}}),Se=new L({mirror:le,mutationCb:ge,stylesheetManager:we,recordCrossOriginIframes:P,wrappedEmit:ne}),Ie=(0,r.Z)(Q||[]);try{for(Ie.s();!(me=Ie.n()).done;){var Ce=me.value;Ce.getMirror&&Ce.getMirror({nodeMirror:le,crossOriginIframeMirror:Se.crossOriginIframeMirror,crossOriginIframeStyleMirror:Se.crossOriginIframeStyleMirror})}}catch(Te){Ie.e(Te)}finally{Ie.f()}ie=new ae({recordCanvas:B,mutationCb:be,win:window,blockClass:s,blockSelector:d,mirror:le,sampling:N.canvas,dataURLOptions:D});var ke=new F({mutationCb:ge,scrollCb:ye,bypassOptions:{blockClass:s,blockSelector:d,maskTextClass:v,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:de,dataURLOptions:D,maskTextFn:x,maskInputFn:E,recordCanvas:B,inlineImages:Y,sampling:N,slimDOMOptions:fe,iframeManager:Se,stylesheetManager:we,canvasManager:ie,keepIframeSrcFn:X,processedNodeManager:S},mirror:le});re=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ne(ue({type:l.tw.Meta,data:{href:window.location.href,width:(0,c.fM)(),height:(0,c.gp)()}}),e),we.reset(),ke.init(),w.forEach((function(e){return e.lock()}));var t=(0,a.CO)(document,{mirror:le,blockClass:s,blockSelector:d,maskTextClass:v,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:de,maskTextFn:x,slimDOM:fe,dataURLOptions:D,recordCanvas:B,inlineImages:Y,onSerialize:function(e){(0,c.Cj)(e,le)&&Se.addIframe(e),(0,c.qs)(e,le)&&we.trackLinkElement(e),(0,c.He)(e)&&ke.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){Se.attachIframe(e,t),ke.observeAttachShadow(e)},onStylesheetLoad:function(e,t){we.attachLinkElement(e,t)},keepIframeSrcFn:X});if(!t)return console.warn("Failed to snapshot the document");ne(ue({type:l.tw.FullSnapshot,data:{node:t,initialOffset:(0,c.$1)(window)}})),w.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&we.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document))};try{var Ee=[],xe=function(e){var t;return R({mutationCb:ge,mousemoveCb:function(e,t){return ne(ue({type:l.tw.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MouseInteraction},e)}))},scrollCb:ye,viewportResizeCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.ViewportResize},e)}))},inputCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Input},e)}))},mediaInteractionCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleDeclaration},e)}))},canvasMutationCb:be,fontCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Font},e)}))},selectionCb:function(e){ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Selection},e)}))},blockClass:s,ignoreClass:h,maskTextClass:v,maskTextSelector:g,maskInputOptions:de,inlineStylesheet:b,sampling:N,recordCanvas:B,inlineImages:Y,userTriggeredOnInput:H,collectFonts:z,doc:e,maskInputFn:E,maskTextFn:x,keepIframeSrcFn:X,blockSelector:d,slimDOMOptions:fe,dataURLOptions:D,mirror:le,iframeManager:Se,stylesheetManager:we,shadowDomManager:ke,processedNodeManager:S,canvasManager:ie,ignoreCSSAttributes:$,plugins:(null===(t=null===Q||void 0===Q?void 0:Q.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return ne(ue({type:l.tw.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},A)};Se.addLoadListener((function(e){try{Ee.push(xe(e.contentDocument))}catch(t){console.warn(t)}}));var Ae=function(){re(),Ee.push(xe(document)),ce=!0};return"interactive"===document.readyState||"complete"===document.readyState?Ae():(Ee.push((0,c.on)("DOMContentLoaded",(function(){ne(ue({type:l.tw.DomContentLoaded,data:{}})),"DOMContentLoaded"===W&&Ae()}))),Ee.push((0,c.on)("load",(function(){ne(ue({type:l.tw.Load,data:{}})),"load"===W&&Ae()}),window))),function(){Ee.forEach((function(e){return e()})),ce=!1}}catch(Me){console.warn(Me)}}de.addCustomEvent=function(e,t){if(!ce)throw new Error("please add custom event after start recording");ne(ue({type:l.tw.Custom,data:{tag:e,payload:t}}))},de.freezePage=function(){w.forEach((function(e){return e.freeze()}))},de.takeFullSnapshot=function(e){if(!ce)throw new Error("please take full snapshot after start recording");re(e)},de.mirror=le;var fe=(0,i.Z)((function e(t){var n=this;(0,o.Z)(this,e),this.logNativeMutationObserver=!1,this.stopRRWebRecording=function(){},this.eventHandler=void 0,this.currentURL=void 0,this.start=function(){n.stopRRWebRecording=de({emit:n.eventHandler,sampling:{mousemove:!1},userTriggeredOnInput:!0}),n.logNativeMutationObserver&&n.selfObserve(),n.startURLObserver()},this.stop=function(){n.stopRRWebRecording()},this.startURLObserver=function(){window.addEventListener("popstate",(function(e){n.onURLChange()})),window.addEventListener("locationchange",(function(e){n.onURLChange()})),window.addEventListener("hashchange",(function(e){n.onURLChange()}));var e=n,t=window.history.pushState;window.history.pushState=function(){return e.onURLChange(),t.apply(window.history,arguments)};var r=window.history.replaceState;window.history.replaceState=function(){return e.onURLChange(),r.apply(window.history,arguments)}},this.onURLChange=function(){setTimeout((function(){var e=window.location.href;if(e!==n.currentURL){n.currentURL=e;try{de.addCustomEvent("url-change",{url:e})}catch(he){}}}))},this.selfObserve=function(){var e=document.getElementsByTagName("body");new MutationObserver((function(e,t){var n,i=(0,r.Z)(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;"childList"===o.type?console.log("A child node has been added or removed.",o):"attributes"===o.type&&console.log("The ".concat(o.attributeName," attribute was modified."),o)}}catch(a){i.e(a)}finally{i.f()}})).observe(e[0],{attributes:!0,childList:!0,subtree:!0})},this.getNodeById=function(e){return de.mirror.getNode(e)},this.getMeta=function(e){return de.mirror.getMeta(e)},this.eventHandler=t,this.currentURL=window.location.href}))},6301:function(e){e.exports=function(e){return new Promise((function(t){return setTimeout(t,e)}))}},763:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,d=128,f=256,h=1/0,p=9007199254740991,v=NaN,m=4294967295,g=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",f]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",S="[object Date]",I="[object Error]",C="[object Function]",k="[object GeneratorFunction]",E="[object Map]",x="[object Number]",A="[object Object]",T="[object Promise]",M="[object RegExp]",N="[object Set]",_="[object String]",R="[object Symbol]",D="[object WeakMap]",O="[object ArrayBuffer]",Z="[object DataView]",L="[object Float32Array]",F="[object Float64Array]",B="[object Int8Array]",V="[object Int16Array]",P="[object Int32Array]",j="[object Uint8Array]",W="[object Uint8ClampedArray]",U="[object Uint16Array]",H="[object Uint32Array]",G=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,Q=/[&<>"']/g,K=RegExp(Y.source),X=RegExp(Q.source),J=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,Se=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ie=/($^)/,Ce=/['\n\r\u2028\u2029\\]/g,ke="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Me="\\ufe0e\\ufe0f",Ne="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_e="['\u2019]",Re="["+ke+"]",De="["+Ne+"]",Oe="["+Ee+"]",Ze="\\d+",Le="["+xe+"]",Fe="["+Ae+"]",Be="[^"+ke+Ne+Ze+xe+Ae+Te+"]",Ve="\\ud83c[\\udffb-\\udfff]",Pe="[^"+ke+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",We="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Te+"]",He="\\u200d",Ge="(?:"+Fe+"|"+Be+")",ze="(?:"+Ue+"|"+Be+")",qe="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Oe+"|"+Ve+")"+"?",Ke="["+Me+"]?",Xe=Ke+Qe+("(?:"+He+"(?:"+[Pe,je,We].join("|")+")"+Ke+Qe+")*"),Je="(?:"+[Le,je,We].join("|")+")"+Xe,$e="(?:"+[Pe+Oe+"?",Oe,je,We,Re].join("|")+")",et=RegExp(_e,"g"),tt=RegExp(Oe,"g"),nt=RegExp(Ve+"(?="+Ve+")|"+$e+Xe,"g"),rt=RegExp([Ue+"?"+Fe+"+"+qe+"(?="+[De,Ue,"$"].join("|")+")",ze+"+"+Ye+"(?="+[De,Ue+Ge,"$"].join("|")+")",Ue+"?"+Ge+"+"+qe,Ue+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ze,Je].join("|"),"g"),it=RegExp("["+He+ke+Ee+Me+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,ut={};ut[L]=ut[F]=ut[B]=ut[V]=ut[P]=ut[j]=ut[W]=ut[U]=ut[H]=!0,ut[y]=ut[b]=ut[O]=ut[w]=ut[Z]=ut[S]=ut[I]=ut[C]=ut[E]=ut[x]=ut[A]=ut[M]=ut[N]=ut[_]=ut[D]=!1;var ct={};ct[y]=ct[b]=ct[O]=ct[Z]=ct[w]=ct[S]=ct[L]=ct[F]=ct[B]=ct[V]=ct[P]=ct[E]=ct[x]=ct[A]=ct[M]=ct[N]=ct[_]=ct[R]=ct[j]=ct[W]=ct[U]=ct[H]=!0,ct[I]=ct[C]=ct[D]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,vt=ht||pt||Function("return this")(),mt=t&&!t.nodeType&&t,gt=mt&&e&&!e.nodeType&&e,yt=gt&&gt.exports===mt,bt=yt&&ht.process,wt=function(){try{var e=gt&&gt.require&&gt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),St=wt&&wt.isArrayBuffer,It=wt&&wt.isDate,Ct=wt&&wt.isMap,kt=wt&&wt.isRegExp,Et=wt&&wt.isSet,xt=wt&&wt.isTypedArray;function At(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Tt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Mt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Nt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Dt(e,t){return!!(null==e?0:e.length)&&Ut(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Zt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Bt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Pt=qt("length");function jt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Wt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ut(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Wt(e,Gt,n)}function Ht(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Gt(e){return e!==e}function zt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:v}function qt(e){return function(t){return null==t?i:t[e]}}function Yt(e){return function(t){return null==e?i:e[t]}}function Qt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Kt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Jt(e){return e?e.slice(0,mn(e)+1).replace(ae,""):e}function $t(e){return function(t){return e(t)}}function en(e,t){return Zt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Ut(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var on=Yt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=Yt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+lt[e]}function un(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return un(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):Pt(e)}function vn(e){return un(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function mn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var gn=Yt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yn=function e(t){var n=(t=null==t?vt:yn.defaults(vt.Object(),t,yn.pick(vt,at))).Array,r=t.Date,se=t.Error,ke=t.Function,Ee=t.Math,xe=t.Object,Ae=t.RegExp,Te=t.String,Me=t.TypeError,Ne=n.prototype,_e=ke.prototype,Re=xe.prototype,De=t["__core-js_shared__"],Oe=_e.toString,Ze=Re.hasOwnProperty,Le=0,Fe=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Be=Re.toString,Ve=Oe.call(xe),Pe=vt._,je=Ae("^"+Oe.call(Ze).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=yt?t.Buffer:i,Ue=t.Symbol,He=t.Uint8Array,Ge=We?We.allocUnsafe:i,ze=ln(xe.getPrototypeOf,xe),qe=xe.create,Ye=Re.propertyIsEnumerable,Qe=Ne.splice,Ke=Ue?Ue.isConcatSpreadable:i,Xe=Ue?Ue.iterator:i,Je=Ue?Ue.toStringTag:i,$e=function(){try{var e=fo(xe,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,it=r&&r.now!==vt.Date.now&&r.now,lt=t.setTimeout!==vt.setTimeout&&t.setTimeout,ht=Ee.ceil,pt=Ee.floor,mt=xe.getOwnPropertySymbols,gt=We?We.isBuffer:i,bt=t.isFinite,wt=Ne.join,Pt=ln(xe.keys,xe),Yt=Ee.max,bn=Ee.min,wn=r.now,Sn=t.parseInt,In=Ee.random,Cn=Ne.reverse,kn=fo(t,"DataView"),En=fo(t,"Map"),xn=fo(t,"Promise"),An=fo(t,"Set"),Tn=fo(t,"WeakMap"),Mn=fo(xe,"create"),Nn=Tn&&new Tn,_n={},Rn=Bo(kn),Dn=Bo(En),On=Bo(xn),Zn=Bo(An),Ln=Bo(Tn),Fn=Ue?Ue.prototype:i,Bn=Fn?Fn.valueOf:i,Vn=Fn?Fn.toString:i;function Pn(e){if(ts(e)&&!Ha(e)&&!(e instanceof Hn)){if(e instanceof Un)return e;if(Ze.call(e,"__wrapped__"))return Vo(e)}return new Un(e)}var jn=function(){function e(){}return function(t){if(!es(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Wn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Qn(e){var t=this.__data__=new zn(e);this.size=t.size}function Kn(e,t){var n=Ha(e),r=!n&&Ua(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&cs(e),a=n||r||i||o,s=a?Xt(e.length,Te):[],u=s.length;for(var c in e)!t&&!Ze.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||s.push(c);return s}function Xn(e){var t=e.length;return t?e[Yr(0,t-1)]:i}function Jn(e,t){return Zo(Mi(e),sr(t,0,e.length))}function $n(e){return Zo(Mi(e))}function er(e,t,n){(n!==i&&!Pa(e[t],n)||n===i&&!(t in e))&&or(e,t,n)}function tr(e,t,n){var r=e[t];Ze.call(e,t)&&Pa(r,n)&&(n!==i||t in e)||or(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(Pa(e[n][0],t))return n;return-1}function rr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ir(e,t){return e&&Ni(t,_s(t),e)}function or(e,t,n){"__proto__"==t&&$e?$e(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:xs(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ur(e,t,n,r,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!es(e))return e;var d=Ha(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ze.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Mi(e,s)}else{var f=vo(e),h=f==C||f==k;if(Ya(e))return Ci(e,u);if(f==A||f==y||h&&!o){if(s=c||h?{}:go(e),!u)return c?function(e,t){return Ni(e,po(e),t)}(e,function(e,t){return e&&Ni(t,Rs(t),e)}(s,e)):function(e,t){return Ni(e,ho(e),t)}(e,ir(s,e))}else{if(!ct[f])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case O:return ki(e);case w:case S:return new r(+e);case Z:return function(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case F:case B:case V:case P:case j:case W:case U:case H:return Ei(e,n);case E:return new r;case x:case _:return new r(e);case M:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case N:return new r;case R:return i=e,Bn?xe(Bn.call(i)):{}}var i}(e,f,u)}}a||(a=new Qn);var p=a.get(e);if(p)return p;a.set(e,s),as(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):ns(e)&&e.forEach((function(r,i){s.set(i,ur(r,t,n,i,e,a))}));var v=d?i:(l?c?io:ro:c?Rs:_s)(e);return Mt(v||e,(function(r,i){v&&(r=e[i=r]),tr(s,i,ur(r,t,n,i,e,a))})),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=xe(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Me(o);return _o((function(){e.apply(i,n)}),t)}function dr(e,t,n,r){var i=-1,o=Dt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Zt(t,$t(n))),r?(o=Ot,a=!1):t.length>=200&&(o=tn,a=!1,t=new Yn(t));e:for(;++i<s;){var l=e[i],d=null==n?l:n(l);if(l=r||0!==l?l:0,a&&d===d){for(var f=c;f--;)if(t[f]===d)continue e;u.push(l)}else o(t,d,r)||u.push(l)}return u}Pn.templateSettings={escape:J,evaluate:$,interpolate:ee,variable:"",imports:{_:Pn}},Pn.prototype=Wn.prototype,Pn.prototype.constructor=Pn,Un.prototype=jn(Wn.prototype),Un.prototype.constructor=Un,Hn.prototype=jn(Wn.prototype),Hn.prototype.constructor=Hn,Gn.prototype.clear=function(){this.__data__=Mn?Mn(null):{},this.size=0},Gn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gn.prototype.get=function(e){var t=this.__data__;if(Mn){var n=t[e];return n===a?i:n}return Ze.call(t,e)?t[e]:i},Gn.prototype.has=function(e){var t=this.__data__;return Mn?t[e]!==i:Ze.call(t,e)},Gn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Mn&&t===i?a:t,this},zn.prototype.clear=function(){this.__data__=[],this.size=0},zn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Qe.call(t,n,1),--this.size,!0)},zn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?i:t[n][1]},zn.prototype.has=function(e){return nr(this.__data__,e)>-1},zn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(En||zn),string:new Gn}},qn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return co(this,e).get(e)},qn.prototype.has=function(e){return co(this,e).has(e)},qn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,a),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.clear=function(){this.__data__=new zn,this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Qn.prototype.get=function(e){return this.__data__.get(e)},Qn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof zn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var fr=Di(wr),hr=Di(Sr,!0);function pr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function vr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s===s&&!us(s):n(s,u)))var u=s,c=a}return c}function mr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function gr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?gr(s,t-1,n,r,i):Lt(i,s):r||(i[i.length]=s)}return i}var yr=Oi(),br=Oi(!0);function wr(e,t){return e&&yr(e,t,_s)}function Sr(e,t){return e&&br(e,t,_s)}function Ir(e,t){return Rt(t,(function(t){return Xa(e[t])}))}function Cr(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&n<r;)e=e[Fo(t[n++])];return n&&n==r?e:i}function kr(e,t,n){var r=t(e);return Ha(e)?r:Lt(r,n(e))}function Er(e){return null==e?e===i?"[object Undefined]":"[object Null]":Je&&Je in xe(e)?function(e){var t=Ze.call(e,Je),n=e[Je];try{e[Je]=i;var r=!0}catch(a){}var o=Be.call(e);r&&(t?e[Je]=n:delete e[Je]);return o}(e):function(e){return Be.call(e)}(e)}function xr(e,t){return e>t}function Ar(e,t){return null!=e&&Ze.call(e,t)}function Tr(e,t){return null!=e&&t in xe(e)}function Mr(e,t,r){for(var o=r?Ot:Dt,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,d=[];u--;){var f=e[u];u&&t&&(f=Zt(f,$t(t))),l=bn(f.length,l),c[u]=!r&&(t||a>=120&&f.length>=120)?new Yn(u&&f):i}f=e[0];var h=-1,p=c[0];e:for(;++h<a&&d.length<l;){var v=f[h],m=t?t(v):v;if(v=r||0!==v?v:0,!(p?tn(p,m):o(d,m,r))){for(u=s;--u;){var g=c[u];if(!(g?tn(g,m):o(e[u],m,r)))continue e}p&&p.push(m),d.push(v)}}return d}function Nr(e,t,n){var r=null==(e=To(e,t=bi(t,e)))?e:e[Fo(Ko(t))];return null==r?i:At(r,e,n)}function _r(e){return ts(e)&&Er(e)==y}function Rr(e,t,n,r,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var s=Ha(e),u=Ha(t),c=s?b:vo(e),l=u?b:vo(t),d=(c=c==y?A:c)==A,f=(l=l==y?A:l)==A,h=c==l;if(h&&Ya(e)){if(!Ya(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new Qn),s||cs(e)?to(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case Z:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!o(new He(e),new He(t)));case w:case S:case x:return Pa(+e,+t);case I:return e.name==t.name&&e.message==t.message;case M:case _:return e==t+"";case E:var s=cn;case N:var u=1&r;if(s||(s=fn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=to(s(e),s(t),r,i,o,a);return a.delete(e),l;case R:if(Bn)return Bn.call(e)==Bn.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var p=d&&Ze.call(e,"__wrapped__"),v=f&&Ze.call(t,"__wrapped__");if(p||v){var m=p?e.value():e,g=v?t.value():t;return a||(a=new Qn),o(m,g,n,r,a)}}if(!h)return!1;return a||(a=new Qn),function(e,t,n,r,o,a){var s=1&n,u=ro(e),c=u.length,l=ro(t),d=l.length;if(c!=d&&!s)return!1;var f=c;for(;f--;){var h=u[f];if(!(s?h in t:Ze.call(t,h)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);var g=s;for(;++f<c;){var y=e[h=u[f]],b=t[h];if(r)var w=s?r(b,y,h,t,e,a):r(y,b,h,e,t,a);if(!(w===i?y===b||o(y,b,n,r,a):w)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var S=e.constructor,I=t.constructor;S==I||!("constructor"in e)||!("constructor"in t)||"function"==typeof S&&S instanceof S&&"function"==typeof I&&I instanceof I||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,r,o,a)}(e,t,n,r,Rr,o))}function Dr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=xe(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],d=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var f=new Qn;if(r)var h=r(l,d,c,e,t,f);if(!(h===i?Rr(d,l,3,r,f):h))return!1}}return!0}function Or(e){return!(!es(e)||(t=e,Fe&&Fe in t))&&(Xa(e)?je:ye).test(Bo(e));var t}function Zr(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Ha(e)?jr(e[0],e[1]):Pr(e):fu(e)}function Lr(e){if(!ko(e))return Pt(e);var t=[];for(var n in xe(e))Ze.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in xe(e))t.push(n);return t}(e);var t=ko(e),n=[];for(var r in e)("constructor"!=r||!t&&Ze.call(e,r))&&n.push(r);return n}function Br(e,t){return e<t}function Vr(e,t){var r=-1,i=za(e)?n(e.length):[];return fr(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Pr(e){var t=lo(e);return 1==t.length&&t[0][2]?xo(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function jr(e,t){return So(e)&&Eo(t)?xo(Fo(e),t):function(n){var r=xs(n,e);return r===i&&r===t?As(n,e):Rr(t,r,3)}}function Wr(e,t,n,r,o){e!==t&&yr(t,(function(a,s){if(o||(o=new Qn),es(a))!function(e,t,n,r,o,a,s){var u=Mo(e,n),c=Mo(t,n),l=s.get(c);if(l)return void er(e,n,l);var d=a?a(u,c,n+"",e,t,s):i,f=d===i;if(f){var h=Ha(c),p=!h&&Ya(c),v=!h&&!p&&cs(c);d=c,h||p||v?Ha(u)?d=u:qa(u)?d=Mi(u):p?(f=!1,d=Ci(c,!0)):v?(f=!1,d=Ei(c,!0)):d=[]:is(c)||Ua(c)?(d=u,Ua(u)?d=gs(u):es(u)&&!Xa(u)||(d=go(c))):f=!1}f&&(s.set(c,d),o(d,c,r,a,s),s.delete(c));er(e,n,d)}(e,t,s,n,Wr,r,o);else{var u=r?r(Mo(e,s),a,s+"",e,t,o):i;u===i&&(u=a),er(e,s,u)}}),Rs)}function Ur(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:i}function Hr(e,t,n){t=t.length?Zt(t,(function(e){return Ha(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e})):[ru];var r=-1;t=Zt(t,$t(uo()));var i=Vr(e,(function(e,n,i){var o=Zt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=xi(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Gr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Cr(e,a);n(s,a)&&$r(o,bi(a,e),s)}return o}function zr(e,t,n,r){var i=r?Ht:Ut,o=-1,a=t.length,s=e;for(e===t&&(t=Mi(t)),n&&(s=Zt(e,$t(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Qe.call(s,u,1),Qe.call(e,u,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Qe.call(e,i,1):di(e,i)}}return e}function Yr(e,t){return e+pt(In()*(t-e+1))}function Qr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Ro(Ao(e,t,ru),e+"")}function Xr(e){return Xn(Ps(e))}function Jr(e,t){var n=Ps(e);return Zo(n,sr(t,0,n.length))}function $r(e,t,n,r){if(!es(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Fo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var d=u[c];(l=r?r(d,c,u):i)===i&&(l=es(d)?d:bo(t[o+1])?[]:{})}tr(u,c,l),u=u[c]}return e}var ei=Nn?function(e,t){return Nn.set(e,t),e}:ru,ti=$e?function(e,t){return $e(e,"toString",{configurable:!0,enumerable:!1,value:eu(t),writable:!0})}:ru;function ni(e){return Zo(Ps(e))}function ri(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function ii(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!us(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ai(e,t,ru,n)}function ai(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,u=null===t,c=us(t),l=t===i;o<a;){var d=pt((o+a)/2),f=n(e[d]),h=f!==i,p=null===f,v=f===f,m=us(f);if(s)var g=r||v;else g=l?v&&(r||h):u?v&&h&&(r||!p):c?v&&h&&!p&&(r||!m):!p&&!m&&(r?f<=t:f<t);g?o=d+1:a=d}return bn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Pa(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ui(e){return"number"==typeof e?e:us(e)?v:+e}function ci(e){if("string"==typeof e)return e;if(Ha(e))return Zt(e,ci)+"";if(us(e))return Vn?Vn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function li(e,t,n){var r=-1,i=Dt,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Ot;else if(o>=200){var c=t?null:Qi(e);if(c)return fn(c);a=!1,i=tn,u=new Yn}else u=t?[]:s;e:for(;++r<o;){var l=e[r],d=t?t(l):l;if(l=n||0!==l?l:0,a&&d===d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(l)}else i(u,d,n)||(u!==s&&u.push(d),s.push(l))}return s}function di(e,t){return null==(e=To(e,t=bi(t,e)))||delete e[Fo(Ko(t))]}function fi(e,t,n,r){return $r(e,t,n(Cr(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Ft(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function vi(e,t,r){var i=e.length;if(i<2)return i?li(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=dr(a[o]||s,e[u],t,r));return li(gr(a,1),t,r)}function mi(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function gi(e){return qa(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function bi(e,t){return Ha(e)?e:So(e,t)?[e]:Lo(ys(e))}var wi=Kr;function Si(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ri(e,t,n)}var Ii=nt||function(e){return vt.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function ki(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Ei(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=us(e),s=t!==i,u=null===t,c=t===t,l=us(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ai(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=Yt(a-s,0),d=n(c+l),f=!i;++u<c;)d[u]=t[u];for(;++o<s;)(f||o<a)&&(d[r[o]]=e[o]);for(;l--;)d[u++]=e[o++];return d}function Ti(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,d=Yt(a-u,0),f=n(d+l),h=!i;++o<d;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++s<u;)(h||o<a)&&(f[p+r[s]]=e[o++]);return f}function Mi(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ni(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?or(n,u,c):tr(n,u,c)}return n}function _i(e,t){return function(n,r){var i=Ha(n)?Tt:rr,o=t?t():{};return i(n,e,uo(r,2),o)}}function Ri(e){return Kr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&wo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=xe(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Di(e,t){return function(n,r){if(null==n)return n;if(!za(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=xe(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Oi(e){return function(t,n,r){for(var i=-1,o=xe(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Zi(e){return function(t){var n=un(t=ys(t))?vn(t):i,r=n?n[0]:t.charAt(0),o=n?Si(n,1).join(""):t.slice(1);return r[e]()+o}}function Li(e){return function(t){return Ft(Xs(Us(t).replace(et,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=jn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Bi(e){return function(t,n,r){var o=xe(t);if(!za(t)){var a=uo(n,3);t=_s(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function Vi(e){return no((function(t){var n=t.length,r=n,a=Un.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Me(o);if(a&&!u&&"wrapper"==ao(s))var u=new Un([],!0)}for(r=u?r:n;++r<n;){var c=ao(s=t[r]),l="wrapper"==c?oo(s):i;u=l&&Io(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[ao(l[0])].apply(u,l[3]):1==s.length&&Io(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ha(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Pi(e,t,r,o,a,s,u,c,l,f){var h=t&d,p=1&t,v=2&t,m=24&t,g=512&t,y=v?i:Fi(e);return function d(){for(var b=arguments.length,w=n(b),S=b;S--;)w[S]=arguments[S];if(m)var I=so(d),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,I);if(o&&(w=Ai(w,o,a,m)),s&&(w=Ti(w,s,u,m)),b-=C,m&&b<f){var k=dn(w,I);return qi(e,t,Pi,d.placeholder,r,w,k,c,l,f-b)}var E=p?r:this,x=v?E[e]:e;return b=w.length,c?w=function(e,t){var n=e.length,r=bn(t.length,n),o=Mi(e);for(;r--;){var a=t[r];e[r]=bo(a,n)?o[a]:i}return e}(w,c):g&&b>1&&w.reverse(),h&&l<b&&(w.length=l),this&&this!==vt&&this instanceof d&&(x=y||Fi(x)),x.apply(E,w)}}function ji(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Wi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=ui(n),r=ui(r)),o=e(n,r)}return o}}function Ui(e){return no((function(t){return t=Zt(t,$t(uo())),Kr((function(n){var r=this;return e(t,(function(e){return At(e,r,n)}))}))}))}function Hi(e,t){var n=(t=t===i?" ":ci(t)).length;if(n<2)return n?Qr(t,e):t;var r=Qr(t,ht(e/pn(t)));return un(t)?Si(vn(r),0,e).join(""):r.slice(0,e)}function Gi(e){return function(t,r,o){return o&&"number"!=typeof o&&wo(t,r,o)&&(r=o=i),t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r,i){for(var o=-1,a=Yt(ht((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:hs(o),e)}}function zi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function qi(e,t,n,r,o,a,s,u,d,f){var h=8&t;t|=h?c:l,4&(t&=~(h?l:c))||(t&=-4);var p=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,u,d,f],v=n.apply(i,p);return Io(e)&&No(v,p),v.placeholder=r,Do(v,e,t)}function Yi(e){var t=Ee[e];return function(e,n){if(e=ms(e),(n=null==n?0:bn(ps(n),292))&&bt(e)){var r=(ys(e)+"e").split("e");return+((r=(ys(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Qi=An&&1/fn(new An([,-0]))[1]==h?function(e){return new An(e)}:uu;function Ki(e){return function(t){var n=vo(t);return n==E?cn(t):n==N?hn(t):function(e,t){return Zt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,r,a,h,p,v,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Me(o);var y=a?a.length:0;if(y||(t&=-97,a=h=i),v=v===i?v:Yt(ps(v),0),m=m===i?m:ps(m),y-=h?h.length:0,t&l){var b=a,w=h;a=h=i}var S=g?i:oo(e),I=[e,t,r,a,h,b,w,p,v,m];if(S&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==d&&8==n||r==d&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ai(c,u,t[4]):u,e[4]=c?dn(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Ti(c,u,t[6]):u,e[6]=c?dn(e[5],s):t[6]);(u=t[7])&&(e[7]=u);r&d&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(I,S),e=I[0],t=I[1],r=I[2],a=I[3],h=I[4],!(m=I[9]=I[9]===i?g?0:e.length:Yt(I[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)C=8==t||t==u?function(e,t,r){var o=Fi(e);return function a(){for(var s=arguments.length,u=n(s),c=s,l=so(a);c--;)u[c]=arguments[c];var d=s<3&&u[0]!==l&&u[s-1]!==l?[]:dn(u,l);return(s-=d.length)<r?qi(e,t,Pi,a.placeholder,i,u,d,i,i,r-s):At(this&&this!==vt&&this instanceof a?o:e,this,u)}}(e,t,m):t!=c&&33!=t||h.length?Pi.apply(i,I):function(e,t,r,i){var o=1&t,a=Fi(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,d=n(l+u),f=this&&this!==vt&&this instanceof t?a:e;++c<l;)d[c]=i[c];for(;u--;)d[c++]=arguments[++s];return At(f,o?r:this,d)}}(e,t,r,a);else var C=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==vt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return Do((S?ei:No)(C,I),e,t)}function Ji(e,t,n,r){return e===i||Pa(e,Re[n])&&!Ze.call(r,n)?t:e}function $i(e,t,n,r,o,a){return es(e)&&es(t)&&(a.set(t,e),Wr(e,t,i,$i,a),a.delete(t)),e}function eo(e){return is(e)?i:e}function to(e,t,n,r,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var f=-1,h=!0,p=2&n?new Yn:i;for(a.set(e,t),a.set(t,e);++f<u;){var v=e[f],m=t[f];if(r)var g=s?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(g!==i){if(g)continue;h=!1;break}if(p){if(!Vt(t,(function(e,t){if(!tn(p,t)&&(v===e||o(v,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(v!==m&&!o(v,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function no(e){return Ro(Ao(e,i,Go),e+"")}function ro(e){return kr(e,_s,ho)}function io(e){return kr(e,Rs,po)}var oo=Nn?function(e){return Nn.get(e)}:uu;function ao(e){for(var t=e.name+"",n=_n[t],r=Ze.call(_n,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Ze.call(Pn,"placeholder")?Pn:e).placeholder}function uo(){var e=Pn.iteratee||iu;return e=e===iu?Zr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function lo(e){for(var t=_s(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Eo(i)]}return t}function fo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Or(n)?n:i}var ho=mt?function(e){return null==e?[]:(e=xe(e),Rt(mt(e),(function(t){return Ye.call(e,t)})))}:vu,po=mt?function(e){for(var t=[];e;)Lt(t,ho(e)),e=ze(e);return t}:vu,vo=Er;function mo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Fo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&$a(i)&&bo(a,i)&&(Ha(e)||Ua(e))}function go(e){return"function"!=typeof e.constructor||ko(e)?{}:jn(ze(e))}function yo(e){return Ha(e)||Ua(e)||!!(Ke&&e&&e[Ke])}function bo(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?za(n)&&bo(t,n.length):"string"==r&&t in n)&&Pa(n[t],e)}function So(e,t){if(Ha(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!us(e))||(ne.test(e)||!te.test(e)||null!=t&&e in xe(t))}function Io(e){var t=ao(e),n=Pn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=oo(n);return!!r&&e===r[0]}(kn&&vo(new kn(new ArrayBuffer(1)))!=Z||En&&vo(new En)!=E||xn&&vo(xn.resolve())!=T||An&&vo(new An)!=N||Tn&&vo(new Tn)!=D)&&(vo=function(e){var t=Er(e),n=t==A?e.constructor:i,r=n?Bo(n):"";if(r)switch(r){case Rn:return Z;case Dn:return E;case On:return T;case Zn:return N;case Ln:return D}return t});var Co=De?Xa:mu;function ko(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Eo(e){return e===e&&!es(e)}function xo(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in xe(n)))}}function Ao(e,t,r){return t=Yt(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=Yt(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),At(e,this,u)}}function To(e,t){return t.length<2?e:Cr(e,ri(t,0,-1))}function Mo(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var No=Oo(ei),_o=lt||function(e,t){return vt.setTimeout(e,t)},Ro=Oo(ti);function Do(e,t,n){var r=t+"";return Ro(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Mt(g,(function(n){var r="_."+n[0];t&n[1]&&!Dt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(r),n)))}function Oo(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Zo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=Yr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Lo=function(e){var t=Oa(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function Fo(e){if("string"==typeof e||us(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bo(e){if(null!=e){try{return Oe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Vo(e){if(e instanceof Hn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Mi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Po=Kr((function(e,t){return qa(e)?dr(e,gr(t,1,qa,!0)):[]})),jo=Kr((function(e,t){var n=Ko(t);return qa(n)&&(n=i),qa(e)?dr(e,gr(t,1,qa,!0),uo(n,2)):[]})),Wo=Kr((function(e,t){var n=Ko(t);return qa(n)&&(n=i),qa(e)?dr(e,gr(t,1,qa,!0),i,n):[]}));function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=Yt(r+i,0)),Wt(e,uo(t,3),i)}function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ps(n),o=n<0?Yt(r+o,0):bn(o,r-1)),Wt(e,uo(t,3),o,!0)}function Go(e){return(null==e?0:e.length)?gr(e,1):[]}function zo(e){return e&&e.length?e[0]:i}var qo=Kr((function(e){var t=Zt(e,gi);return t.length&&t[0]===e[0]?Mr(t):[]})),Yo=Kr((function(e){var t=Ko(e),n=Zt(e,gi);return t===Ko(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Mr(n,uo(t,2)):[]})),Qo=Kr((function(e){var t=Ko(e),n=Zt(e,gi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Mr(n,i,t):[]}));function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Kr(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?zr(e,t):e}var $o=no((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return qr(e,Zt(t,(function(e){return bo(e,n)?+e:e})).sort(xi)),r}));function ea(e){return null==e?e:Cn.call(e)}var ta=Kr((function(e){return li(gr(e,1,qa,!0))})),na=Kr((function(e){var t=Ko(e);return qa(t)&&(t=i),li(gr(e,1,qa,!0),uo(t,2))})),ra=Kr((function(e){var t=Ko(e);return t="function"==typeof t?t:i,li(gr(e,1,qa,!0),i,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(qa(e))return t=Yt(e.length,t),!0})),Xt(t,(function(t){return Zt(e,qt(t))}))}function oa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Zt(n,(function(e){return At(t,i,e)}))}var aa=Kr((function(e,t){return qa(e)?dr(e,t):[]})),sa=Kr((function(e){return vi(Rt(e,qa))})),ua=Kr((function(e){var t=Ko(e);return qa(t)&&(t=i),vi(Rt(e,qa),uo(t,2))})),ca=Kr((function(e){var t=Ko(e);return t="function"==typeof t?t:i,vi(Rt(e,qa),i,t)})),la=Kr(ia);var da=Kr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,oa(e,n)}));function fa(e){var t=Pn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var pa=no((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Hn&&bo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Un(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var va=_i((function(e,t,n){Ze.call(e,n)?++e[n]:or(e,n,1)}));var ma=Bi(Uo),ga=Bi(Ho);function ya(e,t){return(Ha(e)?Mt:fr)(e,uo(t,3))}function ba(e,t){return(Ha(e)?Nt:hr)(e,uo(t,3))}var wa=_i((function(e,t,n){Ze.call(e,n)?e[n].push(t):or(e,n,[t])}));var Sa=Kr((function(e,t,r){var i=-1,o="function"==typeof t,a=za(e)?n(e.length):[];return fr(e,(function(e){a[++i]=o?At(t,e,r):Nr(e,t,r)})),a})),Ia=_i((function(e,t,n){or(e,n,t)}));function Ca(e,t){return(Ha(e)?Zt:Vr)(e,uo(t,3))}var ka=_i((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ea=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,gr(t,1),[])})),xa=it||function(){return vt.Date.now()};function Aa(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,d,i,i,i,i,t)}function Ta(e,t){var n;if("function"!=typeof t)throw new Me(o);return e=ps(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ma=Kr((function(e,t,n){var r=1;if(n.length){var i=dn(n,so(Ma));r|=c}return Xi(e,r,t,n,i)})),Na=Kr((function(e,t,n){var r=3;if(n.length){var i=dn(n,so(Na));r|=c}return Xi(t,r,e,n,i)}));function _a(e,t,n){var r,a,s,u,c,l,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new Me(o);function v(t){var n=r,o=a;return r=a=i,d=t,u=e.apply(o,n)}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-d>=s}function g(){var e=xa();if(m(e))return y(e);c=_o(g,function(e){var n=t-(e-l);return h?bn(n,s-(e-d)):n}(e))}function y(e){return c=i,p&&r?v(e):(r=a=i,u)}function b(){var e=xa(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===i)return function(e){return d=e,c=_o(g,t),f?v(e):u}(l);if(h)return Ii(c),c=_o(g,t),v(l)}return c===i&&(c=_o(g,t)),u}return t=ms(t)||0,es(n)&&(f=!!n.leading,s=(h="maxWait"in n)?Yt(ms(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==i&&Ii(c),d=0,r=l=a=c=i},b.flush=function(){return c===i?u:y(xa())},b}var Ra=Kr((function(e,t){return lr(e,1,t)})),Da=Kr((function(e,t,n){return lr(e,ms(t)||0,n)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Me(o);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Oa.Cache||qn),n}function Za(e){if("function"!=typeof e)throw new Me(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=qn;var La=wi((function(e,t){var n=(t=1==t.length&&Ha(t[0])?Zt(t[0],$t(uo())):Zt(gr(t,1),$t(uo()))).length;return Kr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return At(e,this,r)}))})),Fa=Kr((function(e,t){var n=dn(t,so(Fa));return Xi(e,c,i,t,n)})),Ba=Kr((function(e,t){var n=dn(t,so(Ba));return Xi(e,l,i,t,n)})),Va=no((function(e,t){return Xi(e,f,i,i,i,t)}));function Pa(e,t){return e===t||e!==e&&t!==t}var ja=zi(xr),Wa=zi((function(e,t){return e>=t})),Ua=_r(function(){return arguments}())?_r:function(e){return ts(e)&&Ze.call(e,"callee")&&!Ye.call(e,"callee")},Ha=n.isArray,Ga=St?$t(St):function(e){return ts(e)&&Er(e)==O};function za(e){return null!=e&&$a(e.length)&&!Xa(e)}function qa(e){return ts(e)&&za(e)}var Ya=gt||mu,Qa=It?$t(It):function(e){return ts(e)&&Er(e)==S};function Ka(e){if(!ts(e))return!1;var t=Er(e);return t==I||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Xa(e){if(!es(e))return!1;var t=Er(e);return t==C||t==k||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ps(e)}function $a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=Ct?$t(Ct):function(e){return ts(e)&&vo(e)==E};function rs(e){return"number"==typeof e||ts(e)&&Er(e)==x}function is(e){if(!ts(e)||Er(e)!=A)return!1;var t=ze(e);if(null===t)return!0;var n=Ze.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Ve}var os=kt?$t(kt):function(e){return ts(e)&&Er(e)==M};var as=Et?$t(Et):function(e){return ts(e)&&vo(e)==N};function ss(e){return"string"==typeof e||!Ha(e)&&ts(e)&&Er(e)==_}function us(e){return"symbol"==typeof e||ts(e)&&Er(e)==R}var cs=xt?$t(xt):function(e){return ts(e)&&$a(e.length)&&!!ut[Er(e)]};var ls=zi(Br),ds=zi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(za(e))return ss(e)?vn(e):Mi(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=vo(e);return(t==E?cn:t==N?fn:Ps)(e)}function hs(e){return e?(e=ms(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ps(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function vs(e){return e?sr(ps(e),0,m):0}function ms(e){if("number"==typeof e)return e;if(us(e))return v;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=ge.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):me.test(e)?v:+e}function gs(e){return Ni(e,Rs(e))}function ys(e){return null==e?"":ci(e)}var bs=Ri((function(e,t){if(ko(t)||za(t))Ni(t,_s(t),e);else for(var n in t)Ze.call(t,n)&&tr(e,n,t[n])})),ws=Ri((function(e,t){Ni(t,Rs(t),e)})),Ss=Ri((function(e,t,n,r){Ni(t,Rs(t),e,r)})),Is=Ri((function(e,t,n,r){Ni(t,_s(t),e,r)})),Cs=no(ar);var ks=Kr((function(e,t){e=xe(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&wo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Rs(a),u=-1,c=s.length;++u<c;){var l=s[u],d=e[l];(d===i||Pa(d,Re[l])&&!Ze.call(e,l))&&(e[l]=a[l])}return e})),Es=Kr((function(e){return e.push(i,$i),At(Os,i,e)}));function xs(e,t,n){var r=null==e?i:Cr(e,t);return r===i?n:r}function As(e,t){return null!=e&&mo(e,t,Tr)}var Ts=ji((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),e[t]=n}),eu(ru)),Ms=ji((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),Ze.call(e,t)?e[t].push(n):e[t]=[n]}),uo),Ns=Kr(Nr);function _s(e){return za(e)?Kn(e):Lr(e)}function Rs(e){return za(e)?Kn(e,!0):Fr(e)}var Ds=Ri((function(e,t,n){Wr(e,t,n)})),Os=Ri((function(e,t,n,r){Wr(e,t,n,r)})),Zs=no((function(e,t){var n={};if(null==e)return n;var r=!1;t=Zt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ni(e,io(e),n),r&&(n=ur(n,7,eo));for(var i=t.length;i--;)di(n,t[i]);return n}));var Ls=no((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return As(e,n)}))}(e,t)}));function Fs(e,t){if(null==e)return{};var n=Zt(io(e),(function(e){return[e]}));return t=uo(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var Bs=Ki(_s),Vs=Ki(Rs);function Ps(e){return null==e?[]:en(e,_s(e))}var js=Li((function(e,t,n){return t=t.toLowerCase(),e+(n?Ws(t):t)}));function Ws(e){return Ks(ys(e).toLowerCase())}function Us(e){return(e=ys(e))&&e.replace(Se,on).replace(tt,"")}var Hs=Li((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=Li((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),zs=Zi("toLowerCase");var qs=Li((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ys=Li((function(e,t,n){return e+(n?" ":"")+Ks(t)}));var Qs=Li((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ks=Zi("toUpperCase");function Xs(e,t,n){return e=ys(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Js=Kr((function(e,t){try{return At(e,i,t)}catch(n){return Ka(n)?n:new se(n)}})),$s=no((function(e,t){return Mt(t,(function(t){t=Fo(t),or(e,t,Ma(e[t],e))})),e}));function eu(e){return function(){return e}}var tu=Vi(),nu=Vi(!0);function ru(e){return e}function iu(e){return Zr("function"==typeof e?e:ur(e,1))}var ou=Kr((function(e,t){return function(n){return Nr(n,e,t)}})),au=Kr((function(e,t){return function(n){return Nr(e,n,t)}}));function su(e,t,n){var r=_s(t),i=Ir(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Ir(t,_s(t)));var o=!(es(n)&&"chain"in n)||!!n.chain,a=Xa(e);return Mt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Mi(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function uu(){}var cu=Ui(Zt),lu=Ui(_t),du=Ui(Vt);function fu(e){return So(e)?qt(Fo(e)):function(e){return function(t){return Cr(t,e)}}(e)}var hu=Gi(),pu=Gi(!0);function vu(){return[]}function mu(){return!1}var gu=Wi((function(e,t){return e+t}),0),yu=Yi("ceil"),bu=Wi((function(e,t){return e/t}),1),wu=Yi("floor");var Su=Wi((function(e,t){return e*t}),1),Iu=Yi("round"),Cu=Wi((function(e,t){return e-t}),0);return Pn.after=function(e,t){if("function"!=typeof t)throw new Me(o);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=Aa,Pn.assign=bs,Pn.assignIn=ws,Pn.assignInWith=Ss,Pn.assignWith=Is,Pn.at=Cs,Pn.before=Ta,Pn.bind=Ma,Pn.bindAll=$s,Pn.bindKey=Na,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ha(e)?e:[e]},Pn.chain=fa,Pn.chunk=function(e,t,r){t=(r?wo(e,t,r):t===i)?1:Yt(ps(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=n(ht(o/t));a<o;)u[s++]=ri(e,a,a+=t);return u},Pn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Pn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Lt(Ha(r)?Mi(r):[r],gr(t,1))},Pn.cond=function(e){var t=null==e?0:e.length,n=uo();return e=t?Zt(e,(function(e){if("function"!=typeof e[1])throw new Me(o);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var i=e[r];if(At(i[0],this,n))return At(i[1],this,n)}}))},Pn.conforms=function(e){return function(e){var t=_s(e);return function(n){return cr(n,e,t)}}(ur(e,1))},Pn.constant=eu,Pn.countBy=va,Pn.create=function(e,t){var n=jn(e);return null==t?n:ir(n,t)},Pn.curry=function e(t,n,r){var o=Xi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Pn.curryRight=function e(t,n,r){var o=Xi(t,u,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Pn.debounce=_a,Pn.defaults=ks,Pn.defaultsDeep=Es,Pn.defer=Ra,Pn.delay=Da,Pn.difference=Po,Pn.differenceBy=jo,Pn.differenceWith=Wo,Pn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=n||t===i?1:ps(t))<0?0:t,r):[]},Pn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,0,(t=r-(t=n||t===i?1:ps(t)))<0?0:t):[]},Pn.dropRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0,!0):[]},Pn.dropWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0):[]},Pn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ps(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ps(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Pn.filter=function(e,t){return(Ha(e)?Rt:mr)(e,uo(t,3))},Pn.flatMap=function(e,t){return gr(Ca(e,t),1)},Pn.flatMapDeep=function(e,t){return gr(Ca(e,t),h)},Pn.flatMapDepth=function(e,t,n){return n=n===i?1:ps(n),gr(Ca(e,t),n)},Pn.flatten=Go,Pn.flattenDeep=function(e){return(null==e?0:e.length)?gr(e,h):[]},Pn.flattenDepth=function(e,t){return(null==e?0:e.length)?gr(e,t=t===i?1:ps(t)):[]},Pn.flip=function(e){return Xi(e,512)},Pn.flow=tu,Pn.flowRight=nu,Pn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Pn.functions=function(e){return null==e?[]:Ir(e,_s(e))},Pn.functionsIn=function(e){return null==e?[]:Ir(e,Rs(e))},Pn.groupBy=wa,Pn.initial=function(e){return(null==e?0:e.length)?ri(e,0,-1):[]},Pn.intersection=qo,Pn.intersectionBy=Yo,Pn.intersectionWith=Qo,Pn.invert=Ts,Pn.invertBy=Ms,Pn.invokeMap=Sa,Pn.iteratee=iu,Pn.keyBy=Ia,Pn.keys=_s,Pn.keysIn=Rs,Pn.map=Ca,Pn.mapKeys=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,t(e,r,i),e)})),n},Pn.mapValues=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,r,t(e,r,i))})),n},Pn.matches=function(e){return Pr(ur(e,1))},Pn.matchesProperty=function(e,t){return jr(e,ur(t,1))},Pn.memoize=Oa,Pn.merge=Ds,Pn.mergeWith=Os,Pn.method=ou,Pn.methodOf=au,Pn.mixin=su,Pn.negate=Za,Pn.nthArg=function(e){return e=ps(e),Kr((function(t){return Ur(t,e)}))},Pn.omit=Zs,Pn.omitBy=function(e,t){return Fs(e,Za(uo(t)))},Pn.once=function(e){return Ta(2,e)},Pn.orderBy=function(e,t,n,r){return null==e?[]:(Ha(t)||(t=null==t?[]:[t]),Ha(n=r?i:n)||(n=null==n?[]:[n]),Hr(e,t,n))},Pn.over=cu,Pn.overArgs=La,Pn.overEvery=lu,Pn.overSome=du,Pn.partial=Fa,Pn.partialRight=Ba,Pn.partition=ka,Pn.pick=Ls,Pn.pickBy=Fs,Pn.property=fu,Pn.propertyOf=function(e){return function(t){return null==e?i:Cr(e,t)}},Pn.pull=Xo,Pn.pullAll=Jo,Pn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,uo(n,2)):e},Pn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,i,n):e},Pn.pullAt=$o,Pn.range=hu,Pn.rangeRight=pu,Pn.rearg=Va,Pn.reject=function(e,t){return(Ha(e)?Rt:mr)(e,Za(uo(t,3)))},Pn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=uo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return qr(e,i),n},Pn.rest=function(e,t){if("function"!=typeof e)throw new Me(o);return Kr(e,t=t===i?t:ps(t))},Pn.reverse=ea,Pn.sampleSize=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),(Ha(e)?Jn:Jr)(e,t)},Pn.set=function(e,t,n){return null==e?e:$r(e,t,n)},Pn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:$r(e,t,n,r)},Pn.shuffle=function(e){return(Ha(e)?$n:ni)(e)},Pn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&wo(e,t,n)?(t=0,n=r):(t=null==t?0:ps(t),n=n===i?r:ps(n)),ri(e,t,n)):[]},Pn.sortBy=Ea,Pn.sortedUniq=function(e){return e&&e.length?si(e):[]},Pn.sortedUniqBy=function(e,t){return e&&e.length?si(e,uo(t,2)):[]},Pn.split=function(e,t,n){return n&&"number"!=typeof n&&wo(e,t,n)&&(t=n=i),(n=n===i?m:n>>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ci(t))&&un(e)?Si(vn(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new Me(o);return t=null==t?0:Yt(ps(t),0),Kr((function(n){var r=n[t],i=Si(n,0,t);return r&&Lt(i,r),At(e,this,i)}))},Pn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:ps(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:ps(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?hi(e,uo(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Me(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_a(e,t,{leading:r,maxWait:t,trailing:i})},Pn.thru=ha,Pn.toArray=fs,Pn.toPairs=Bs,Pn.toPairsIn=Vs,Pn.toPath=function(e){return Ha(e)?Zt(e,Fo):us(e)?[e]:Mi(Lo(ys(e)))},Pn.toPlainObject=gs,Pn.transform=function(e,t,n){var r=Ha(e),i=r||Ya(e)||cs(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Xa(o)?jn(ze(e)):{}}return(i?Mt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Pn.unary=function(e){return Aa(e,1)},Pn.union=ta,Pn.unionBy=na,Pn.unionWith=ra,Pn.uniq=function(e){return e&&e.length?li(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?li(e,uo(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?li(e,i,t):[]},Pn.unset=function(e,t){return null==e||di(e,t)},Pn.unzip=ia,Pn.unzipWith=oa,Pn.update=function(e,t,n){return null==e?e:fi(e,t,yi(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:fi(e,t,yi(n),r)},Pn.values=Ps,Pn.valuesIn=function(e){return null==e?[]:en(e,Rs(e))},Pn.without=aa,Pn.words=Xs,Pn.wrap=function(e,t){return Fa(yi(t),e)},Pn.xor=sa,Pn.xorBy=ua,Pn.xorWith=ca,Pn.zip=la,Pn.zipObject=function(e,t){return mi(e||[],t||[],tr)},Pn.zipObjectDeep=function(e,t){return mi(e||[],t||[],$r)},Pn.zipWith=da,Pn.entries=Bs,Pn.entriesIn=Vs,Pn.extend=ws,Pn.extendWith=Ss,su(Pn,Pn),Pn.add=gu,Pn.attempt=Js,Pn.camelCase=js,Pn.capitalize=Ws,Pn.ceil=yu,Pn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ms(n))===n?n:0),t!==i&&(t=(t=ms(t))===t?t:0),sr(ms(e),t,n)},Pn.clone=function(e){return ur(e,4)},Pn.cloneDeep=function(e){return ur(e,5)},Pn.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:i)},Pn.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:i)},Pn.conformsTo=function(e,t){return null==t||cr(e,t,_s(t))},Pn.deburr=Us,Pn.defaultTo=function(e,t){return null==e||e!==e?t:e},Pn.divide=bu,Pn.endsWith=function(e,t,n){e=ys(e),t=ci(t);var r=e.length,o=n=n===i?r:sr(ps(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Pn.eq=Pa,Pn.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(Q,an):e},Pn.escapeRegExp=function(e){return(e=ys(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Pn.every=function(e,t,n){var r=Ha(e)?_t:pr;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Pn.find=ma,Pn.findIndex=Uo,Pn.findKey=function(e,t){return jt(e,uo(t,3),wr)},Pn.findLast=ga,Pn.findLastIndex=Ho,Pn.findLastKey=function(e,t){return jt(e,uo(t,3),Sr)},Pn.floor=wu,Pn.forEach=ya,Pn.forEachRight=ba,Pn.forIn=function(e,t){return null==e?e:yr(e,uo(t,3),Rs)},Pn.forInRight=function(e,t){return null==e?e:br(e,uo(t,3),Rs)},Pn.forOwn=function(e,t){return e&&wr(e,uo(t,3))},Pn.forOwnRight=function(e,t){return e&&Sr(e,uo(t,3))},Pn.get=xs,Pn.gt=ja,Pn.gte=Wa,Pn.has=function(e,t){return null!=e&&mo(e,t,Ar)},Pn.hasIn=As,Pn.head=zo,Pn.identity=ru,Pn.includes=function(e,t,n,r){e=za(e)?e:Ps(e),n=n&&!r?ps(n):0;var i=e.length;return n<0&&(n=Yt(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Pn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=Yt(r+i,0)),Ut(e,t,i)},Pn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e<Yt(t,n)}(e=ms(e),t,n)},Pn.invoke=Ns,Pn.isArguments=Ua,Pn.isArray=Ha,Pn.isArrayBuffer=Ga,Pn.isArrayLike=za,Pn.isArrayLikeObject=qa,Pn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Er(e)==w},Pn.isBuffer=Ya,Pn.isDate=Qa,Pn.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},Pn.isEmpty=function(e){if(null==e)return!0;if(za(e)&&(Ha(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||cs(e)||Ua(e)))return!e.length;var t=vo(e);if(t==E||t==N)return!e.size;if(ko(e))return!Lr(e).length;for(var n in e)if(Ze.call(e,n))return!1;return!0},Pn.isEqual=function(e,t){return Rr(e,t)},Pn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Rr(e,t,i,n):!!r},Pn.isError=Ka,Pn.isFinite=function(e){return"number"==typeof e&&bt(e)},Pn.isFunction=Xa,Pn.isInteger=Ja,Pn.isLength=$a,Pn.isMap=ns,Pn.isMatch=function(e,t){return e===t||Dr(e,t,lo(t))},Pn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Dr(e,t,lo(t),n)},Pn.isNaN=function(e){return rs(e)&&e!=+e},Pn.isNative=function(e){if(Co(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(e)},Pn.isNil=function(e){return null==e},Pn.isNull=function(e){return null===e},Pn.isNumber=rs,Pn.isObject=es,Pn.isObjectLike=ts,Pn.isPlainObject=is,Pn.isRegExp=os,Pn.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=p},Pn.isSet=as,Pn.isString=ss,Pn.isSymbol=us,Pn.isTypedArray=cs,Pn.isUndefined=function(e){return e===i},Pn.isWeakMap=function(e){return ts(e)&&vo(e)==D},Pn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Er(e)},Pn.join=function(e,t){return null==e?"":wt.call(e,t)},Pn.kebabCase=Hs,Pn.last=Ko,Pn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ps(n))<0?Yt(r+o,0):bn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Wt(e,Gt,o,!0)},Pn.lowerCase=Gs,Pn.lowerFirst=zs,Pn.lt=ls,Pn.lte=ds,Pn.max=function(e){return e&&e.length?vr(e,ru,xr):i},Pn.maxBy=function(e,t){return e&&e.length?vr(e,uo(t,2),xr):i},Pn.mean=function(e){return zt(e,ru)},Pn.meanBy=function(e,t){return zt(e,uo(t,2))},Pn.min=function(e){return e&&e.length?vr(e,ru,Br):i},Pn.minBy=function(e,t){return e&&e.length?vr(e,uo(t,2),Br):i},Pn.stubArray=vu,Pn.stubFalse=mu,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=Su,Pn.nth=function(e,t){return e&&e.length?Ur(e,ps(t)):i},Pn.noConflict=function(){return vt._===this&&(vt._=Pe),this},Pn.noop=uu,Pn.now=xa,Pn.pad=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Hi(pt(i),n)+e+Hi(ht(i),n)},Pn.padEnd=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?e+Hi(t-r,n):e},Pn.padStart=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?Hi(t-r,n)+e:e},Pn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Sn(ys(e).replace(ae,""),t||0)},Pn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&wo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=In();return bn(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return Yr(e,t)},Pn.reduce=function(e,t,n){var r=Ha(e)?Ft:Qt,i=arguments.length<3;return r(e,uo(t,4),n,i,fr)},Pn.reduceRight=function(e,t,n){var r=Ha(e)?Bt:Qt,i=arguments.length<3;return r(e,uo(t,4),n,i,hr)},Pn.repeat=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),Qr(ys(e),t)},Pn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.result=function(e,t,n){var r=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Fo(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Pn.round=Iu,Pn.runInContext=e,Pn.sample=function(e){return(Ha(e)?Xn:Xr)(e)},Pn.size=function(e){if(null==e)return 0;if(za(e))return ss(e)?pn(e):e.length;var t=vo(e);return t==E||t==N?e.size:Lr(e).length},Pn.snakeCase=qs,Pn.some=function(e,t,n){var r=Ha(e)?Vt:ii;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Pn.sortedIndex=function(e,t){return oi(e,t)},Pn.sortedIndexBy=function(e,t,n){return ai(e,t,uo(n,2))},Pn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Pa(e[r],t))return r}return-1},Pn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Pn.sortedLastIndexBy=function(e,t,n){return ai(e,t,uo(n,2),!0)},Pn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Pa(e[n],t))return n}return-1},Pn.startCase=Ys,Pn.startsWith=function(e,t,n){return e=ys(e),n=null==n?0:sr(ps(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Pn.subtract=Cu,Pn.sum=function(e){return e&&e.length?Kt(e,ru):0},Pn.sumBy=function(e,t){return e&&e.length?Kt(e,uo(t,2)):0},Pn.template=function(e,t,n){var r=Pn.templateSettings;n&&wo(e,t,n)&&(t=i),e=ys(e),t=Ss({},t,r,Ji);var o,a,s=Ss({},t.imports,r.imports,Ji),u=_s(s),c=en(s,u),l=0,d=t.interpolate||Ie,f="__p += '",h=Ae((t.escape||Ie).source+"|"+d.source+"|"+(d===ee?pe:Ie).source+"|"+(t.evaluate||Ie).source+"|$","g"),p="//# sourceURL="+(Ze.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(h,(function(t,n,r,i,s,u){return r||(r=i),f+=e.slice(l,u).replace(Ce,sn),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),f+="';\n";var v=Ze.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(G,""):f).replace(z,"$1").replace(q,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Js((function(){return ke(u,p+"return "+f).apply(i,c)}));if(m.source=f,Ka(m))throw m;return m},Pn.times=function(e,t){if((e=ps(e))<1||e>p)return[];var n=m,r=bn(e,m);t=uo(t),e-=m;for(var i=Xt(r,t);++n<e;)t(n);return i},Pn.toFinite=hs,Pn.toInteger=ps,Pn.toLength=vs,Pn.toLower=function(e){return ys(e).toLowerCase()},Pn.toNumber=ms,Pn.toSafeInteger=function(e){return e?sr(ps(e),-9007199254740991,p):0===e?e:0},Pn.toString=ys,Pn.toUpper=function(e){return ys(e).toUpperCase()},Pn.trim=function(e,t,n){if((e=ys(e))&&(n||t===i))return Jt(e);if(!e||!(t=ci(t)))return e;var r=vn(e),o=vn(t);return Si(r,nn(r,o),rn(r,o)+1).join("")},Pn.trimEnd=function(e,t,n){if((e=ys(e))&&(n||t===i))return e.slice(0,mn(e)+1);if(!e||!(t=ci(t)))return e;var r=vn(e);return Si(r,0,rn(r,vn(t))+1).join("")},Pn.trimStart=function(e,t,n){if((e=ys(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=ci(t)))return e;var r=vn(e);return Si(r,nn(r,vn(t))).join("")},Pn.truncate=function(e,t){var n=30,r="...";if(es(t)){var o="separator"in t?t.separator:o;n="length"in t?ps(t.length):n,r="omission"in t?ci(t.omission):r}var a=(e=ys(e)).length;if(un(e)){var s=vn(e);a=s.length}if(n>=a)return e;var u=n-pn(r);if(u<1)return r;var c=s?Si(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),os(o)){if(e.slice(u).search(o)){var l,d=c;for(o.global||(o=Ae(o.source,ys(ve.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(e.indexOf(ci(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Pn.unescape=function(e){return(e=ys(e))&&K.test(e)?e.replace(Y,gn):e},Pn.uniqueId=function(e){var t=++Le;return ys(e)+t},Pn.upperCase=Qs,Pn.upperFirst=Ks,Pn.each=ya,Pn.eachRight=ba,Pn.first=zo,su(Pn,function(){var e={};return wr(Pn,(function(t,n){Ze.call(Pn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Pn.VERSION="4.17.21",Mt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Pn[e].placeholder=Pn})),Mt(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===i?1:Yt(ps(n),0);var r=this.__filtered__&&!t?new Hn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Mt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Mt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),Mt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(ru)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Nr(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter(Za(uo(e)))},Hn.prototype.slice=function(e,t){e=ps(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ps(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(m)},wr(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Pn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Pn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Hn,c=s[0],l=u||Ha(t),d=function(e){var t=o.apply(Pn,Lt([e],s));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,v=u&&!h;if(!a&&l){t=v?t:new Hn(this);var m=e.apply(t,s);return m.__actions__.push({func:ha,args:[d],thisArg:i}),new Un(m,f)}return p&&v?e.apply(this,s):(m=this.thru(d),p?r?m.value()[0]:m.value():m)})})),Mt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ne[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ha(i)?i:[],e)}return this[n]((function(n){return t.apply(Ha(n)?n:[],e)}))}})),wr(Hn.prototype,(function(e,t){var n=Pn[t];if(n){var r=n.name+"";Ze.call(_n,r)||(_n[r]=[]),_n[r].push({name:t,func:n})}})),_n[Pi(i,2).name]=[{name:"wrapper",func:i}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Mi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mi(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ha(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=Yt(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,d=l.length,f=0,h=bn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return pi(e,this.__actions__);var p=[];e:for(;u--&&f<h;){for(var v=-1,m=e[c+=t];++v<d;){var g=l[v],y=g.iteratee,b=g.type,w=y(m);if(2==b)m=w;else if(!w){if(1==b)continue e;break e}}p[f++]=m}return p},Pn.prototype.at=pa,Pn.prototype.chain=function(){return fa(this)},Pn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},Pn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof Wn;){var r=Vo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Un(t,this.__chain__)}return this.thru(ea)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Xe&&(Pn.prototype[Xe]=function(){return this}),Pn}();vt._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2352:function(e){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return k})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return x}));var r=n(1),i=n.n(r),o=n(14),a=n.n(o),s=n(2),u=n.n(s),c=n(15),l=n.n(c);function d(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}var f=Array.isArray,h=Object.keys;function p(e){return"function"==typeof e}function v(e){return e instanceof HTMLElement||e instanceof Text}function m(e){return"object"===u()(e)&&!f(e)}function g(e){if(!e||"string"==typeof e)return e;var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete t.children,t}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!(!f(e)||!f(t))&&(n?e.length===t.length&&!e.find((function(e){return!t.includes(e)})):e.some((function(e){return t.includes(e)})))}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];if(!h(e).length)return!0;if(null===t||!h(t).length)return!1;if(n)return l()(e,t);var i=h(e).filter((function(e){return h(t).includes(e)}));return i.forEach((function(n){m(e[n])&&m(t[n])&&(r=r.concat(b(e[n],t[n]))),(e[n]===t[n]||y(e[n],t[n]))&&r.push(t)})),r.length>0&&r.filter((function(e){return e})).length===i.length}function w(e){var t,n={children:[]};if(!e)return n;n.name=p(t=e.type)?t.displayName||t.name:t,n.props=g(e.memoizedProps),n.state=function(e){if(e)return e.baseState||e}(e.memoizedState);var r=e.child;if(r)for(n.children.push(r);r.sibling;)n.children.push(r.sibling),r=r.sibling;return n.children=n.children.map((function(e){return w(e)})),p(e.type)&&function(e){return e.children.length>1}(n)?(n.node=function(e){return e.children.map((function(e){return e.node})).filter((function(e){return!!e}))}(n),n.isFragment=!0):n.node=function(e){return v(e.stateNode)?e.stateNode:e.child&&v(e.child.stateNode)?e.child.stateNode:null}(e),n}function S(e){for(;e.length;){var t=e.shift();if(t.node)return t.node;t.children&&Array.isArray(t.children)&&e.push.apply(e,i()(t.children))}}function I(e,t){for(var n=[];e.length;){var r=e.shift().children;r&&Array.isArray(r)&&r.forEach((function(r){t(r)&&(!r.node&&Array.isArray(r.children)&&(r.node=S(r.children.concat([]))),n.push(r)),e.push(r)}))}return n}function C(e,t){var n=function(e){if(e){var t=e.split("(");return 1===t.length?e:t.find((function(e){return e.includes(")")})).replace(/\)*/g,"")}}(t);return new RegExp("^"+e.split("*").map((function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")})).join(".+")+"$").test(n)}function k(e,t){var n=arguments.length>3?arguments[3]:void 0;return e.reduce((function(e,t){return e.concat(I(e,n&&"function"==typeof n?n:function(e){return"string"==typeof e.name?C(t,e.name):null!==e.name&&"object"===u()(e.name)&&C(t,e.name.displayName)}))}),[t])}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return p(n)?(console.warn("Functions are not supported as filter matchers"),[]):e.filter((function(e){return m(n)&&b(n,e[t],r)||f(n)&&y(n,e[t],r)||e[t]===n}))}function x(e){if(e.hasOwnProperty("_reactRootContainer"))return e._reactRootContainer._internalRoot.current;var t=Object.keys(e).find((function(e){return e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber")||e.startsWith("__reactContainer")}));return t?e[t]:void 0}},function(e,t,n){var r=n(17),i=n(18),o=n(19),a=n(20);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(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.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(3),i=n(6),o=n(22),a=n(23);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(0);function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,n=arguments.length>1?arguments[1]:void 0;if(e.isReactLoaded)return Promise.resolve("React already loaded");var i=function(){var e=document.createTreeWalker(document);if(n)return document.querySelector(n);for(;e.nextNode();)if(e.currentNode.hasOwnProperty("_reactRootContainer"))return e.currentNode};return new Promise((function(n,o){var a=!1,s=null;!function t(){var o=i();if(o&&(e.isReactLoaded=!0,e.rootReactElement=Object(r.c)(o),e.rootReactElement))return clearTimeout(s),n();a||setTimeout(t,200)}(),s=setTimeout((function(){a=!0,o("Timed out")}),t)}))}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(1),i=n.n(r),o=n(4),a=n.n(o),s=n(5),u=n.n(s),c=n(7),l=n.n(c),d=n(13),f=n.n(d),h=n(3),p=n.n(h),v=n(8),m=n.n(v),g=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var b=function(e){l()(n,e);var t=y(n);function n(e){return a()(this,n),e||(e=[]),t.call.apply(t,[this].concat(i()(e)))}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"props",e,t))}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"state",e,t))}}]),n}(m()(Array)),w=function(e){l()(n,e);var t=y(n);function n(e,r){var i;for(var o in a()(this,n),(i=t.call(this,e))._nodes=r,e)i[o]=e[o];return i}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"props",e,t)[0],this._nodes)}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"state",e,t)[0],this._nodes)}}]),n}(m()(Object)),S=function(){function e(t,n){a()(this,e),this.selectors=t.split(" ").filter((function(e){return!!e})).map((function(e){return e.trim()})),this.rootComponent=n,this.tree=Object(g.a)(this.rootComponent)}return u()(e,[{key:"find",value:function(){return this.nodes=new b(Object(g.d)(this.selectors,this.tree,!0)),new w(this.nodes[0],this.nodes)}},{key:"findAll",value:function(){return new b(Object(g.d)(this.selectors,this.tree))}}]),e}()},function(e,t,n){var r=n(2).default,i=n(21);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var a,s,u,c=r(t),l=r(n);if(c&&l){if((s=t.length)!=n.length)return!1;for(a=s;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(c!=l)return!1;var d=t instanceof Date,f=n instanceof Date;if(d!=f)return!1;if(d&&f)return t.getTime()==n.getTime();var h=t instanceof RegExp,p=n instanceof RegExp;if(h!=p)return!1;if(h&&p)return t.toString()==n.toString();var v=i(t);if((s=v.length)!==i(n).length)return!1;for(a=s;0!=a--;)if(!o.call(n,v[a]))return!1;for(a=s;0!=a--;)if(!e(t[u=v[a]],n[u]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"resq$",(function(){return s})),n.d(t,"resq$$",(function(){return u}));var r=n(12),i=n(11);n.d(t,"waitToLoadReact",(function(){return i.a}));var o=n(0);function a(t,n,i){if(!i&&!e.isReactLoaded)throw new Error("Could not find the root element of your application");var a=e.rootReactElement;if(i instanceof HTMLElement&&(a=Object(o.c)(i)),!a)throw new Error("Could not find instance of React in given element");return new r.a(t,a)[n]()}function s(e,t){return a(e,"find",t)}function u(e,t){return a(e,"findAll",t)}}.call(this,n(9))},function(e,t,n){var r=n(10);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(10);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6),i=n(24);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0}])},573:function(e,t,n){var r=n(763);function i(e){return e.reduce((function(e,t,n,r){return e+t}))}function o(e){if(r.isArray(e))return e;if("string"===typeof e)return e.split("");throw Error("Parameter must be a string or array.")}t.$m=function(e,t){return e=o(e),t=o(t),r.intersection(e,t).length/r.union(e,t).length}},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},7326:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},5861:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}n.d(t,{Z:function(){return i}})},5671:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},5647:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9611),i=n(8814);function o(e,t,n){return o=(0,i.Z)()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&(0,r.Z)(o,n.prototype),o},o.apply(null,arguments)}},3144:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9142);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},7762:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,r.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},7277:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(1120),i=n(8814),o=n(1002),a=n(7326);function s(e){var t=(0,i.Z)();return function(){var n,i=(0,r.Z)(e);if(t){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===(0,o.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.Z)(e)}(this,n)}}},4942:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9142);function i(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},1752:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1120);function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,r.Z)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},i.apply(this,arguments)}},1120:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},136:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9611);function i(e,t){if("function"!==typeof t&&null!==t)throw new 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&&(0,r.Z)(e,t)}},8814:function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return r}})},1413:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4942);function i(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},4925:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:function(){return r}})},4165:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(){i=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new R(r||[]);return a(o,"_invoke",{value:T(e,n,s)}),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function b(){}function w(){}function S(){}var I={};d(I,u,(function(){return this}));var C=Object.getPrototypeOf,k=C&&C(C(D([])));k&&k!==n&&o.call(k,u)&&(I=k);var E=S.prototype=b.prototype=Object.create(I);function x(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==(0,r.Z)(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function T(t,n,r){var i=p;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=M(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var c=h(t,n,r);if("normal"===c.type){if(i=r.done?g:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function M(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function N(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 _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError((0,r.Z)(t)+" is not iterable")}return w.prototype=S,a(E,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:w,configurable:!0}),w.displayName=d(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,d(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},x(A.prototype),d(A.prototype,c,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(E),d(E,l,"Generator"),d(E,u,(function(){return this})),d(E,"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=D,R.prototype={constructor:R,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(_),!t)for(var n in this)"t"===n.charAt(0)&&o.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 r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;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,y):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),y},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),_(n),y}},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 i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}},9611:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},885:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2982:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(907);var i=n(181);function o(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},1002:function(e,t,n){"use strict";function r(e){return r="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},r(e)}n.d(t,{Z:function(){return r}})},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(907);function i(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},3464:function(e,t,n){"use strict";n.d(t,{J:function(){return s},c:function(){return a}});for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"===typeof Uint8Array?[]:new Uint8Array(256),o=0;o<64;o++)i[r.charCodeAt(o)]=o;var a=function(e){var t,n=new Uint8Array(e),i=n.length,o="";for(t=0;t<i;t+=3)o+=r[n[t]>>2],o+=r[(3&n[t])<<4|n[t+1]>>4],o+=r[(15&n[t+1])<<2|n[t+2]>>6],o+=r[63&n[t+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(e){var t,n,r,o,a,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),d=new Uint8Array(l);for(t=0;t<u;t+=4)n=i[e.charCodeAt(t)],r=i[e.charCodeAt(t+1)],o=i[e.charCodeAt(t+2)],a=i[e.charCodeAt(t+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|o>>2,d[c++]=(3&o)<<6|63&a;return l}},3246:function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}n.d(t,{_:function(){return r},m:function(){return i}})},5512:function(e,t,n){"use strict";var r;function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){var t=null===e||void 0===e?void 0:e.host;return Boolean((null===t||void 0===t?void 0:t.shadowRoot)===e)}function a(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function s(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t).map(u).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),n):null}catch(r){return null}var n}function u(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=s(e.styleSheet)||t}catch(n){}return t}n.d(t,{Bu:function(){return y},CO:function(){return O},DS:function(){return a},Df:function(){return U},GQ:function(){return G},IG:function(){return N},Jq:function(){return r},LS:function(){return u},VU:function(){return z},We:function(){return T},Zq:function(){return o},bZ:function(){return l},eD:function(){return D},pe:function(){return M},wR:function(){return d},zi:function(){return g}}),function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(r||(r={}));var c=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function l(){return new c}function d(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,i=e.value,o=e.maskInputFn,a=i||"";return(t[n.toLowerCase()]||t[r])&&(a=o?o(a):"*".repeat(a.length)),a}var f="__rrweb_original__";var h,p,v=1,m=new RegExp("[^a-z0-9-_:]"),g=-2;function y(){return v++}var b=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,w=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,S=/^(data:)([^,]*),(.*)/i;function I(e,t){return(e||"").replace(b,(function(e,n,r,i,o,a){var s,u=r||o||a,c=n||i||"";if(!u)return e;if(!w.test(u))return"url(".concat(c).concat(u).concat(c,")");if(S.test(u))return"url(".concat(c).concat(u).concat(c,")");if("/"===u[0])return"url(".concat(c).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)).concat(c,")");var l=t.split("/"),d=u.split("/");l.pop();for(var f=0,h=d;f<h.length;f++){var p=h[f];"."!==p&&(".."===p?l.pop():l.push(p))}return"url(".concat(c).concat(l.join("/")).concat(c,")")}))}var C=/^[^ \t\n\r\u000c]+/,k=/^[, \t\n\r\u000c]+/;function E(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function x(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function A(){var e=document.createElement("a");return e.href="",e.href}function T(e,t,n,r){return"src"===n||"href"===n&&r&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&r&&"#"!==r[0]?E(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(k),!(n>=t.length);){var o=r(C);if(","===o.slice(-1))o=E(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=E(e,o);for(var s=!1;;){var u=t.charAt(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n&&r?I(r,A()):"object"===t&&"data"===n&&r?E(e,r):r:E(e,r)}function M(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&M(e.parentNode,t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&M(e.parentNode,t,n)}function N(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===r)return!1;if("string"===typeof t){if(r.classList.contains(t))return!0;if(r.closest(".".concat(t)))return!0}else if(M(r,t,!0))return!0;if(n){if(r.matches(n))return!0;if(r.closest(n))return!0}return!1}function _(e,t){var n=t.doc,i=t.mirror,o=t.blockClass,a=t.blockSelector,u=t.maskTextClass,c=t.maskTextSelector,l=t.inlineStylesheet,v=t.maskInputOptions,g=void 0===v?{}:v,y=t.maskTextFn,b=t.maskInputFn,w=t.dataURLOptions,S=void 0===w?{}:w,C=t.inlineImages,k=t.recordCanvas,E=t.keepIframeSrcFn,M=t.newlyAddedElement,_=void 0!==M&&M,R=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,i);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:r.Document,childNodes:[],compatMode:e.compatMode}:{type:r.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:r.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:R};case e.ELEMENT_NODE:return function(e,t){for(var n=t.doc,i=t.blockClass,o=t.blockSelector,a=t.inlineStylesheet,u=t.maskInputOptions,c=void 0===u?{}:u,l=t.maskInputFn,v=t.dataURLOptions,g=void 0===v?{}:v,y=t.inlineImages,b=t.recordCanvas,w=t.keepIframeSrcFn,S=t.newlyAddedElement,C=void 0!==S&&S,k=t.rootId,E=function(e,t,n){if("string"===typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&e.matches(n)}(e,i,o),M=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return m.test(t)?"div":t}(e),N={},_=e.attributes.length,R=0;R<_;R++){var D=e.attributes[R];N[D.name]=T(n,M,D.name,D.value)}if("link"===M&&a){var O=Array.from(n.styleSheets).find((function(t){return t.href===e.href})),Z=null;O&&(Z=s(O)),Z&&(delete N.rel,delete N.href,N._cssText=I(Z,O.href))}if("style"===M&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){(Z=s(e.sheet))&&(N._cssText=I(Z,A()))}if("input"===M||"textarea"===M||"select"===M){var L=e.value,F=e.checked;"radio"!==N.type&&"checkbox"!==N.type&&"submit"!==N.type&&"button"!==N.type&&L?N.value=d({type:N.type,tagName:M,value:L,maskInputOptions:c,maskInputFn:l}):F&&(N.checked=F)}"option"===M&&(e.selected&&!c.select?N.selected=!0:delete N.selected);if("canvas"===M&&b)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=f in i?i[f]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(N.rr_dataURL=e.toDataURL(g.type,g.quality));else if(!("__context"in e)){var B=e.toDataURL(g.type,g.quality),V=document.createElement("canvas");V.width=e.width,V.height=e.height,B!==V.toDataURL(g.type,g.quality)&&(N.rr_dataURL=B)}if("img"===M&&y){h||(h=n.createElement("canvas"),p=h.getContext("2d"));var P=e,j=P.crossOrigin;P.crossOrigin="anonymous";var W=function(){try{h.width=P.naturalWidth,h.height=P.naturalHeight,p.drawImage(P,0,0),N.rr_dataURL=h.toDataURL(g.type,g.quality)}catch(e){console.warn("Cannot inline img src=".concat(P.currentSrc,"! Error: ").concat(e))}j?N.crossOrigin=j:P.removeAttribute("crossorigin")};P.complete&&0!==P.naturalWidth?W():P.onload=W}"audio"!==M&&"video"!==M||(N.rr_mediaState=e.paused?"paused":"played",N.rr_mediaCurrentTime=e.currentTime);C||(e.scrollLeft&&(N.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(N.rr_scrollTop=e.scrollTop));if(E){var U=e.getBoundingClientRect(),H=U.width,G=U.height;N={class:N.class,rr_width:"".concat(H,"px"),rr_height:"".concat(G,"px")}}"iframe"!==M||w(N.src)||(e.contentDocument||(N.rr_src=N.src),delete N.src);return{type:r.Element,tagName:M,attributes:N,childNodes:[],isSVG:x(e)||void 0,needBlock:E,rootId:k}}(e,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:l,maskInputOptions:g,maskInputFn:b,dataURLOptions:S,inlineImages:C,recordCanvas:k,keepIframeSrcFn:E,newlyAddedElement:_,rootId:R});case e.TEXT_NODE:return function(e,t){var n,i=t.maskTextClass,o=t.maskTextSelector,a=t.maskTextFn,s=t.rootId,u=e.parentNode&&e.parentNode.tagName,c=e.textContent,l="STYLE"===u||void 0,d="SCRIPT"===u||void 0;if(l&&c){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(c=(f=e.parentNode.sheet).cssRules?Array.from(f.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}c=I(c,A())}var f;d&&(c="SCRIPT_PLACEHOLDER");!l&&!d&&c&&N(e,i,o)&&(c=a?a(c):c.replace(/[\S]/g,"*"));return{type:r.Text,textContent:c||"",isStyle:l,rootId:s}}(e,{maskTextClass:u,maskTextSelector:c,maskTextFn:y,rootId:R});case e.CDATA_SECTION_NODE:return{type:r.CDATA,textContent:"",rootId:R};case e.COMMENT_NODE:return{type:r.Comment,textContent:e.textContent||"",rootId:R};default:return!1}}function R(e){return void 0===e?"":e.toLowerCase()}function D(e,t){var n,s=t.doc,u=t.mirror,c=t.blockClass,l=t.blockSelector,d=t.maskTextClass,f=t.maskTextSelector,h=t.skipChild,p=void 0!==h&&h,v=t.inlineStylesheet,m=void 0===v||v,b=t.maskInputOptions,w=void 0===b?{}:b,S=t.maskTextFn,I=t.maskInputFn,C=t.slimDOMOptions,k=t.dataURLOptions,E=void 0===k?{}:k,x=t.inlineImages,A=void 0!==x&&x,T=t.recordCanvas,M=void 0!==T&&T,N=t.onSerialize,O=t.onIframeLoad,Z=t.iframeLoadTimeout,L=void 0===Z?5e3:Z,F=t.onStylesheetLoad,B=t.stylesheetLoadTimeout,V=void 0===B?5e3:B,P=t.keepIframeSrcFn,j=void 0===P?function(){return!1}:P,W=t.newlyAddedElement,U=void 0!==W&&W,H=t.preserveWhiteSpace,G=void 0===H||H,z=_(e,{doc:s,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,dataURLOptions:E,inlineImages:A,recordCanvas:M,keepIframeSrcFn:j,newlyAddedElement:U});if(!z)return console.warn(e,"not serialized"),null;n=u.hasNode(e)?u.getId(e):!function(e,t){if(t.comment&&e.type===r.Comment)return!0;if(e.type===r.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(R(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===R(e.attributes.name)||"icon"===R(e.attributes.rel)||"apple-touch-icon"===R(e.attributes.rel)||"shortcut icon"===R(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&R(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(R(e.attributes.property).match(/^(og|twitter|fb):/)||R(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===R(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===R(e.attributes.name)||"googlebot"===R(e.attributes.name)||"bingbot"===R(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===R(e.attributes.name)||"generator"===R(e.attributes.name)||"framework"===R(e.attributes.name)||"publisher"===R(e.attributes.name)||"progid"===R(e.attributes.name)||R(e.attributes.property).match(/^article:/)||R(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===R(e.attributes.name)||"yandex-verification"===R(e.attributes.name)||"csrf-token"===R(e.attributes.name)||"p:domain_verify"===R(e.attributes.name)||"verify-v1"===R(e.attributes.name)||"verification"===R(e.attributes.name)||"shopify-checkout-api-token"===R(e.attributes.name)))return!0}}return!1}(z,C)&&(G||z.type!==r.Text||z.isStyle||z.textContent.replace(/^\s+|\s+$/gm,"").length)?y():g;var q=Object.assign(z,{id:n});if(u.add(e,q),n===g)return null;N&&N(e);var Y=!p;if(q.type===r.Element){Y=Y&&!q.needBlock,delete q.needBlock;var Q=e.shadowRoot;Q&&a(Q)&&(q.isShadowHost=!0)}if((q.type===r.Document||q.type===r.Element)&&Y){C.headWhitespace&&q.type===r.Element&&"head"===q.tagName&&(G=!1);for(var K={doc:s,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:p,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:M,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:O,iframeLoadTimeout:L,onStylesheetLoad:F,stylesheetLoadTimeout:V,keepIframeSrcFn:j},X=0,J=Array.from(e.childNodes);X<J.length;X++){(te=D(J[X],K))&&q.childNodes.push(te)}if(i(e)&&e.shadowRoot)for(var $=0,ee=Array.from(e.shadowRoot.childNodes);$<ee.length;$++){var te;(te=D(ee[$],K))&&(a(e.shadowRoot)&&(te.isShadow=!0),q.childNodes.push(te))}}return e.parentNode&&o(e.parentNode)&&a(e.parentNode)&&(q.isShadow=!0),q.type===r.Element&&"iframe"===q.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(u){return}if("complete"===i){var 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)}else{var s=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&O){var n=D(t,{doc:t,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:M,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:O,iframeLoadTimeout:L,onStylesheetLoad:F,stylesheetLoadTimeout:V,keepIframeSrcFn:j});n&&O(e,n)}}),L),q.type===r.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(a){return}if(!r){var o=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(o),i=!0,t()}))}}(e,(function(){if(F){var t=D(e,{doc:s,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:M,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:O,iframeLoadTimeout:L,onStylesheetLoad:F,stylesheetLoadTimeout:V,keepIframeSrcFn:j});t&&F(e,t)}}),V),q}function O(e,t){var n=t||{},r=n.mirror,i=void 0===r?new c:r,o=n.blockClass,a=void 0===o?"rr-block":o,s=n.blockSelector,u=void 0===s?null:s,l=n.maskTextClass,d=void 0===l?"rr-mask":l,f=n.maskTextSelector,h=void 0===f?null:f,p=n.inlineStylesheet,v=void 0===p||p,m=n.inlineImages,g=void 0!==m&&m,y=n.recordCanvas,b=void 0!==y&&y,w=n.maskAllInputs,S=void 0!==w&&w,I=n.maskTextFn,C=n.maskInputFn,k=n.slimDOM,E=void 0!==k&&k,x=n.dataURLOptions,A=n.preserveWhiteSpace,T=n.onSerialize,M=n.onIframeLoad,N=n.iframeLoadTimeout,_=n.onStylesheetLoad,R=n.stylesheetLoadTimeout,O=n.keepIframeSrcFn;return D(e,{doc:e,mirror:i,blockClass:a,blockSelector:u,maskTextClass:d,maskTextSelector:h,skipChild:!1,inlineStylesheet:v,maskInputOptions:!0===S?{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===S?{password:!0}:S,maskTextFn:I,maskInputFn:C,slimDOMOptions:!0===E||"all"===E?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===E,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===E?{}:E,dataURLOptions:x,inlineImages:g,recordCanvas:b,preserveWhiteSpace:A,onSerialize:T,onIframeLoad:M,iframeLoadTimeout:N,onStylesheetLoad:_,stylesheetLoadTimeout:R,keepIframeSrcFn:void 0===O?function(){return!1}:O,newlyAddedElement:!1})}var Z=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function L(e,t){void 0===t&&(t={});var n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function o(){var e={line:n,column:r};return function(t){return t.position=new a(e),h(),t}}var a=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};a.prototype.content=e;var s=[];function u(i){var o=new Error("".concat(t.source||"",":").concat(n,":").concat(r,": ").concat(i));if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;s.push(o)}function c(){return f(/^{\s*/)}function l(){return f(/^}/)}function d(){var t,n=[];for(h(),p(n);e.length&&"}"!==e.charAt(0)&&(t=k()||E());)!1!==t&&(n.push(t),p(n));return n}function f(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function h(){f(/^\s*/)}function p(e){var t;for(void 0===e&&(e=[]);t=v();)!1!==t&&e.push(t),t=v();return e}function v(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return u("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function m(){var e=f(/^([^{]+)/);if(e)return F(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"\u200c")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=o(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=F(t[0]);if(!f(/^:\s*/))return u("property missing ':'");var r=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(Z,""),value:r?F(r[0]).replace(Z,""):""});return f(/^[;\s]*/),i}}function y(){var e,t=[];if(!c())return u("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t)),e=g();return l()?t:u("missing '}'")}function b(){for(var e,t=[],n=o();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:y()})}var w=C("import"),S=C("charset"),I=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=o(),r=f(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function k(){if("@"===e[0])return function(){var e=o(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=f(/^([-\w]+)\s*/)))return u("@keyframes missing name");var r,i=t[1];if(!c())return u("@keyframes missing '{'");for(var a=p();r=b();)a.push(r),a=a.concat(p());return l()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):u("@keyframes missing '}'")}}()||function(){var e=o(),t=f(/^@media *([^{]+)/);if(t){var n=F(t[1]);if(!c())return u("@media missing '{'");var r=p().concat(d());return l()?e({type:"media",media:n,rules:r}):u("@media missing '}'")}}()||function(){var e=o(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:F(t[1]),media:F(t[2])})}()||function(){var e=o(),t=f(/^@supports *([^{]+)/);if(t){var n=F(t[1]);if(!c())return u("@supports missing '{'");var r=p().concat(d());return l()?e({type:"supports",supports:n,rules:r}):u("@supports missing '}'")}}()||w()||S()||I()||function(){var e=o(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=F(t[1]),r=F(t[2]);if(!c())return u("@document missing '{'");var i=p().concat(d());return l()?e({type:"document",document:r,vendor:n,rules:i}):u("@document missing '}'")}}()||function(){var e=o();if(f(/^@page */)){var t=m()||[];if(!c())return u("@page missing '{'");for(var n,r=p();n=g();)r.push(n),r=r.concat(p());return l()?e({type:"page",selectors:t,declarations:r}):u("@page missing '}'")}}()||function(){var e=o();if(f(/^@host\s*/)){if(!c())return u("@host missing '{'");var t=p().concat(d());return l()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=o();if(f(/^@font-face\s*/)){if(!c())return u("@font-face missing '{'");for(var t,n=p();t=g();)n.push(t),n=n.concat(p());return l()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function E(){var e=o(),t=m();return t?(p(),e({type:"rule",selectors:t,declarations:y()})):u("selector missing")}return B(function(){var e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function F(e){return e?e.replace(/^\s+|\s+$/g,""):""}function B(e,t){for(var n=e&&"string"===typeof e.type,r=n?e:t,i=0,o=Object.keys(e);i<o.length;i++){var a=e[o[i]];Array.isArray(a)?a.forEach((function(e){B(e,r)})):a&&"object"===typeof a&&B(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var V={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var P=/([^\\]):hover/,j=new RegExp(P.source,"g");function W(e,t){var n=null===t||void 0===t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var r=L(e,{silent:!0});if(!r.stylesheet)return e;var i=[];if(r.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){P.test(e)&&i.push(e)}))})),0===i.length)return e;var o=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),a=e.replace(o,(function(e){var t=e.replace(j,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null===t||void 0===t||t.stylesWithHoverClass.set(e,a),a}function U(){return{stylesWithHoverClass:new Map}}function H(e,t){var n=t.doc,i=t.hackCss,o=t.cache;switch(e.type){case r.Document:return n.implementation.createDocument(null,"",null);case r.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case r.Element:var a,s=function(e){var t=V[e.tagName]?V[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);a=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var u={};for(var c in e.attributes)if(Object.prototype.hasOwnProperty.call(e.attributes,c)){var l=e.attributes[c];if("option"!==s||"selected"!==c||!1!==l)if(!0===l&&(l=""),c.startsWith("rr_"))u[c]=l;else{var d="textarea"===s&&"value"===c,f="style"===s&&"_cssText"===c;if(f&&i&&"string"===typeof l&&(l=W(l,o)),!d&&!f||"string"!==typeof l)try{if(e.isSVG&&"xlink:href"===c)a.setAttributeNS("http://www.w3.org/1999/xlink",c,l.toString());else if("onload"===c||"onclick"===c||"onmouse"===c.substring(0,7))a.setAttribute("_"+c,l.toString());else{if("meta"===s&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===c){a.setAttribute("csp-content",l.toString());continue}("link"!==s||"preload"!==e.attributes.rel&&"modulepreload"!==e.attributes.rel||"script"!==e.attributes.as)&&("link"===s&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===s&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(c,l.toString())))}}catch(b){}else{for(var h=n.createTextNode(l),p=0,v=Array.from(a.childNodes);p<v.length;p++){var m=v[p];m.nodeType===a.TEXT_NODE&&a.removeChild(m)}a.appendChild(h)}}}var g=function(t){var n=u[t];if("canvas"===s&&"rr_dataURL"===t){var r=document.createElement("img");r.onload=function(){var e=a.getContext("2d");e&&e.drawImage(r,0,0,r.width,r.height)},r.src=n.toString(),a.RRNodeType&&(a.rr_dataURL=n.toString())}else if("img"===s&&"rr_dataURL"===t){var i=a;i.currentSrc.startsWith("data:")||(i.setAttribute("rrweb-original-src",e.attributes.src),i.src=n.toString())}if("rr_width"===t)a.style.width=n.toString();else if("rr_height"===t)a.style.height=n.toString();else if("rr_mediaCurrentTime"===t&&"number"===typeof n)a.currentTime=n;else if("rr_mediaState"===t)switch(n){case"played":a.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":a.pause()}};for(var y in u)g(y);if(e.isShadowHost)if(a.shadowRoot)for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);else a.attachShadow({mode:"open"});return a;case r.Text:return n.createTextNode(e.isStyle&&i?W(e.textContent,o):e.textContent);case r.CDATA:return n.createCDATASection(e.textContent);case r.Comment:return n.createComment(e.textContent);default:return null}}function G(e,t){var n,o,a=t.doc,s=t.mirror,u=t.skipChild,c=void 0!==u&&u,l=t.hackCss,d=void 0===l||l,f=t.afterAppend,h=t.cache;if(s.has(e.id)){var p=s.getNode(e.id),v=s.getMeta(p);if(o=e,(n=v)&&o&&n.type===o.type&&(n.type===r.Document?n.compatMode===o.compatMode:n.type===r.DocumentType?n.name===o.name&&n.publicId===o.publicId&&n.systemId===o.systemId:n.type===r.Comment||n.type===r.Text||n.type===r.CDATA?n.textContent===o.textContent:n.type===r.Element&&n.tagName===o.tagName&&JSON.stringify(n.attributes)===JSON.stringify(o.attributes)&&n.isSVG===o.isSVG&&n.needBlock===o.needBlock))return s.getNode(e.id)}var m=H(e,{doc:a,hackCss:d,cache:h});if(!m)return null;if(e.rootId&&s.getNode(e.rootId)!==a&&s.replace(e.rootId,a),e.type===r.Document&&(a.close(),a.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==r.DocumentType&&(e.childNodes[0].type===r.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),s.add(m,e),(e.type===r.Document||e.type===r.Element)&&!c)for(var g=0,y=e.childNodes;g<y.length;g++){var b=y[g],w=G(b,{doc:a,mirror:s,skipChild:!1,hackCss:d,afterAppend:f,cache:h});w?(b.isShadow&&i(m)&&m.shadowRoot?m.shadowRoot.appendChild(w):m.appendChild(w),f&&f(w,b.id)):console.warn("Failed to rebuild",b)}return m}function z(e,t){var n=t.doc,i=t.onVisit,o=t.hackCss,a=void 0===o||o,s=t.afterAppend,u=t.cache,l=t.mirror,d=void 0===l?new c:l,f=G(e,{doc:n,mirror:d,skipChild:!1,hackCss:a,afterAppend:s,cache:u});return function(e,t){for(var n=0,r=e.getIds();n<r.length;n++){var i=r[n];e.has(i)&&t(e.getNode(i))}}(d,(function(e){i&&i(e),function(e,t){var n=t.getMeta(e);if((null===n||void 0===n?void 0:n.type)===r.Element){var i=e;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var a=n.attributes[o];"rr_scrollLeft"===o&&(i.scrollLeft=a),"rr_scrollTop"===o&&(i.scrollTop=a)}}}(e,d)})),f}},1737:function(e,t,n){"use strict";n.d(t,{$1:function(){return p},Cj:function(){return E},E2:function(){return _},Fn:function(){return k},He:function(){return T},IT:function(){return g},OK:function(){return I},P2:function(){return d},WU:function(){return b},_X:function(){return N},_f:function(){return Z},fM:function(){return m},gp:function(){return v},jB:function(){return D},md:function(){return M},nF:function(){return y},on:function(){return u},qs:function(){return x},r$:function(){return h},s6:function(){return C},ug:function(){return R},vD:function(){return A},y5:function(){return w},yU:function(){return f},z6:function(){return S}});var r=n(5671),i=n(3144),o=n(2982),a=n(7762),s=n(5512);function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var c="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.",l={map:{},getId:function(){return console.error(c),-1},getNode:function(){return console.error(c),null},removeNodeFromMap:function(){console.error(c)},has:function(){return console.error(c),!1},reset:function(){console.error(c)}};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==n.leading||(i=u);var c=t-(u-i),l=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(l,a)):r||!1===n.trailing||(r=setTimeout((function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(l,a)}),c))}}function f(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),o&&o.set&&o.set.call(this,e)}}),function(){return f(e,t,o||{},!0)}}function h(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"===typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(o){return function(){}}}function p(e){var t,n,r,i,o,a,s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null===s||void 0===s?void 0:s.documentElement.scrollLeft)||(null===(n=null===(t=null===s||void 0===s?void 0:s.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null===s||void 0===s?void 0:s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null===s||void 0===s?void 0:s.documentElement.scrollTop)||(null===(o=null===(i=null===s||void 0===s?void 0:s.body)||void 0===i?void 0:i.parentElement)||void 0===o?void 0:o.scrollTop)||(null===(a=null===s||void 0===s?void 0:s.body)||void 0===a?void 0:a.scrollTop)||0}}function v(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function m(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function g(e,t,n,r){if(!e)return!1;var i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;if("string"===typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if((0,s.pe)(i,t,r))return!0;if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function y(e,t){return-1!==t.getId(e)}function b(e,t){return t.getId(e)===s.zi}function w(e,t){if((0,s.Zq)(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||w(e.parentNode,t))}function S(e){return Boolean(e.changedTouches)}function I(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===i)return!0}while(i=i&&i.parentNode);return!1})}function C(e){var t,n={},r=function(e,t){var r={value:e,parent:t,children:[]};return n[e.node.id]=r,r},i=[],o=(0,a.Z)(e);try{for(o.s();!(t=o.n()).done;){var s=t.value,u=s.nextId,c=s.parentId;if(u&&u in n){var l=n[u];if(l.parent){var d=l.parent.children.indexOf(l);l.parent.children.splice(d,0,r(s,l.parent))}else{var f=i.indexOf(l);i.splice(f,0,r(s,null))}}else if(c in n){var h=n[c];h.children.push(r(s,h))}else i.push(r(s,null))}}catch(p){o.e(p)}finally{o.f()}return i}function k(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)k(e.children[n],t)}function E(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function x(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function A(e,t){var n,r,i=null===(r=null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),a=A(i,t),s=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function T(e){return Boolean(null===e||void 0===e?void 0:e.shadowRoot)}function M(e,t){var n=e[t[0]];return 1===t.length?n:M(n.cssRules[t[1]].cssRules,t.slice(2))}function N(e){var t=(0,o.Z)(e),n=t.pop();return{positions:t,index:n}}function _(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(l=new Proxy(l,{get:function(e,t,n){return"map"===t&&console.error(c),Reflect.get(e,t,n)}}));var R=function(){function e(){(0,r.Z)(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return(0,i.Z)(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){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);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}();function D(e){var t,n,r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function O(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=D(n);)n=t;return n}(e);return t.contains(n)}function Z(e){var t=e.ownerDocument;return!!t&&(t.contains(e)||O(e))}},1414:function(e,t,n){"use strict";n.d(t,{FX:function(){return a},SA:function(){return s},Y2:function(){return o},tw:function(){return r},yh:function(){return i}});var r=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(r||{}),i=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e}(i||{}),o=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(o||{}),a=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(a||{}),s=function(e){return e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e}(s||{})}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+"."+{516:"665d79c7",810:"7d2490e1"}[e]+".chunk.js"},n.miniCssF=function(e){return"static/css/"+e+".74b0b805.chunk.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={};n.l=function(t,r,i,o){if(e[t])e[t].push(r);else{var a,s;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var l=u[c];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")=="fe:"+i){a=l;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack","fe:"+i),a.src=t),e[t]=[r];var d=function(n,r){a.onerror=a.onload=null,clearTimeout(f);var i=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((function(e){return e(r)})),n)return n(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n.p="/",function(){if("undefined"!==typeof document){var e=function(e){return new Promise((function(t,r){var i=n.miniCssF(e),o=n.p+i;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var i=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var o=document.getElementsByTagName("style");for(r=0;r<o.length;r++){var a;if((i=(a=o[r]).getAttribute("data-href"))===e||i===t)return a}}(i,o))return t();!function(e,t,n,r,i){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(n){if(o.onerror=o.onload=null,"load"===n.type)r();else{var a=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=a,u.request=s,o.parentNode&&o.parentNode.removeChild(o),i(u)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)}(e,o,null,t,r)}))},t={179:0};n.f.miniCss=function(n,r){t[n]?r.push(t[n]):0!==t[n]&&{516:1}[n]&&r.push(t[n]=e(n).then((function(){t[n]=0}),(function(e){throw delete t[n],e})))}}}(),function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var i,o,a=r[0],s=r[1],u=r[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(u)u(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkfe=self.webpackChunkfe||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e={};n.r(e),n.d(e,{default:function(){return Zt}});var t=n(4165),r=n(5861),i=n(603),o=n(9478),a=n(5671),s=n(3144),u=function(){function e(t){if((0,a.Z)(this,e),this.structuralVicinity=void 0,this.visualVicinity=void 0,this.serializedElement=void 0,this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.innerFeatures=void 0,this.staticCandidates=void 0,this.positioning=void 0,this.svgs=void 0,"object"===typeof t)for(var n in t)this[n]=t[n];else if("string"===typeof t){var r=JSON.parse(t);for(var i in r)this[i]=r[i]}}return(0,s.Z)(e,[{key:"serialize",value:function(){return JSON.stringify(this)}}]),e}(),c={attributesToExtract:["class","src","placeholder","href","checked","disabled","contenteditable","draggable","hidden","inputmode","role","title","name","type","readonly","size","required","multiple","min","max","step","maxlength","alt","loop","controls","poster"],structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}},l=n(1413),d=n(199),f=n(4942),h={rect:["width","height"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],line:["x1","y1","x2","y2"],polygon:["points"],polyline:["points"],path:["d"],text:["x","y"]},p=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.limit=5,this.extractSVG=function(e){return Array.from(e.children).map((function(e){var t=h[e.tagName.toLowerCase()];if(!t)return null;var n=t.reduce((function(t,n){var r=e.getAttribute(n);return(0,l.Z)((0,l.Z)({},t),{},(0,f.Z)({},n,r))}),{});return{tagName:e.tagName.toLowerCase(),attributes:n}})).filter((function(e){return!!e}))}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.matches("svg")?[e]:e.querySelectorAll("svg");if(t.length&&!(t.length>this.limit))return Array.from(t).map(this.extractSVG)}}]),e}(),v=n(7762),m=n(885),g=n(2982),y=function(){function e(t){(0,a.Z)(this,e),this.element=void 0,this.elRect=void 0,this.initialScrollPositions=void 0,this.element=t,this.elRect=this.element.getBoundingClientRect()}return(0,s.Z)(e,[{key:"scrollIntoView",value:function(){if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!R(this.element)){var e,t=(0,v.Z)(this.initialScrollPositions);try{for(t.s();!(e=t.n()).done;){var n=e.value,r=n.element.getBoundingClientRect();if(this.elRect.top<r.top||this.elRect.bottom>r.bottom){var i=this.elRect.top-r.top+n.element.scrollTop;n.element.scrollTop=i}}}catch(o){t.e(o)}finally{t.f()}}return this}},{key:"restore",value:function(){this.initialScrollPositions.forEach((function(e){var t=e.element,n=e.top,r=e.left;try{t.scroll(r,n)}catch(jt){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:t,top:n,left:r},jt)}}))}},{key:"getScrollableParentsPositions",value:function(){this.initialScrollPositions=[];for(var e=_(this.element);null!=e;)(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&this.initialScrollPositions.push({element:e,top:e.scrollTop,left:e.scrollLeft}),e=_(e)}}]),e}(),b=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.target,i=void 0===r?document:r,o=n.disabled,s=void 0!==o&&o,u=n.log,c=void 0===u||u,l=n.name,d=n.monitorInput,f=void 0!==d&&d;(0,a.Z)(this,e),this.target=void 0,this.name=void 0,this.disabled=void 0,this.logActivity=void 0,this.monitorInput=void 0,this.cache=void 0,this.observer=void 0,this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid"],this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"],this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"],this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(","),this.shouldIgnoreMutationRecord=function(e){try{if("attributes"===e.type&&t.ignoreMutationsWithAttributes.includes(e.attributeName))return!0;if("attributes"===e.type&&t.ignoreMutationsWithAttributeRegexPatterns.some((function(t){return new RegExp("^"+t+"$").test(e.attributeName)})))return!0;if("attributes"===e.type&&"class"===e.attributeName){var n=function(e){return e.split(" ").filter((function(e){return![":hover","rrweb-paused"].includes(e)})).sort().join(" ")};return n(e.oldValue)===n(e.target.className)}var r=function(e){return t.ignoreElementsWithClasses.some((function(t){return e.classList.contains(t)}))};if("childList"===e.type&&Array.from(e.addedNodes).every((function(e){return r(e)}))&&Array.from(e.removedNodes).every((function(e){return r(e)})))return!0}catch(jt){}return!1},this.monitoredTextElements=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){t.invalidate()}))},this.target=i,this.name=l,this.disabled=s,this.logActivity=c,this.monitorInput=f,this.startObserver()}return(0,s.Z)(e,[{key:"startObserver",value:function(){var e=this;this.observer=new MutationObserver((function(t){t.every(e.shouldIgnoreMutationRecord)||(e.invalidate(),e.monitorInput&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE){var n=t;n.matches(e.inputEnabledSelectors)||n.isContentEditable?e.monitorInputEnabledElement(n):Array.from(n.querySelectorAll("*")).filter((function(t){return t.matches&&t.matches(e.inputEnabledSelectors)||t.isContentEditable})).forEach(e.monitorInputEnabledElement)}}))})))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.monitorInput&&this.startInputMonitoring()}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=T(this.inputEnabledSelectors),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}},{key:"get",value:function(){return this.log("get","has cache:",!!this.cache),this.cache}},{key:"set",value:function(e){this.disabled||(this.cache=e)}},{key:"hasCache",value:function(){return this.log("hasCache",!!this.cache),!!this.cache}},{key:"invalidate",value:function(){this.set(void 0)}},{key:"log",value:function(){var e;if(this.logActivity){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).log.apply(e,["[DOMMutationDependentCache] ".concat(this.name?"[".concat(this.name,"]"):"",":")].concat(n))}}}],[{key:"getInstance",value:function(t,n){var r,i=this.makeNameForCache(t,null===n||void 0===n?void 0:n.flags);e.instances[i]||(e.instances[i]=new e((0,l.Z)((0,l.Z)({},n),{},{name:null!==(r=null===n||void 0===n?void 0:n.name)&&void 0!==r?r:t})),null!==n&&void 0!==n&&n.initialValue&&e.instances[i].set(null===n||void 0===n?void 0:n.initialValue));var o=e.instances[i];return null!==n&&void 0!==n&&n.invalidate&&o.invalidate(),o}},{key:"invalidateAll",value:function(){Object.values(e.instances).forEach((function(e){return e.invalidate()}))}},{key:"makeNameForCache",value:function(e,t){return"".concat(e).concat(t?JSON.stringify(t):"")}}]),e}();b.instances={},window.DOMMutationDependentCache=b;var w=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]',"label[for]"],S=["pointer","grab","text","vertical-text","zoom-in","zoom-out","help"],I=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle","onMouseEnter"],C=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle","onmouseenter"],k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.allowDisabled,i=void 0!==r&&r,o=n.useDataVisibleAttributes,a=void 0===o||o,s=n.excludeCrossOriginIframes,u=void 0===s||s,c=b.getInstance("getAllInteractableHTMLElements",{target:e,log:!1}),l=Date.now(),d=function(e){var t=e.reduce((function(e,t){return!i&&t.state.disabled?e:[].concat((0,g.Z)(e),[t.element])}),[]);return console.log("[getAllInteractableHTMLElements] done, took",Date.now()-l,"ms"),t};if(c.hasCache())return d(c.get());var f=T("*",e,{excludeCrossOriginIframes:u}).reduce((function(e,n){var r,i="disabled"in n&&n.disabled,o=n.matches(w.concat(t.appSpecificInteractableElementsSelectors||[]).filter((function(e){return!!e})).join(","))||S.includes(window.getComputedStyle(n).cursor)||n.isContentEditable&&!(null!==(r=n.parentElement)&&void 0!==r&&r.isContentEditable)||!t.ignoreEventListenersWhenDeterminingInteractability&&(C.some((function(e){return n[e]}))||function(e){if(e._checksum_eventListenerList){var t=e._checksum_eventListenerList;if(C.some((function(e){return t[e.slice(2)]})))return!0}var n=Object.keys(e).find((function(e){return e.startsWith("__reactFiber")})),r=n?e[n]:void 0;return!(!r||!r.memoizedProps)&&I.some((function(e){return r.memoizedProps[e]}))}(n));return o?[].concat((0,g.Z)(e),[{element:n,disabled:i}]):e}),[]),h=f.reduce((function(e,n){var r=E(n.element,t.appSpecificInteractableElementsSelectors||[]),i=e.find((function(e){return e.element===r}));return i?!n.disabled&&i.state.disabled&&(i.state.disabled=!1):e.push({element:r,state:{disabled:n.disabled}}),e}),[]).filter((function(e){var t=e.element;if(a){if(!t)return!1;var n=t.getAttribute("checksum-data-visible");if(n){var r="true"===n,i="true"===t.getAttribute("checksum-data-visible-under-transparent-element"),o="true"===t.getAttribute("checksum-data-transparently-visible");return r&&!i||o}}return!Z(t,{markTransparentElementsAsHidden:!1}).isHidden}));return c.set(h),d(h)},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return e;var n=window.getComputedStyle(e).cursor,r=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!1},r=e;r;){var i=r.parentElement;if(!i||i.nodeType!==Node.ELEMENT_NODE)return r;if(t(i))break;if(window.getComputedStyle(i).cursor!==n)return r;r=i}};try{if("isContentEditable"in e&&e.isContentEditable)return e;if("closest"in e){var i=A(e,w.concat(t).filter((function(e){return!!e})).join(","));if(i&&function(e){try{if(e.matches("label[for]")&&!e.matches(w.concat(t).filter((function(e){return!!e&&"label[for]"!==e})).join(","))){var n=e.getAttribute("for"),r=document.getElementById(n);return!!r&&"input"===r.tagName.toLowerCase()&&["checkbox","radio"].includes(r.getAttribute("type"))}}catch(jt){console.error("interactableParentIsValid",e,jt)}return!0}(i)){if(i===e)return e;var o=r(e,(function(e){return e===i}));return o||i}}if(["auto","default","context-menu","help","progress","wait"].includes(n))return e;var a=r(e);return a||e}catch(jt){return console.error("getCompoundInteractableRootElement",e,jt),e}};function x(e){return!e.src||window.location.origin!==new URL(e.src).origin}var A=function e(t,n){if(t.matches(n))return t;var r=t.slot;if(r){for(var i=t.parentElement;i;){if(i.shadowRoot){var o=i.shadowRoot.querySelector('slot[name="'.concat(r,'"]'));if(o)return e(o,n)}i=i.parentElement}return null}var a=t.closest(n);if(a)return a;var s=t.getRootNode();return s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e(s.host,n):null},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.excludeCrossOriginIframes,i=void 0!==r&&r,o=n.includeHTML,a=void 0!==o&&o,s=[];return function t(n){!function(t){t.querySelectorAll(e).forEach((function(e){return s.push(e)}))}(n);var r=[];!function e(t){t.shadowRoot&&r.push(t.shadowRoot),t.childNodes.forEach((function(t){return e(t)}))}(n),r.forEach((function(e){return t(e)})),n.querySelectorAll("iframe").forEach((function(e){if(!i||!x(e))try{var n=e.contentDocument;n&&t(n)}catch(jt){return}}))}(t),a&&t.documentElement.matches(e)&&s.push(t.documentElement),s};function M(e){var t=e.getRootNode();return t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?function(e,t){var n=e.querySelectorAll("slot");if(!n.length)return e.innerText;var r=e.cloneNode(!0),i=r.querySelectorAll("slot");return n.forEach((function(e,t){var n=e.assignedNodes();i[t].innerText=n.map((function(e){switch(e.nodeType){case Node.TEXT_NODE:return e.textContent;case Node.ELEMENT_NODE:return e.innerText}})).filter((function(e){return!!e})).join("\n")})),r.innerText.trim()}(e):e.innerText}var N=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).flattenShadowRootChildren,n=void 0!==t&&t,r=Array.from(e.childNodes);if(e.nodeType===Node.ELEMENT_NODE){var i,o=e;if(o.shadowRoot&&(r=r.filter((function(e){return!e.assignedSlot})),n?r=r.concat(Array.from(o.shadowRoot.childNodes)):r.push(o.shadowRoot)),"slot"===o.tagName.toLowerCase())(i=r).push.apply(i,(0,g.Z)(o.assignedNodes()))}return r},_=function(e){var t=e.parentElement;if(t)return t;switch(e.nodeType){case Node.ELEMENT_NODE:var n=e;if(n.assignedSlot)return n.assignedSlot;break;case Node.DOCUMENT_FRAGMENT_NODE:return e.host}var r=e.parentNode;if(r)switch(r.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return r.host;case Node.DOCUMENT_NODE:if(window.document===r)return null;var i=Array.from(window.document.querySelectorAll("iframe")).find((function(e){return e.contentDocument===r}));if(i)return i}return null};function R(e){if(!e)return!1;var t=e.getBoundingClientRect();return t.top<=window.innerHeight&&t.left<=window.innerWidth&&t.bottom>=0&&t.right>=0}function D(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=window.getComputedStyle(e),r="0"===n.opacity;return{visible:"hidden"!==n.visibility&&"none"!==n.display&&(!t||!r),isTransparent:r}}function O(e,t){var n,r;return null!==(n=null!==t&&void 0!==t?t:null===e||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)&&void 0!==n?n:window}function Z(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.markTransparentElementsAsHidden,i=void 0===r||r,o=n.markElementsHiddenByTransparentElementAsVisible,a=void 0!==o&&o,s=n.scrollIntoView,u=void 0===s||s,c=n.useCache,d=void 0!==c&&c;if(d){var f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=L(t);return n.has(e)?n.get(e):void 0}(e,{markTransparentElementsAsHidden:i,markElementsHiddenByTransparentElementAsVisible:a,scrollIntoView:u});if(f)return f}var h={isHidden:!0},p=function(n){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t&&t.restore(),d&&F(e,n,{markTransparentElementsAsHidden:i,markElementsHiddenByTransparentElementAsVisible:a}),(0,l.Z)((0,l.Z)({},h),n)};if(!e)return p({isHidden:!0});var g=D(e="OPTION"===e.tagName&&(e.closest("select")||e.closest("datalist"))||e,i),b=g.visible,w=g.isTransparent;if(h.isTransparent=w,!b)return p({isHidden:!0});if(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.scrollIntoView,i=void 0===r||r,o=e.parentElement,a=window.getComputedStyle(e);if("absolute"===a.position||"fixed"===a.position)return!1;i&&(t=new y(e).scrollIntoView());var s=function(e){return t&&t.restore(),e};for(;o;){if(!(o instanceof O(e).Element))return s(!1);var u=window.getComputedStyle(o);if("absolute"===u.position||"fixed"===u.position)return s(!1);var c="hidden"===u.overflowX,l="hidden"===u.overflowY;if((c||l)&&!B(o,e,c,l))return s(!0);o=o.parentElement}return s(!1)}(e,{scrollIntoView:u}))return p({isHidden:!0});try{var S;u&&(t=new y(e).scrollIntoView());var I=function(e){var t=e.getBoundingClientRect(),n={top:0,left:0,right:window.innerWidth||document.documentElement.clientWidth,bottom:window.innerHeight||document.documentElement.clientHeight},r={top:Math.max(t.top,n.top),left:Math.max(t.left,n.left),right:Math.min(t.right,n.right),bottom:Math.min(t.bottom,n.bottom)};return r.width=r.right-r.left,r.height=r.bottom-r.top,r.width>0&&r.height>0?r:null}(e);if(!I)return p({isHidden:!0});var C,k=[[I.width/2,I.height/2,!0],[Math.max(.01*I.width,1),Math.max(.01*I.height,1)],[Math.min(.99*I.width,I.width-1),Math.max(.01*I.height,1)],[Math.max(.01*I.width,1),Math.min(.99*I.height,I.height-1)],[Math.min(.99*I.width,I.width-1),Math.min(.99*I.height,I.height-1)]],E=null!==(S=function(e){for(var t=e;t;){if(11===t.nodeType)return t;t=t.parentNode}}(e))&&void 0!==S?S:e.ownerDocument;if(e instanceof O(e).HTMLInputElement&&e.id&&e.type&&["checkbox","radio"].includes(e.type)){var x=T('label[for="'.concat(e.id,'"]'),E);x.length&&(C=x[0])}for(var A=0,M=k;A<M.length;A++){var N=(0,m.Z)(M[A],3),R=N[0],V=N[1],P=N[2],j=I.left+R>=0&&I.left+R<=window.innerWidth?I.left+R:R,W=I.top+V>=0&&I.top+V<=window.innerHeight?I.top+V:V,U=E.elementFromPoint(j,W);if(U===e)return p({isHidden:!1,clickOffset:P?void 0:{x:R,y:V}});if(U){if(!0===P&&U.shadowRoot)return p(Z(U,n));for(var H=U;H;){if(H===e||C&&C===H)return p({isHidden:!1,clickOffset:P?void 0:{x:R,y:V}});H=_(H)}if(a)try{var G,z=E.elementsFromPoint(j,W),q=(0,v.Z)(z);try{for(q.s();!(G=q.n()).done;){var Y=G.value;if(Y===e)return p({isHidden:!1,clickOffset:P?void 0:{x:R,y:V},isBehindTransparentElement:!0});var Q=E.defaultView.getComputedStyle(Y),K=Y.getBoundingClientRect();if("0"!==Q.opacity&&"hidden"!==Q.visibility&&!/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(Q.backgroundColor)||K.width>1.2*I.width||K.height>1.2*I.height)break}}catch(X){q.e(X)}finally{q.f()}}catch(jt){console.error("Error while checking transparent elements over interactable",jt)}}}return t&&(t.restore(),t=void 0),C?Z(C,n):p({isHidden:!0})}catch(jt){throw jt}}var L=function(e){var t=b.getInstance("isElementHidden",{log:!1,flags:e}),n=t.get();return n||(n=new Map,t.set(n)),n};var F=function(e,t){L(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).set(e,t)};function B(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=e.getBoundingClientRect(),o=t.getBoundingClientRect(),a=i.left<o.right&&i.right>o.left,s=i.top<o.bottom&&i.bottom>o.top;return(!n||a)&&(!r||s)}function V(e,t){try{var n=e.ownerDocument.defaultView;return e instanceof n[t]||e instanceof n.top[t]}catch(jt){}return!1}!function(){for(var e=[],t=1;t<=20;t++){var n=t/20;e.push(n)}e.push(0)}();function P(e){try{return"fixed"===getComputedStyle(e).position||!(!e.parentElement||e.parentElement===document.body)&&P(e.parentElement)}catch(jt){return console.error("isAncestorOrSelfFixed",jt),!1}}function j(e){var t=e.getBoundingClientRect().top;return t<0?-t:0}function W(e){var t=e.getBoundingClientRect().bottom,n=window.innerHeight;return t>n?t-n:0}var U=function(e){return Z(e,{useCache:!0}).isHidden},H=function(e,t){var n=e.tagName.toLowerCase();switch(n){case"img":case"video":case"audio":return{type:d.EI.Media,tag:n,src:e.getAttribute("src"),size:{width:e.clientWidth,height:e.clientHeight},screenSize:{width:window.innerWidth,height:window.innerHeight},isRoot:t,isHidden:U(e)};case"svg":return{type:d.EI.SVG,tag:n,components:new p(document).extract(e)[0],isRoot:t,isHidden:U(e)};case"a":return{type:d.EI.Anchor,tag:n,href:e.getAttribute("href"),text:e.innerText,isRoot:t,isHidden:U(e)};case"button":return{type:d.EI.Button,tag:n,text:e.innerText,buttonType:e.getAttribute("type")||"button",isRoot:t,isHidden:U(e)};case"input":return{type:d.EI.Input,tag:n,inputType:e.getAttribute("type"),placeholder:e.getAttribute("placeholder"),isRoot:t,isHidden:U(e)};case"table":case"form":case"textarea":case"iframe":case"select":return{type:d.EI.NoData,tag:n,isRoot:t,isHidden:U(e)}}if(e.innerHTML.trim()===e.innerText&&e.innerHTML.length)return{type:d.EI.Text,tag:n,text:G(e.innerHTML),isRoot:t,isHidden:U(e)}},G=function(e){return e.length>256?e.substring(0,256)+"...":e},z=function(e){return Object.keys(e||{}).reduce((function(t,n){var r=e[n];return r&&(t[n]=r),t}),{})},q=function(e){var t=z(e);return!(!t||!Object.keys(t).length)},Y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord;return i?void 0!==o&&o?e===t||e.startsWith(t)||e.includes(" ".concat(t," "))||e.endsWith(t):e.includes(t):e===t},Q=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.elementsByQueryCache={}}return(0,s.Z)(e,[{key:"getElementsByQuery",value:function(e){return this.elementsByQueryCache[e]||(this.elementsByQueryCache[e]=T(e,this.document)),this.elementsByQueryCache[e]}},{key:"extract",value:function(e){for(var t=this,n=e.element,r=e.setClass,i=e.setAttribute,o=e.getElementsInStructuralVicinity,a=e.getElementsInVisualVicinity,s=function(){var e=n.attributes[u],s=e.name,l=e.value;return c.attributesToExtract.includes(s)?"string"!==typeof l?0:"class"===s?(l.split(" ").forEach((function(e){e.length&&r(e,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,e,{contains:!0,matchWholeWord:!0}))})),0):void i(s,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,l)):0},u=0;u<n.attributes.length;++u)s()}},{key:"processAttribute",value:function(e,t,n){var r=e.element,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=this.getElementsByQuery("*"),u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord,a=void 0!==o&&o;return t=t.replaceAll("\n","\\A ").replaceAll('"','\\"'),i?a?"[".concat(e,'="').concat(t,'"],[').concat(e,'*="').concat(t,' "],[').concat(e,'*=" ').concat(t,' "],[').concat(e,'*=" ').concat(t,'"]'):"[".concat(e,'*="').concat(t,'"]'):"[".concat(e,'="').concat(t,'"]')}(t,n,a),c=this.getElementsByQuery(u),l=this.getElementsByQuery("".concat(r.tagName.toLowerCase())),d=c.filter((function(e){return e.tagName===r.tagName})),f=i?i():[],h=f.filter((function(e){return e.element.attributes[t]&&Y(e.element.attributes[t].value,n,a)})),p=o?o():[],v=p.filter((function(e){return e.element.attributes[t]&&Y(e.element.attributes[t].value,n,a)}));return{value:n,globalUniqueness:1-c.length/s.length,tagUniqueness:1-d.length/l.length,structuralVicinityUniqueness:i?1-h.length/f.length:void 0,visualVicinityUniqueness:o?1-v.length/p.length:void 0}}}]),e}(),K=function(){function e(t){var n=this;(0,a.Z)(this,e),this.el=null,this.structuralVicinityData=void 0,this.visualVicinityData=void 0,this.serializedElement="",this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.react=void 0,this.innerFeatures=void 0,this.positioning=void 0,this.svgs=void 0,this.attributesExtractor=void 0,this.getElementsInStructuralVicinity=function(){return n.structuralVicinityData.elementsInStructuralVicinity},this.setElementStructuralVicinityData=function(e){n.structuralVicinityData=e},this.setElementVisualVicinityData=function(e){n.visualVicinityData=e},this.getElementsInVisualVicinity=function(){return n.visualVicinityData},this.setSerializedElement=function(e){n.serializedElement=e},this.setAttribute=function(e,t){n.attributes[e]=t},this.setClass=function(e,t){n.classes[e]=t},this.setInnerText=function(e){n.innerText=e},this.setStyle=function(e){n.style=e},this.setTag=function(e){n.tag=e},this.setReact=function(e){n.react=e},this.setInnerFeatures=function(e){n.innerFeatures=e},this.setPositioning=function(e){n.positioning=e},this.setSVGs=function(e){n.svgs=e},this.el=t,this.attributesExtractor=new Q(this.el.ownerDocument)}return(0,s.Z)(e,[{key:"serialize",value:function(){}},{key:"getSerializedElement",value:function(){return this.serializedElement}},{key:"element",get:function(){return this.el}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getClasses",value:function(){return this.classes}},{key:"getStyle",value:function(){return this.style}},{key:"getInlineStyle",value:function(){return this.style.inline}},{key:"getComputedStyle",value:function(){return this.style.computed}},{key:"getTag",value:function(){return this.tag}},{key:"getInnerFeatures",value:function(){return this.innerFeatures}},{key:"getInnerText",value:function(){return this.innerText}},{key:"getSVGs",value:function(){return this.svgs}},{key:"toMetadata",value:function(){return{structuralVicinity:this.makeStructuralVicinityMetadata(),visualVicinity:this.makeVisualVicinityMetadata(),serializedElement:this.getSerializedElement(),attributes:this.getAttributes(),classes:this.getClasses(),innerText:this.getInnerText(),tag:this.getTag(),style:this.getStyle(),innerFeatures:this.getInnerFeatures(),staticCandidates:this.extractStaticCandidates(),positioning:this.positioning,svgs:this.getSVGs()}}},{key:"extractStaticCandidates",value:function(){return z({text:this.extractStaticTextCandidate(),labeled:this.extractLabeled(),labeling:this.extractLabeling(),svgTitle:this.extractSVGTitle()})}},{key:"makeVicinityMetadata",value:function(e,t){var n=this;return e.reduce((function(e,r){var i=n.isVicinityQualifiedElement(r.element),o=i.qualified,a=i.feature;if(!o)return e;var s={},u={};n.attributesExtractor.extract({element:r.element,setClass:function(e,t){return s[e]=t},setAttribute:function(e,t){return u[e]=t}});var c=(0,l.Z)({tag:r.element.tagName.toLowerCase(),classes:s,attributes:u,text:n.extractTextForMetadata(r.element),feature:a,relativePosition:n.element.compareDocumentPosition(r.element)},t(r));return e.push(c),e}),[])}},{key:"makeStructuralVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInStructuralVicinity(),(function(e){return{position:e.position}}))}},{key:"makeVisualVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInVisualVicinity(),(function(e){return{position:[e.position],distance:e.distance}}))}},{key:"isVicinityQualifiedElement",value:function(e){if(e===this.element)return{qualified:!1};if(!c.vicinityFeatureElementsOnly)return{qualified:!0};var t=H(e);return{qualified:!!t,feature:t}}},{key:"extractTextForMetadata",value:function(e){if(e.innerHTML===e.innerText){var t=e.innerHTML;return t.length>256?t.substring(0,256)+"...":t}}},{key:"extractStaticTextCandidate",value:function(){var e,t,n;switch(this.tag){case"input":case"textarea":return null===(e=this.attributes)||void 0===e||null===(t=e.placeholder)||void 0===t?void 0:t.value;default:return null===(n=this.innerText)||void 0===n?void 0:n.content}}},{key:"extractLabeling",value:function(){if("label"===this.element.tagName.toLowerCase())return M(this.element);var e=A(this.element,"label");if(e&&this.attributeExists(e.getAttribute("for")))return M(e);try{if(this.element.id&&this.element.id.length)if(T('[aria-labelledby="'.concat(this.element.id,'"]')).length)return M(this.element)}catch(jt){console.error("extractLabeling error",jt)}}},{key:"extractLabeled",value:function(){var e=this.element.getAttribute("aria-label");if(this.attributeExists(e))return e;var t=A(this.element,"label");if(t&&!this.attributeExists(t.getAttribute("for")))return M(t);if(this.element.id&&this.element.id.length)try{var n=T("label[for=".concat(this.element.id,"]"));if(n.length)return M(n[0])}catch(jt){return}var r=this.element.getAttribute("aria-labelledby");if(this.attributeExists(r)){var i=T(r.split(" ").map((function(e){return"#".concat(e)})).join(","));if(i.length)return M(i[0])}}},{key:"extractSVGTitle",value:function(){try{if("svg"!==this.element.tagName.toLowerCase())return;var e=this.element.querySelector("title");if(!e)return;return M(e)}catch(jt){console.error("extractSVGTitle error",jt)}}},{key:"attributeExists",value:function(e){return e&&e.length>0}}]),e}(),X=function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.structuralVicinityData={elementsInStructuralVicinity:[],html:""},this.element=t,this.config=n}return(0,s.Z)(e,[{key:"getInitialLimit",value:function(){switch(this.config.type){case"ratio":return document.querySelectorAll("*").length*this.config.value;case"fixed":return this.config.value}}},{key:"calculate",value:function(){var e=Date.now().toString();return this.structuralVicinityData.html=this.populateStructuralVicinity(this.element,[d.i7.Element],{runId:e,step:0,limit:this.getInitialLimit()}),this.structuralVicinityData.elementsInStructuralVicinity.forEach((function(t){return t.element.attributes.removeNamedItem("checksum-radial-traverse-".concat(e))})),this.structuralVicinityData}},{key:"populateStructuralVicinity",value:function(e,t,n){var r=this,i=n.runId,o=n.step,a=n.limit;if(!e||o>a)return"";if(void 0!==e.attributes["checksum-radial-traverse-".concat(i)])return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute("checksum-radial-traverse-".concat(i),o.toString());var s={runId:i,step:o+1,limit:this.config.useDecayingLimit?a-1:a},u=this.populateStructuralVicinity(_(e),[].concat((0,g.Z)(t),[d.i7.Parent]),s),c=this.populateStructuralVicinity(e.previousElementSibling,[].concat((0,g.Z)(t),[d.i7.LeftSibling]),s),l=this.populateStructuralVicinity(e.nextElementSibling,[].concat((0,g.Z)(t),[d.i7.RightSibling]),s),f=[];(function(e){var t,n,r=Array.from(e.children);return e.shadowRoot&&(t=r=r.filter((function(e){return!e.assignedSlot}))).push.apply(t,(0,g.Z)(Array.from(e.shadowRoot.children))),"slot"===e.tagName.toLowerCase()&&(n=r).push.apply(n,(0,g.Z)(e.assignedElements())),r})(e).map((function(e,n){return f.push(r.populateStructuralVicinity(e,[].concat((0,g.Z)(t),[d.i7.Child]),s))}));var h=c+e.outerHTML.replace(e.innerHTML,f.join(""))+l;return u&&!u.includes(e.outerHTML)?u.replace("></",">".concat(h,"</")):u?u.replace(e.outerHTML,h):h}}]),e}(),J=function(e){return e[e.New=0]="New",e[e.Covered=1]="Covered",e[e.ElementTooBig=2]="ElementTooBig",e[e.Self=3]="Self",e}(J||{}),$=function(){function e(t,n){var r;(0,a.Z)(this,e),this.document=t,this.config=n,this.debug=!1,this.sampleBoxColors=(r={},(0,f.Z)(r,J.New,"green"),(0,f.Z)(r,J.Covered,"orange"),(0,f.Z)(r,J.ElementTooBig,"red"),(0,f.Z)(r,J.Self,"blue"),r)}return(0,s.Z)(e,[{key:"calculate",value:function(e){for(var t=this,n=[],r=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect(),a=o.left-r;a<o.left+o.width+r;a+=i)for(var s=function(){var e=a+i/2,s=u+i/2;if(t.doesRectContain(o,{left:a,top:u,right:a+i,bottom:u+i}))return t.addTrace(e,s,i,J.Self),0;var c=t.document.elementFromPoint(e,s);if(!c)return 0;var l=c.getBoundingClientRect();if(l.width>2*r&&l.height>2*r||t.doesRectContain(l,o))return t.addTrace(e,s,i,J.ElementTooBig),0;if(!!n.find((function(e){return e.element===c})))return t.addTrace(e,s,i,J.Covered),0;var d=t.getPosition(o,l),f=d.position,h=d.distance;n.push({element:c,position:f,distance:h}),t.addTrace(e,s,i,J.New)},u=o.top-r;u<o.top+o.height+r;u+=i)s();return n}},{key:"getPosition",value:function(e,t){var n=this.getCenter(t),r=n.x,i=n.y,o=this.getCenter(e),a=o.x,s=o.y;return{distance:Number(Math.sqrt(Math.pow(a-r,2)+Math.pow(s-i,2)).toFixed(2)),position:function(){var e=r-a,t=i-s;return e<0&&t<0?d.BM.TopLeft:e>0&&t<0?d.BM.TopRight:e<0&&t>0?d.BM.BottomLeft:e>0&&t>0?d.BM.BottomRight:0===e&&t<0?d.BM.Top:0===e&&t>0?d.BM.Bottom:e<0&&0===t?d.BM.Left:e>0&&0===t?d.BM.Right:d.BM.Center}()}}},{key:"getCenter",value:function(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}},{key:"addTrace",value:function(e,t,n,r){if(this.debug){var i=this.document.createElement("xdiv");i.setAttribute("style","position: absolute; width: ".concat(n,"px; height: ").concat(n,"px; top: ").concat(t,"px; left: ").concat(e,"px; background: ").concat(this.sampleBoxColors[r],"; z-index: 999999999999;opacity:0.4")),this.document.getElementsByTagName("body")[0].prepend(i)}}},{key:"doesRectContain",value:function(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}},{key:"doRectsOverlap",value:function(e,t){var n=e.right<t.left,r=e.left>t.right,i=e.top>t.bottom,o=e.top<t.top;return!(n||r||i||o)}}]),e}();window.vve=new $({radius:50,scanStep:10});var ee=n(2352);window.resq$=ee.resq$,window.resq$$=ee.resq$$;var te=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=this.findParentComponent(e,{ignoreBaseElement:!0});return{component:t,parentComponent:this.findParentComponent(t.node)}}},{key:"findParentComponent",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.ignoreBaseElement,i=void 0!==r&&r,o=n.baseElement,a=void 0===o?void 0:o,s=(0,ee.resq$$)("*",e.parentElement).find((function(t){return 1===t.children.length&&t.children[0].node===e}));return a=null!==(t=a)&&void 0!==t?t:e,s&&(i||s.node!==a)?this.parseRESQresult(s):this.findParentComponent(e.parentElement,{baseElement:a,ignoreBaseElement:i})}},{key:"parseRESQresult",value:function(e){if(e){return{name:e.name,node:e.node,isFragment:e.isFragment,stateTokens:function e(t){switch(typeof t){case"string":return[t];case"object":return Array.isArray(t)?t.map(e):Object.keys(t)}}(e.state),propsNames:Object.keys(e.props),hasChildren:!!e.children.length}}}}]),e}(),ne=new te,re=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){return{component:void 0,parentComponent:void 0}}}]),e}(),ie=(new re,function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.provider=ne,this.element=t,this.config=n}return(0,s.Z)(e,[{key:"extract",value:function(){return this.provider.extract(this.element)}}]),e}()),oe=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.tagBaseComputedStyle={}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.element,n=e.setStyle,r=t.tagName.toLowerCase();if(!this.tagBaseComputedStyle[r]){var i=this.document.createElement(r);this.document.getElementsByTagName("body")[0].prepend(i),this.tagBaseComputedStyle[r]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}n({inline:this.sanitzieStyle(t.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[r],this.sanitzieStyle(window.getComputedStyle(t)))})}},{key:"diffComputedStyle",value:function(e,t){var n,r;return n=e,r=t,Object.keys(r).reduce((function(e,t){return n[t]===r[t]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},t,r[t]))}),{})}},{key:"sanitzieStyle",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).acceptEmptyValue,n=void 0===t||t;return Object.keys(e).reduce((function(t,r){if(!isNaN(r))return t;var i=e[r];return n||i?(t[r]=i,t):t}),{})}}]),e}(),ae=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.cache=void 0,this.makeFeatureNode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:n?e.tagName.toLowerCase():void 0,feature:n?H(e,t):void 0,children:[],isRoot:t}},this.includeRootElements=!0,this.rootElementsTypeExceptions=[d.EI.Text],this.cache=b.getInstance("innerFeaturesExtractor",{log:!1})}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=[],n=this.makeFeatureNode(e,!0);return this.walk(e,n,t),t}},{key:"getMapFromCache",value:function(){var e=this.cache.get();return e||(e=new Map,this.cache.set(e)),e}},{key:"getFeatureNodeFromCache",value:function(e){var t=this.getMapFromCache();return t.has(e)?t.get(e):void 0}},{key:"addFeatureNodeToCache",value:function(e,t){var n=this.getMapFromCache();n.set(e,t),this.cache.set(n)}},{key:"walk",value:function(e,t,n){var r=this,i=!1;N(e).forEach((function(e){var o,a=null!==(o=r.getFeatureNodeFromCache(e))&&void 0!==o?o:r.makeFeatureNode(e),s=r.walk(e,a,n);s&&t.children.push(a),i||(i=s)}));var o=!!t.feature;return!o||t.isRoot&&!this.shouldIncludeRootNode(t)||n.push(t.feature),this.addFeatureNodeToCache(e,t),o||i}},{key:"shouldIncludeRootNode",value:function(e){return!!this.includeRootElements&&!this.rootElementsTypeExceptions.includes(e.type)}}]),e}();window.inner_features_extractor=new ae;var se=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t;return{content:null!==(t=M(e))&&void 0!==t?t:void 0}}}]),e}(),ue=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.bottom,i=t.left,o=t.right,a=document.documentElement.scrollHeight,s=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(n,window.innerHeight),bottom:this.normalize(r,window.innerHeight),left:this.normalize(i,window.innerWidth),right:this.normalize(o,window.innerWidth)}},document:{size:{height:a,width:s},element:{top:this.normalize(n+window.scrollY,a),bottom:this.normalize(r+window.scrollY,a),left:this.normalize(i+window.scrollX,s),right:this.normalize(o+window.scrollX,s)}}}}},{key:"normalize",value:function(e,t){return e/t}}]),e}(),ce=function(){function e(t,n){(0,a.Z)(this,e),this.xmlSerializer=void 0,this.document=void 0,this.config=void 0,this.visualVicinityExtractor=void 0,this.styleExtractor=void 0,this.innerFeaturesExtractor=void 0,this.innerTextExtractor=void 0,this.positioningExtractor=void 0,this.stats={serializeElement:0,populateElementsInStructuralVicinity:0,populateElementsInVisualVicinity:0,extractAttributes:0,extractInnerText:0,extractStyle:0,extractTag:0,extractInnerFeatures:0,extractPositioning:0,extractSVGComponents:0,final:0},this.xmlSerializer=new XMLSerializer,this.document=t,this.config=null!==n&&void 0!==n?n:c,this.visualVicinityExtractor=new $(this.document,this.config.visualVicinity),this.styleExtractor=new oe(this.document),this.innerFeaturesExtractor=new ae(this.document),this.innerTextExtractor=new se(this.document),this.positioningExtractor=new ue(this.document)}return(0,s.Z)(e,[{key:"isSameDocument",value:function(e){return this.document===e}},{key:"extract",value:function(e){var t=new y(e).scrollIntoView(),n=Date.now(),r=new K(e);return this.serializeElement(r),this.stats.serializeElement+=Date.now()-n,n=Date.now(),this.populateElementsInStructuralVicinity(r),this.stats.populateElementsInStructuralVicinity+=Date.now()-n,n=Date.now(),this.populateElementsInVisualVicinity(r),this.stats.populateElementsInVisualVicinity+=Date.now()-n,n=Date.now(),this.extractAttributes(r),this.stats.extractAttributes+=Date.now()-n,n=Date.now(),this.extractInnerText(r),this.stats.extractInnerText+=Date.now()-n,n=Date.now(),this.extractStyle(r),this.stats.extractStyle+=Date.now()-n,n=Date.now(),this.extractTag(r),this.stats.extractTag+=Date.now()-n,n=Date.now(),this.extractInnerFeatures(r),this.stats.extractInnerFeatures+=Date.now()-n,n=Date.now(),this.extractPositioning(r),this.stats.extractPositioning+=Date.now()-n,n=Date.now(),this.extractSVGComponents(r),this.stats.extractSVGComponents+=Date.now()-n,n=Date.now(),t.restore(),this.stats.final+=Date.now()-n,r}},{key:"extractReact",value:function(e){var t=e.element;(0,e.setReact)(new ie(t,this.config.react).extract())}},{key:"extractTag",value:function(e){var t=e.element;(0,e.setTag)(t.tagName.toLowerCase())}},{key:"extractPositioning",value:function(e){var t=e.element;(0,e.setPositioning)(this.positioningExtractor.extract(t))}},{key:"extractSVGComponents",value:function(e){var t=e.element;(0,e.setSVGs)(new p(this.document).extract(t))}},{key:"serializeElement",value:function(e){e.element,e.setSerializedElement}},{key:"extractAttributes",value:function(e){var t=e.element,n=e.setClass,r=e.setAttribute,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity;return new Q(this.document).extract({element:t,setClass:n,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}},{key:"populateElementsInStructuralVicinity",value:function(e){var t=e.element;(0,e.setElementStructuralVicinityData)(new X(t,this.config.structuralVicinity).calculate())}},{key:"populateElementsInVisualVicinity",value:function(e){var t=e.element;(0,e.setElementVisualVicinityData)(this.visualVicinityExtractor.calculate(t))}},{key:"extractInnerText",value:function(e){var t=e.element;(0,e.setInnerText)(this.innerTextExtractor.extract(t))}},{key:"extractStyle",value:function(e){var t=e.element,n=e.setStyle;return this.styleExtractor.extract({element:t,setStyle:n})}},{key:"extractInnerFeatures",value:function(e){var t=e.element;(0,e.setInnerFeatures)(this.innerFeaturesExtractor.extract(t))}}]),e}(),le=n(6336),de=function(){function e(t,n){var r=this;(0,a.Z)(this,e),this.POSITIONING_SATISFACTORY_SCORE=1,this.targetElementESRAMetadata=void 0,this.targetElementStaticData={},this.esraMetadataExtractor=void 0,this.elementsFiltering=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.qualifiedInnerFeatures=void 0,this.qualifiedInnerText=void 0,this.candidateQueries=[],this.candidates=[],this.uniqueCandidates=[],this.queryCandidates=[],this.interactableCandidates=[],this.rankedCandidates=[],this.filteredAndSortedRankedCandidates=[],this.finalCandidates=[],this.removedCandidates=void 0,this.similarity=void 0,this.weightsSum=0,this.config={innerText:{dropIfMoreThanNCandidates:5},innerFeatures:{mandatoryPercentage:.6,mandatoryMax:6},results:{scorePercentile:.75,epsilon:.01}},this.getSelectionResultForCandidate=function(e){var t=b.getInstance("getElementSelectionResult",{log:!1}),n=t.get();if(n||(n=new Map,t.set(n)),n.has(e))return n.get(e);var i=r.extractMetadata(e),o=r.similarity.rank(i),a={score:o.score,candidate:e,scores:o.scores,esraMetadata:i};return n.set(e,a),t.set(n),a},this.targetElementESRAMetadata=t,this.targetElementStaticData=n||t.staticMetadata,this.similarity=new le.k(this.targetElementESRAMetadata),this.esraMetadataExtractor=new ce(document)}return(0,s.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"getWeight",value:function(e){return e/this.weightsSum}},{key:"extractMetadata",value:function(e){return new u(this.esraMetadataExtractor.extract(e).toMetadata())}},{key:"getLastSelectionLogs",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;if(null===(e=this.candidates)||void 0===e||!e.length)return{};var n=new XMLSerializer,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return e.slice(0,t).map((function(e){return{score:e.score,metadata:e.metadata,element:n.serializeToString(e.candidate).substring(0,200)}}))},i=this.rankedCandidates[Math.min(this.rankedCandidates.length-1,t)].score,o=function(e){return r(e,t).filter((function(e){return e.score>=i}))};return{candidatesQuery:this.candidateQueries.filter((function(e){return!!e.length})).join(","),totalUniqueCandidates:this.uniqueCandidates.length,topRankingCandidates:r(this.rankedCandidates,t),topRemovedCandidates:{hidden:o(this.removedCandidates.hidden),staticData:o(this.removedCandidates.static)}}}},{key:"selectByPositioning",value:function(){var e=this.targetElementESRAMetadata.positioning;if(window.innerWidth===e.viewport.size.width&&window.innerHeight===e.viewport.size.height){var t=document.elementFromPoint(e.viewport.element.left,e.viewport.element.top),n=this.extractMetadata(t),r=this.similarity.rank(n).score;return r>=this.POSITIONING_SATISFACTORY_SCORE?{candidate:t,score:r,esraMetadata:n}:void 0}}},{key:"collectCandidates",value:function(){this.setQualifiedAttributesQueries(),this.setQualifiedClassesQueries(),this.setInnerFeaturesQueries(),this.candidates=[];var e=this.candidateQueries.filter((function(e){return!!e.length})).join(",");this.queryCandidates=[],e.length&&(this.queryCandidates=T(e)),this.interactableCandidates=[],this.elementsFiltering!==d.Qy.Query&&(this.interactableCandidates=k())}},{key:"select",value:function(){var t,n,r=this;console.log("selecting elements, filtering: ",this.elementsFiltering);for(var i,o=function(e){switch(e){case d.Qy.Query:return r.queryCandidates;case d.Qy.Intersection:return r.intersectElements(r.queryCandidates,r.interactableCandidates);case d.Qy.Interactables:return r.interactableCandidates;case d.Qy.All:return r.queryCandidates.concat(r.interactableCandidates)}};this.candidates=o(this.elementsFiltering),!this.candidates.length&&this.elementsFiltering!==d.Qy.All;)console.log("no candidates found, expanding selection to ".concat(d.Qy[this.elementsFiltering+1])),this.elementsFiltering++;(console.log("# of query/interactable/total candidates:",this.queryCandidates.length,this.interactableCandidates.length,this.candidates.length),(t=this.candidates).push.apply(t,(0,g.Z)(this.getInnerTextCandidates())),this.candidates.length)||(i=this.candidates).push.apply(i,(0,g.Z)(this.getTagCandidates()));this.uniqueCandidates=this.candidates.filter((function(e,t,n){return n.indexOf(e)===t}));var a=e.limitChildren;null!==(n=a)&&void 0!==n&&n.length&&(a=a.map((function(e){return(0,l.Z)((0,l.Z)({},e),{},{parent:document.querySelector(e.selector)})})),this.uniqueCandidates=this.uniqueCandidates.filter((function(e){var t,n=(0,v.Z)(a);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.parent&&r.isDescendant(i.parent,e)&&i.limit--<=0)return!1}}catch(o){n.e(o)}finally{n.f()}return!0}))),this.rankedCandidates=this.uniqueCandidates.filter((function(e){return e instanceof O(e).HTMLElement})).map(this.getSelectionResultForCandidate).sort((function(e,t){return t.score-e.score})),this.removedCandidates={hidden:[],static:[]},this.filteredAndSortedRankedCandidates=this.rankedCandidates.filter((function(e){var t=r.isHidden(e.candidate),n=t.isHidden,i=t.clickOffset;return!0===n?(r.removedCandidates.hidden.push(e),!1):(i&&(e.clickOffset=i),!(q(r.targetElementStaticData)&&!function(e,t){var n=z(e),r=z(t),i=function(e){return!e||0===Object.keys(e).length};if(i(n)&&i(r))return!0;if(i(n)||i(r))return!1;var o=Object.keys(n).sort(),a=Object.keys(r).sort();if(o.length!==a.length)return!1;if(!o.every((function(e,t){return e===a[t]})))return!1;for(var s in n)if(n[s]!==r[s])return!1;return!0}(r.formatStaticCandidates(e.esraMetadata.staticCandidates),r.targetElementStaticData))||(e.metadata=JSON.stringify(e.esraMetadata.staticCandidates),r.removedCandidates.static.push(e),!1))})),this.removedCandidates.hidden.slice().reverse().forEach((function(e,t,n){"INPUT"===e.candidate.tagName&&r.filteredAndSortedRankedCandidates.find((function(t){return t.score>.1&&t.candidate.contains(e.candidate)}))&&(r.removedCandidates.hidden.splice(n.length-1-t,1),r.filteredAndSortedRankedCandidates.push(e))})),this.filteredAndSortedRankedCandidates=this.filteredAndSortedRankedCandidates.sort((function(e,t){return t.score-e.score}));var s=this.filteredAndSortedRankedCandidates.length*(1-this.config.results.scorePercentile);this.finalCandidates=[];for(var u=null,c=0;c<this.filteredAndSortedRankedCandidates.length;++c){var f=this.filteredAndSortedRankedCandidates[c];if(c>=s&&(!u||u.score-f.score>this.config.results.epsilon))break;u=f,this.finalCandidates.push(f)}return this.finalCandidates}},{key:"intersectElements",value:function(e,t){var n=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).useElementSize,n=void 0!==t&&t,r=new Set;return e.forEach((function(e){for(var t=2,i=e;i&&t-- >0&&(r.add(i),!(n&&Math.abs(i.parentElement.clientWidth-i.clientWidth)>.3*i.clientWidth&&Math.abs(i.parentElement.clientHeight-i.clientHeight)>.3*i.clientHeight));)i=i.parentElement})),r},r=n(e),i=n(t),o=new Set;return r.forEach((function(e){i.has(e)&&o.add(e)})),Array.from(o)}},{key:"selectOne",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.elementsFiltering,n=void 0===t?d.Qy.Intersection:t,r=e.minSelectionScore,i=void 0===r?.3:r;if(this.elementsFiltering=n,"html"===this.targetElementESRAMetadata.tag){var o=document.querySelector("html");return{candidate:o,score:1,esraMetadata:this.extractMetadata(o)}}var a=this.selectByPositioning();if(a)return a;for(this.collectCandidates();;){var s=this.select();if(!s.length)break;var u=s[0].score;if(!(u<i&&this.elementsFiltering!==d.Qy.All))return s[0];this.elementsFiltering++,console.log("Best matching element is below threshold (".concat(u,"/").concat(i,"), expanding selection to ").concat(d.Qy[this.elementsFiltering]))}return{candidate:void 0,score:0,esraMetadata:void 0}}},{key:"getFinalCandidates",value:function(){return this.finalCandidates}},{key:"setQualifiedAttributesQueries",value:function(){var e=this;this.candidateQueries.push(this.similarity.getQualifiedAttributes().map((function(t){return"[".concat(t,'="').concat(e.targetElementESRAMetadata.attributes[t].value,'"]')})).join(","))}},{key:"setQualifiedClassesQueries",value:function(){this.candidateQueries.push(this.similarity.getQualifiedClasses().map((function(e){return".".concat(e)})).join(","))}},{key:"setInnerFeaturesQueries",value:function(){var e=this,t=this.targetElementESRAMetadata.innerFeatures.filter((function(e){return!e.isRoot}));t.length>10&&(t=Object.values(t.reduce((function(e,t){var n="".concat(t.type,"_").concat(t.tag);return e[n]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},n,t))}),{})));var n,r=Math.min(Math.ceil(t.length*this.config.innerFeatures.mandatoryPercentage),this.config.innerFeatures.mandatoryMax),i=(n=t,n.reduce((function(e,t){var n=e.map((function(e){return[].concat((0,g.Z)(e),[t])})).filter((function(e){return e.length<=r}));return e.concat(n)}),[[]])).filter((function(e){return e.length===r}));i.forEach((function(t){var n=[];t.forEach((function(t){return n.push(e.getFeatureSelector(t))})),e.cartesian(n).forEach((function(t){return e.candidateQueries.push("*"+t.map((function(e){return":has(".concat(e,")")})).join(""))}))}))}},{key:"cartesian",value:function(e){if(!e.length)return[];var t=[],n=e.length-1;return function r(i,o){for(var a=0,s=e[o].length;a<s;a++){var u=i.slice(0);u.push(e[o][a]),o===n?t.push(u):r(u,o+1)}}([],0),t}},{key:"getFeatureSelector",value:function(e){var t=[e.tag];switch(e.type){case d.EI.Media:e.src&&t.push("".concat(e.tag,'[src="').concat(e.src,'"]'));break;case d.EI.Anchor:t.push("".concat(e.tag,'[href="').concat(e.href,'"]'));break;case d.EI.Button:break;case d.EI.Input:t.push("".concat(e.tag,'[type="').concat(e.inputType,'"]')),e.placeholder&&t.push("".concat(e.tag,'[placeholder="').concat(e.placeholder,'"]'))}return t}},{key:"getInnerTextCandidates",value:function(){var e=this.similarity.getQualifiedInnerText();if(!e)return[];var t=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).tag;return T(void 0===t?"*":t).filter((function(t){var n;return(null===(n=t.innerText)||void 0===n?void 0:n.trim())===e.trim()}))}(e.content);return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}},{key:"getTagCandidates",value:function(){return T(this.targetElementESRAMetadata.tag)}},{key:"isDescendant",value:function(e,t){return e.contains(t)}},{key:"formatStaticCandidates",value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}},{key:"isHidden",value:function(e){return Z(e,{useCache:!0})}}]),e}();de.limitChildren=void 0;var fe,he,pe=n(1752),ve=n(1120),me=n(136),ge=n(7277),ye=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"injectSelectorsAndLocators",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,d,f,h,p,v=this,m=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=(r=m.length>1&&void 0!==m[1]?m[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=n.map((function(e){return{container:e,removedAttributes:v.stripNodeAttributes(e.element)}})),u=0;case 3:if(!(u<s.length)){e.next=15;break}return c=s[u],e.next=7,this.getSelectorAndLocator(c.container.element,{testIdSelector:i,searchParentFrames:a,stripAttributes:!1});case 7:d=e.sent,f=d.selector,h=d.locator,p=d.parentFramesSelectors,s[u]=(0,l.Z)((0,l.Z)({},c),{},{selector:f,locator:h,parentFramesSelectors:p});case 12:u++,e.next=3;break;case 15:return s.forEach((function(e){(e.removedAttributes.id||e.removedAttributes.originalClasses)&&v.restoreNodeAttributes(e.container.element,e.removedAttributes)})),e.abrupt("return",s.map((function(e){var t=e.container,n=e.selector,r=e.locator,i=e.parentFramesSelectors;return(0,l.Z)((0,l.Z)({},t),{},{selector:n,locator:r,parentFramesSelectors:i})})));case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stripNodeAttributes",value:function(e){var t,n,r=e;r.id&&(t=r.id,r.removeAttribute("id"));try{if((n=r.getAttribute("class"))&&"string"===typeof n){var i=n.split(" ").filter((function(e){return!e.startsWith("css-")&&!e.startsWith("jss-")})).join(" ");r.setAttribute("class",i)}else n=void 0}catch(jt){return console.warn("[playwright selector generator] error with class filtering",jt),{}}return{id:t,originalClasses:n}}},{key:"restoreNodeAttributes",value:function(e,t){var n=e,r=t.id,i=t.originalClasses;r&&n.setAttribute("id",r),i&&n.setAttribute("class",i)}},{key:"getSelectorAndLocator",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,S=this,I=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=I.length>1&&void 0!==I[1]?I[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=r.stripAttributes,u=void 0===s||s,n){e.next=3;break}return e.abrupt("return",null);case 3:if(c=this.getIframes(),!a){e.next=10;break}return e.next=7,this.getParentFramesSelectors(n,c);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=[];case 11:if(l=e.t0,d=n,!(f=this.getTestAttributeSelector(d,i))){e.next=16;break}return e.abrupt("return",{selector:f,locator:'locator("'.concat(f,'")'),parentFramesSelectors:l});case 16:return u&&(v=this.stripNodeAttributes(n),h=v.id,p=v.originalClasses),m="",g="",e.prev=18,e.next=21,window.playwright.generateSelectorAndLocator(n);case 21:y=e.sent,m=y.selector,g=y.locator,e.next=42;break;case 26:if(e.prev=26,e.t1=e.catch(18),(b=n.ownerDocument.defaultView)===window){e.next=42;break}return b.playwright||(b.playwright=window.playwright),e.prev=31,e.next=34,b.playwright.generateSelectorAndLocator(n);case 34:w=e.sent,m=w.selector,g=w.locator,e.next=42;break;case 39:e.prev=39,e.t2=e.catch(31),console.log("get selector and locator error",n.nodeType,n,"\n",e.t1,"\n",e.t2);case 42:return e.prev=42,u&&this.restoreNodeAttributes(n,{id:h,originalClasses:p}),e.finish(42);case 45:return g&&l&&l.length>0&&(g=l.map((function(e){return"frameLocator('".concat(S.escapeSingleQuotes(S.escapeBackslash(e)),"')")})).join(".")+".".concat(g)),e.abrupt("return",{selector:m,locator:g,parentFramesSelectors:l});case 47:case"end":return e.stop()}}),e,this,[[18,26,42,45],[31,39]])})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a=window.top,!(r&&r.length>0)){e.next=22;break}s=(0,v.Z)(r),e.prev=4,s.s();case 6:if((u=s.n()).done){e.next=14;break}return c=u.value,e.next=10,a.playwright.$(c);case 10:l=e.sent,a=l.contentWindow;case 12:e.next=6;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),s.e(e.t0);case 19:return e.prev=19,s.f(),e.finish(19);case 22:return e.next=24,a.playwright.$(n);case 24:o=e.sent,e.next=29;break;case 27:e.prev=27,e.t1=e.catch(0);case 29:return e.abrupt("return",null!==(i=o)&&void 0!==i?i:this.selectOnIframe(n));case 30:case"end":return e.stop()}}),e,this,[[0,27],[4,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}())},{key:"getParentFramesSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.length){e.next=2;break}return e.abrupt("return",[]);case 2:if((i=n.ownerDocument)!==document){e.next=5;break}return e.abrupt("return",[]);case 5:if(o=r.find((function(e){return e.contentDocument===i}))){e.next=8;break}return e.abrupt("return",[]);case 8:return e.next=10,this.getSelectorAndLocator(o,{searchParentFrames:!1});case 10:return a=e.sent,e.t0=[],e.t1=g.Z,e.next=15,this.getParentFramesSelectors(o,r);case 15:return e.t2=e.sent,e.t3=(0,e.t1)(e.t2),e.t4=[a.selector],e.abrupt("return",e.t0.concat.call(e.t0,e.t3,e.t4));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getIframes",value:function(){var e=b.getInstance("playwrightElementSelectorGeneratorIframes",{log:!1});if(e.hasCache())return e.get();var t=T("iframe");return e.set(t),t}},{key:"selectOnIframe",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=document.querySelector("iframe")){e.next=3;break}return e.abrupt("return",void 0);case 3:return(i=r.contentWindow).playwright||(i.playwright=window.playwright),e.prev=5,e.next=8,i.playwright.$(n);case 8:return e.abrupt("return",e.sent);case 11:e.prev=11,e.t0=e.catch(5),console.log("selector error",n);case 14:case"end":return e.stop()}}),e,null,[[5,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getTestAttributeSelector",value:function(e,t){for(var n=0,r=[t].concat(["data-cy","data-testid","data-test-id","data-test"]);n<r.length;n++){var i=r[n];if(i&&e.getAttribute(i)){var o="[".concat(i,"='").concat(e.getAttribute(i),"']");if(1===T(o).length)return o;if(T(o).length>1){var a=Array.from(T(o)).indexOf(e);return"".concat(o," >> nth=").concat(a)}}}}},{key:"escapeSingleQuotes",value:function(e){return n="'",r="\\'",(t=e)?t.replace(new RegExp(n,"g"),r):t;var t,n,r}},{key:"escapeBackslash",value:function(e){return e.replace(/\\/g,"\\\\")}}]),e}(),be=[{selector:'path[d="M17.5 13V15.6667C17.5 16.0203 17.3361 16.3594 17.0444 16.6095C16.7527 16.8595 16.357 17 15.9444 17H5.05556C4.643 17 4.24733 16.8595 3.95561 16.6095C3.66389 16.3594 3.5 16.0203 3.5 15.6667V13"] + path[d="M14.6673 6.92057L10.5007 2.75391L6.33398 6.92057"] + path[d="M10.5 2.75391V12.7539"]',description:"export button"},{selector:'path[d="M16.0893 13.1868C16.6838 12.7754 17.1321 12.1858 17.3697 11.503C17.6072 10.8202 17.6216 10.0796 17.4107 9.38816C17.1999 8.69667 16.7748 8.09007 16.1968 7.65594C15.6187 7.2218 14.9177 6.9826 14.1948 6.97285H12.8308C12.6017 6.20011 12.1996 5.48973 11.6549 4.89565C11.1102 4.30157 10.4374 3.83943 9.68735 3.54431C8.93734 3.24918 8.12995 3.12885 7.32648 3.19244C6.52301 3.25603 5.7446 3.50187 5.05036 3.9113C4.35612 4.32072 3.7643 4.88297 3.31985 5.55533C2.8754 6.22769 2.59001 6.99248 2.48535 7.79164C2.38068 8.59079 2.4595 9.40329 2.71582 10.1674C2.97214 10.9316 3.39921 11.6272 3.96461 12.2016"] + path[d="M10.0273 10.0039V16.8241"] + path[d="M13.0585 13.0351L10.0273 10.0039L6.99609 13.0351"]',description:"import button"},{selector:'path[d="M20.4696 21.5303C20.7625 21.8232 21.2373 21.8232 21.5302 21.5303C21.8231 21.2374 21.8231 20.7626 21.5302 20.4697L20.4696 21.5303ZM17.1802 16.1197C16.8873 15.8268 16.4125 15.8268 16.1196 16.1197C15.8267 16.4126 15.8267 16.8874 16.1196 17.1803L17.1802 16.1197ZM18.25 11C18.25 15.0041 15.0041 18.25 11 18.25V19.75C15.8325 19.75 19.75 15.8325 19.75 11H18.25ZM11 18.25C6.99594 18.25 3.75 15.0041 3.75 11H2.25C2.25 15.8325 6.16751 19.75 11 19.75V18.25ZM3.75 11C3.75 6.99594 6.99594 3.75 11 3.75V2.25C6.16751 2.25 2.25 6.16751 2.25 11H3.75ZM11 3.75C15.0041 3.75 18.25 6.99594 18.25 11H19.75C19.75 6.16751 15.8325 2.25 11 2.25V3.75ZM21.5302 20.4697L17.1802 16.1197L16.1196 17.1803L20.4696 21.5303L21.5302 20.4697Z"]',description:"search"},{selector:'path[d="M3.75 10H16.875"] + path[d="M8.125 5L3.125 10L8.125 15"]',description:"back"},{selector:'path[d="M3.33301 8H12.6663"] + path[d="M8 3.33331L12.6667 7.99998L8 12.6666"]',description:"forward"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"new or Add button"},{selector:'path[d="M10 10.75C10.4142 10.75 10.75 10.4142 10.75 10C10.75 9.58579 10.4142 9.25 10 9.25C9.58579 9.25 9.25 9.58579 9.25 10C9.25 10.4142 9.58579 10.75 10 10.75Z"] + path[d="M15.833 10.75C16.2472 10.75 16.583 10.4142 16.583 10C16.583 9.58579 16.2472 9.25 15.833 9.25C15.4188 9.25 15.083 9.58579 15.083 10C15.083 10.4142 15.4188 10.75 15.833 10.75Z"] + path[d="M4.16699 10.75C4.58121 10.75 4.91699 10.4142 4.91699 10C4.91699 9.58579 4.58121 9.25 4.16699 9.25C3.75278 9.25 3.41699 9.58579 3.41699 10C3.41699 10.4142 3.75278 10.75 4.16699 10.75Z"]',description:"open menu"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"add filter"},{selector:'path[d="M15 5L5 15"] + path[d="M5 5L15 15"]',description:"close or remove"},{selector:'path[d="M4 6L8 10L12 6"]',description:"open or close dropdown"},{selector:'path[d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"] + path[d="M12.5 7.5L7.5 12.5"] + path[d="M7.5 7.5L12.5 12.5"]',description:"clear input"},{selector:'path[d="M3.33301 5.49054H4.81449H16.6663"] + path[d="M7.14286 5.49999V3.99999C7.14286 3.60216 7.29337 3.22063 7.56128 2.93932C7.82919 2.65802 8.19255 2.49998 8.57143 2.49998H11.4286C11.8075 2.49998 12.1708 2.65802 12.4387 2.93932C12.7066 3.22063 12.8571 3.60216 12.8571 3.99999V5.49999M15 5.49999V16C15 16.3978 14.8495 16.7793 14.5816 17.0607C14.3137 17.342 13.9503 17.5 13.5714 17.5H6.42857C6.04969 17.5 5.68633 17.342 5.41842 17.0607C5.15051 16.7793 5 16.3978 5 16V5.49999H15Z"] + path[d="M8.33203 9.23726V13.4039"] + path[d="M11.666 9.23726V13.4039"]',description:"delete"},{selector:'path[d="M13.3334 4L6.00008 11.3333L2.66675 8"]',description:"checked"},{selector:'path[d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"]',description:"downward-pointing arrow"},{selector:'path[d="M18.0893 3.08926C18.4147 2.76382 18.4147 2.23618 18.0893 1.91074C17.7638 1.58531 17.2362 1.58531 16.9107 1.91074L18.0893 3.08926ZM9.41074 9.41074L8.82149 10L10 11.1785L10.5893 10.5893L9.41074 9.41074ZM16.9107 1.91074L9.41074 9.41074L10.5893 10.5893L18.0893 3.08926L16.9107 1.91074Z"] + path[d="M17.5 2.5L12.25 17.5L9.25 10.75L2.5 7.75L17.5 2.5Z"]',description:"send"}],we=function(){function e(){(0,a.Z)(this,e),this.observer=void 0,this.monitoringPeriodTimeout=void 0,this.flashingTextElements=[]}return(0,s.Z)(e,[{key:"start",value:function(){var e=this;this.stop(),this.flashingTextElements=[],this.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.length>0&&t.addedNodes.forEach((function(t){t instanceof HTMLElement&&e.includeElement(t)&&setTimeout((function(){e.flashingTextElements.push(e.processTextElements(t))}),1e3)}))}))})),this.observer.observe(document.body,{childList:!0,subtree:!0}),this.monitoringPeriodTimeout=setTimeout((function(){e.stop()}),3e5)}},{key:"stop",value:function(){this.monitoringPeriodTimeout&&(clearTimeout(this.monitoringPeriodTimeout),this.monitoringPeriodTimeout=null),this.observer&&(this.observer.disconnect(),this.observer=null)}},{key:"get",value:function(){var e=this.flashingTextElements.map((function(e){return e.filter((function(e){return!e.isConnected||Z(e.parentElement).isHidden}))})).filter((function(e){return e.length})).map((function(e){return"<span>".concat(e.map((function(e){return e.textContent})).join("</span><span>"),"</span>")})),t=new Set(e);return Array.from(t)}},{key:"stopAndGet",value:function(){return this.stop(),this.get()}},{key:"includeElement",value:function(e){return!(e.getElementsByTagName("*").length>50)&&!(e.outerHTML.length>5e3)}},{key:"processTextElements",value:function(e){for(var t,n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),r=[];t=n.nextNode();)Z(t.parentNode).isHidden||r.push(t);return r}}]),e}(),Se=function(){function e(t){(0,a.Z)(this,e),this.counter=void 0,this.counter=null!==t&&void 0!==t?t:"0"}return(0,s.Z)(e,[{key:"increment",value:function(){for(var e=this.counter.length-1;e>=0;){var t=this.counter[e];if("9"===t)return void(this.counter=this.replaceAt(this.counter,e,"a"));if("z"!==t)return void(this.counter=this.replaceAt(this.counter,e,String.fromCharCode(t.charCodeAt(0)+1)));if(this.counter=this.replaceAt(this.counter,e,"0"),0===e)return void(this.counter="1"+this.counter);e--}}},{key:"get",value:function(){return this.counter}},{key:"incrementAndGet",value:function(){return this.increment(),this.get()}},{key:"getAndIncrement",value:function(){var e=this.get();return this.increment(),e}},{key:"replaceAt",value:function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)}}]),e}(),Ie="checksum-ignore",Ce=.7,ke=function(e,t){var n=t.forceIncludeAttribute,r=t.forceIncludeFileInput,i=t.forceIncludeElements,o=t.limit;e.excludedElements=new Set;var a=e.element,s=null!==o&&void 0!==o?o:Math.min(Math.ceil(.5*a.children.length),a.children.length-20),u=function(e){return!(!n||!(e.hasAttribute(n)||Array.from(e.querySelectorAll("[".concat(n,"]"))).length>0))||(!(!r||"input"!==e.tagName.toLowerCase()||"file"!==e.type)||i.includes(e))},c=Array.from(a.children).filter((function(t){var n=Ee(t);return t.tagName===e.tagName&&n.length>=e.attributes.length&&(!n.length||n.filter((function(t){return e.attributes.includes(t)})).length/Te>=e.attributes.length)})).reduce((function(e,t){return R(V(t,"Element")?t:null===t||void 0===t?void 0:t.parentElement)?e.inViewportElements.push(t):e.outOfViewportElements.push(t),e}),{inViewportElements:[],outOfViewportElements:[]}),l=c.inViewportElements,d=function(t){var n,r=(0,v.Z)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(u(i)||e.excludedElements.add(i),e.excludedElements.size===s)return!0}}catch(o){r.e(o)}finally{r.f()}};return d(c.outOfViewportElements)||d(l),e.excludedElements.forEach((function(e){e.setAttribute(Ie,"")})),Array.from(e.excludedElements)};function Ee(e){return Array.from(e.attributes).filter((function(e){return!e.name.startsWith("checksum")})).map((function(e){return e.name.replace(/[0-9]/g,"")}))}function xe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).nodeRepetitionsThreshold,n=void 0===t?20:t;try{return console.time("bettertemplatize"),fe=new Set,Ae(e,n),console.timeEnd("bettertemplatize"),console.log("[bettertemplatize] templates found:",Array.from(fe)),Array.from(fe)}catch(r){return console.error("[bettertemplatize] failed during template processing:",r.message),[]}}function Ae(e,t){Array.from(e.children).forEach((function(e){if(!(e instanceof SVGElement)){var n=e.children.length;if(n>=t)for(var r=0,i=Array.from(e.children),o=Math.ceil(n*Ce),a=0;a<n;a++)for(var s=a+1;s<n;s++)try{if(Re(i[a],i[s])&&++r>=o)return void fe.add((0,l.Z)({element:e},he))}catch(u){return}Ae(e,t)}}))}var Te=.8,Me=.5,Ne=.8,_e=5;function Re(e,t){var n,r,i,o,a,s,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,c=function(t){return t&&(he={attributes:a,classes:s,tagName:e.nodeName}),t};if(e.nodeType!==t.nodeType)return c(!1);if(e instanceof SVGElement||t instanceof SVGElement)return c(!1);if(e.nodeType===Node.TEXT_NODE)return c(!0);if(e.nodeType!==Node.ELEMENT_NODE)return c(!1);var l=e,d=t;if(l.tagName.toLowerCase()!==d.tagName.toLowerCase())return c(!1);var f=Ee(l),h=Ee(d);if((a=f.filter((function(e){return h.includes(e)}))).length/Math.max(f.length,h.length)<Te)return c(!1);var p=null!==(n=null===(r=l.className)||void 0===r?void 0:r.split(" ").filter((function(e){return e})))&&void 0!==n?n:[],v=null!==(i=null===(o=d.className)||void 0===o?void 0:o.split(" ").filter((function(e){return e})))&&void 0!==i?i:[];if((s=p.filter((function(e){return v.includes(e)}))).length/Math.max(p.length,v.length)<Me)return c(!1);if(u>=_e)return c(!0);if(l.shadowRoot&&!d.shadowRoot||!l.shadowRoot&&d.shadowRoot)return c(!1);var m=Array.from(l.shadowRoot?l.shadowRoot.children:l.children),g=Array.from(d.shadowRoot?d.shadowRoot.children:d.children);if(0===m.length&&0===g.length)return c(!0);for(var y=0,b=0;b<Math.min(m.length,g.length);b++)Re(m[b],g[b],u+1)&&y++;return y/Math.max(m.length,g.length)<Ne?c(!1):c(!0)}var De,Oe=function(e){return e.ARIA_LABEL="aria-label",e.TEXT="text",e}({}),Ze=function(e){return e.SVG="svg",e}(Ze||{}),Le={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},Fe=function(){function e(){(0,a.Z)(this,e),this.interactableElements=void 0,this.nonInteractableElementsFromSimplifiedDom=void 0,this.interactableElementsFromSimplifiedDom=void 0,this.elementsInSimplifiedDomByChecksumId=void 0,this.selectors=void 0,this.flashingElementsDetector=new we,this.forceIncludeElements=[],this.preMapReducedHTMLSelectors=!0,this.templateNodes=void 0,this.nodeRepetitionsThreshold=void 0,this.reducePercentage=50,this.checksumIdCounter=new Se}return(0,s.Z)(e,[{key:"preprocessDocument",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=T("*",t,{includeHTML:!0}),r=(0,v.Z)(n);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(!this.shouldIgnoreElement(i)){var o=Z(i,Le);i.setAttribute("checksum-data-visible",o.isHidden||o.isTransparent?"false":"true"),!o.isHidden&&o.isTransparent&&i.setAttribute("checksum-data-transparently-visible","true"),o.isBehindTransparentElement&&i.setAttribute("checksum-data-visible-under-transparent-element","true"),o.clickOffset&&i.setAttribute("checksum-data-click-offset","".concat(o.clickOffset.x,";").concat(o.clickOffset.y))}}}catch(a){r.e(a)}finally{r.f()}}},{key:"markInteractableElements",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.forceIncludeAttribute,o=r.forceIncludeFileInput;this.interactableElements=[];var a=k(n,e,{allowDisabled:!0,excludeCrossOriginIframes:!1}),s=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;if(!t.shouldIgnoreElement(e)){var o,a,s=null===(n=e.getAttribute("checksum-data-click-offset"))||void 0===n?void 0:n.split(";"),u=s&&{x:parseInt(s[0]),y:parseInt(s[1])},c=(a=i,(o=e)._checksumid||(o._checksumid=null!==a&&void 0!==a?a:t.checksumIdCounter.getAndIncrement()),o.setAttribute("checksumid",o._checksumid),o.setAttribute("checksuminteractable","true"),o._checksumid);t.interactableElements.push({checksumId:c,element:e,forced:r,clickOffset:u})}};a.forEach((function(e){return s(e)}));var u=function(e){T(e,n,{includeHTML:!0}).forEach((function(e){return s(e,!0)}))};i&&u("[".concat(i,"]")),o&&u("input[type='file']"),this.forceIncludeElements.filter((function(e){return e.element.isConnected})).forEach((function(e){var t=e.element,n=e.checksumid;return s(t,!0,n)})),console.log("Marked ".concat(this.interactableElements.length," interactable elements"))}},{key:"truthyFilter",value:function(e){return Boolean(e)}},{key:"shouldIgnoreElement",value:function(e){return e.hasAttribute(Ie)}},{key:"generateSimplifiedDom",value:function(e){var t,n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=a.checkElementInstanceType,u=void 0===s||s,c=a.forceIncludeAttribute,l=void 0===c?void 0:c,d=a.forceIncludeFileInput,f=void 0!==d&&d,h=a.svgIntegration,p=void 0===h?Oe.ARIA_LABEL:h,m=a.onForceIncludeElement,g=void 0===m?void 0:m,y=a.contentWindow,b=void 0===y?window:y,w=a.assignChecksumIdsToAllElements,S=void 0===w||w;if(!e)return null;var I,C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e._originalNode=t,S&&V(e,"Element")&&V(t,"Element")&&!t.hasAttribute("checksumid")){var n=e,i=t;i._checksumid||(i._checksumid=r.checksumIdCounter.getAndIncrement()),n.setAttribute("checksumid",i._checksumid),r.nonInteractableElementsFromSimplifiedDom.push({checksumId:i._checksumid,element:i})}return e},k=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return C(document.createTextNode(t),n)},E=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return C(document.createElement(t),n)};if(e.nodeType===Node.ELEMENT_NODE){var x=e;if("head"===x.tagName.toLowerCase())return null;if(this.shouldIgnoreElement(x))return null}if(e.nodeType===Node.TEXT_NODE)return e.parentElement&&("false"!==e.parentElement.getAttribute("checksum-data-visible")||e.parentElement.hasAttribute("checksumid"))?"body"===e.parentElement.tagName.toLowerCase()?null:null!==(I=e.textContent)&&void 0!==I&&I.trim()?k(e.textContent+" "):null:null;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(u&&!V(e,"HTMLElement")&&!V(e,"SVGElement"))return null;var A=e,T="iframe"===A.tagName.toLowerCase()&&A.contentDocument,M=N(T?A.contentDocument.documentElement:A,{flattenShadowRootChildren:!0});null===(t=o.esraSelectionRules)||void 0===t||null===(n=t.limitChildren)||void 0===n||n.forEach((function(e){A.matches(e.selector)&&M.length>e.limit&&M.splice(e.limit)}));var _=M.map((function(e){return r.generateSimplifiedDom(e,i,o,{checkElementInstanceType:u,forceIncludeAttribute:l,forceIncludeFileInput:f,svgIntegration:p,onForceIncludeElement:g,contentWindow:T?A.contentWindow:b,assignChecksumIdsToAllElements:S})})).filter(this.truthyFilter),R="false"!==A.getAttribute("checksum-data-visible"),D=A.hasAttribute("checksumid"),O=A.hasAttribute("role"),Z=this.getElementCustomDescription(A,{enableSVGCustomDescription:!!p}),L=Z.customDescription,F=Z.customDescriptionTarget,B=!!L,P=A.hasAttribute("aria-label")||A.hasAttribute("name")||A.hasAttribute("alt"),j=this.forceIncludeElements.map((function(e){return e.element})).includes(A)||!!l&&A.hasAttribute(l)||f&&"input"===A.tagName.toLowerCase()&&"file"===A.getAttribute("type"),W=D||R&&(O||P||B||A.matches(["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"].join(",")));if(!(W||j)){if(!_.length)return null;if(1===_.length&&!V(_[0],"Text"))return _[0]}!W&&j&&(null===g||void 0===g||g(A));var U=function(){if(B&&F===Ze.SVG)switch(p){case Oe.ARIA_LABEL:var e=E("svg");return e.setAttribute("aria-label",L),{simplifiedNode:e,appendChildren:!1};case Oe.TEXT:if(A.hasAttribute("checksumid")){var t=E("div");return t.innerText=L,{simplifiedNode:t,appendChildren:!1}}return{simplifiedNode:k(" [".concat(L,"] ")),appendChildren:!1}}var n="body"===A.tagName.toLowerCase()&&A.ownerDocument!==document?"div":A.tagName;return{simplifiedNode:E(n)}}(),H=U.simplifiedNode,G=U.appendChildren,z=void 0===G||G;if(!V(H,"Element"))return H;var q,Y=H,Q=["aria-.+","data-name","name","type","placeholder","content","value","role","icon","title","checksumid","checksuminteractable","checked","disabled","selected","label","required","inputmode","min","max","step","minlength","maxlength","alt","hidden","draggable","ondrop","ondragover","contenteditable","href","(data-)?test(-)?id"].concat(i),K=A.attributes,X=(0,v.Z)(K);try{for(X.s();!(q=X.n()).done;){var J,$=q.value,ee=(0,v.Z)(Q);try{for(ee.s();!(J=ee.n()).done;){var te,ne=J.value;if(new RegExp("^"+ne+"$").test($.name))Y.setAttribute($.name,null===(te=$.value)||void 0===te||te)}}catch(ie){ee.e(ie)}finally{ee.f()}}}catch(ie){X.e(ie)}finally{X.f()}if(A.isContentEditable?Y.setAttribute("contenteditable","true"):["TEXTAREA","INPUT","SELECT"].includes(A.tagName)||"text"!==window.getComputedStyle(A).cursor||Y.setAttribute("contenteditable","cursor-text"),V(A,"HTMLInputElement")&&"checkbox"===A.getAttribute("type"))A.checked&&Y.setAttribute("checked","true");else if(V(A,"HTMLInputElement")||V(A,"HTMLSelectElement"))Y.setAttribute("value",A.value);else if(V(A,"HTMLTextAreaElement")&&!A.childNodes.length&&A.value){var re=k(A.value);Y.appendChild(re)}return z&&_.forEach((function(e){return Y.appendChild(e)})),Y}},{key:"getElementCustomDescription",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).enableSVGCustomDescription,n=void 0===t||t;return(V(e,"SVGElement")||"svg"===e.tagName.toLowerCase())&&n?{customDescriptionTarget:Ze.SVG,customDescription:this.getSVGDescriptionForElement(e)}:{}}},{key:"getSVGDescriptionForElement",value:function(e){var t=this.findSvgElementDescriptionFromBank(e);if(t)return t;var n=e.querySelector("title");return n?n.textContent:void 0}},{key:"findSvgElementDescriptionFromBank",value:function(e){var t;return null===(t=this.getSvgBank().find((function(t){return e.matches("svg:has(".concat(t.selector,")"))})))||void 0===t?void 0:t.description}},{key:"getSvgBank",value:function(){return be}},{key:"restoreDom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;T("*",e).forEach((function(e){e.removeAttribute("checksum-data-visible"),e.removeAttribute("checksum-data-transparently-visible"),e.removeAttribute("checksum-data-visible-under-transparent-element"),e.removeAttribute("checksumid"),e.removeAttribute("checksuminteractable"),e.removeAttribute("checksum-data-click-offset"),e.removeAttribute(Ie)}))}},{key:"removeAttribute",value:function(e){T("*",document).forEach((function(t){t.removeAttribute(e)}))}},{key:"mapAndStoreSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},r=new ye,e.t0=v.Z,e.next=5,r.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom);case 5:e.t1=e.sent,i=(0,e.t0)(e.t1),e.prev=7,i.s();case 9:if((o=i.n()).done){e.next=18;break}if(a=o.value,s=a.checksumId,u=a.element,c=a.clickOffset,l=a.selector,d=a.locator,f=a.parentFramesSelectors,l){e.next=14;break}return console.warn("Unable to get selector for element",u),e.abrupt("continue",16);case 14:h=u,n[s]={element:h,selector:l,locator:d,clickOffset:c,parentFramesSelectors:f,innerText:h.innerText};case 16:e.next=9;break;case 18:e.next=23;break;case 20:e.prev=20,e.t2=e.catch(7),i.e(e.t2);case 23:return e.prev=23,i.f(),e.finish(23);case 26:return e.abrupt("return",n);case 27:case"end":return e.stop()}}),e,this,[[7,20,23,26]])})));return function(){return e.apply(this,arguments)}}()},{key:"shouldFurtherReduce",value:function(e){return!e||e.outerHTML.length>16e3}},{key:"getRepeatingElementsToExclude",value:function(e,t,n){if(e.length<=t)return[];var r=t,i=e.reduce((function(e,t){var n=t._originalNode;return R(V(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(t):e.outOfViewportElements.push(t),e}),{inViewportElements:[],outOfViewportElements:[]}),o=i.inViewportElements,a=i.outOfViewportElements,s=[],u=function(e){var t,i,o=(0,v.Z)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(i=a,n&&(i.hasAttribute(n)||Array.from(i.querySelectorAll("[".concat(n,"]"))).length>0)||s.push(a),s.length===r)return!0}}catch(u){o.e(u)}finally{o.f()}};return u(a)||u(o),s}},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,y,w,S,I,C,k,E,x,A,T,M,N,_,R,D,O,Z,L,F=this,B=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=B.length>1&&void 0!==B[1]?B[1]:{}).checkElementInstanceType,o=void 0===i||i,a=r.extraAllowedAttributes,s=void 0===a?[]:a,u=r.maintainSelectorsMapping,c=void 0===u||u,l=r.initialChecksumId,d=void 0===l?"0":l,f=r.forceIncludeAttribute,h=r.forceIncludeFileInput,p=void 0!==h&&h,v=r.invalidateCache,m=void 0!==v&&v,y=r.svgIntegration,w=void 0===y?Oe.ARIA_LABEL:y,S=r.includeFlashingElements,I=void 0===S||S,C=r.onForceIncludeElement,k=r.limitNodeRepetitions,E=void 0===k?50:k,x=r.stopFlashingElementsDetection,A=void 0!==x&&x,T=r.assignChecksumIdsToAllElements,M=void 0===T||T,N=B.length>2&&void 0!==B[2]?B[2]:document,console.time("reduceHTML"),!(_=b.getInstance("reduce",{target:N,monitorInput:!0,invalidate:m,log:!1})).hasCache()){e.next=6;break}return e.abrupt("return",_.get());case 6:R=I?this.flashingElementsDetector.get():void 0,A&&this.flashingElementsDetector.stop(),this.nodeRepetitionsThreshold=E,this.reducePercentage=50,this.templateNodes=void 0,D=function(e){return ke(e,{forceIncludeAttribute:f,forceIncludeFileInput:p,forceIncludeElements:F.forceIncludeElements.map((function(e){return e.element})),limit:Math.min(Math.ceil(e.element.children.length*(F.reducePercentage/100)),e.element.children.length-6)})},console.log("Running pre-templatize"),this.templatize(D),console.log("Preprocessing document..."),this.preprocessDocument(N);case 16:if(this.checksumIdCounter=new Se(null!==d&&void 0!==d?d:"0"),console.log("Marking interactable elements..."),this.markInteractableElements(n,N,{forceIncludeAttribute:f,forceIncludeFileInput:p}),console.log("Generating simplified DOM..."),this.nonInteractableElementsFromSimplifiedDom=[],O=this.generateSimplifiedDom(N.documentElement,s,n,{checkElementInstanceType:o,forceIncludeAttribute:f,forceIncludeFileInput:p,svgIntegration:w,onForceIncludeElement:C,assignChecksumIdsToAllElements:M})){e.next=25;break}throw new Error("Unable to get simplified DOM");case 25:if(!this.shouldFurtherReduce(O)){e.next=33;break}if(console.log("Will further reduce (".concat(O.outerHTML.length,")...")),this.templatize(D)){e.next=30;break}return console.log("Exceeded maximum html reduction, stopping (html size: ".concat(O.outerHTML.length,")")),e.abrupt("break",36);case 30:this.removeAttribute("checksumid"),e.next=34;break;case 33:return e.abrupt("break",36);case 34:e.next=16;break;case 36:if(console.log("Simplified DOM generated, length:",O.outerHTML.length),Z=new Set(Array.from(O.querySelectorAll("[checksumid]")).map((function(e){return e.getAttribute("checksumid")}))),this.interactableElementsFromSimplifiedDom=this.interactableElements.filter((function(e){return Z.has(e.checksumId)})),console.log("Found ".concat(this.interactableElementsFromSimplifiedDom.length," interactable elements in simplified DOM vs ").concat(this.interactableElements.length," in original DOM")),console.log("Restoring DOM..."),this.restoreDom(N),this.preMapReducedHTMLSelectors=!!n.preMapReducedHTMLSelectors,!this.preMapReducedHTMLSelectors||!c){e.next=49;break}return console.log("Mapping selectors..."),e.next=47,this.mapAndStoreSelectors();case 47:this.selectors=e.sent,console.log("Done mapping selectors");case 49:return this.elementsInSimplifiedDomByChecksumId=[].concat((0,g.Z)(this.interactableElementsFromSimplifiedDom),(0,g.Z)(this.nonInteractableElementsFromSimplifiedDom)).reduce((function(e,t){return e[t.checksumId]=t,e}),{}),L={reducedDomHTMLElement:O,reducedHTML:O.outerHTML,currentChecksumId:this.checksumIdCounter.get(),flashingHTML:R},_.set(L),console.timeEnd("reduceHTML"),e.abrupt("return",L);case 54:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"templatize",value:function(e){if(this.templateNodes)if(this.reducePercentage<98)this.reducePercentage=Math.min(this.reducePercentage+20,98),console.log("Increasing reduce percentage to",this.reducePercentage);else{if(this.nodeRepetitionsThreshold<=20)return!1;this.reducePercentage=50;var t=this.templateNodes.length;do{this.nodeRepetitionsThreshold-=10,console.log("Reducing node repetitions threshold to",this.nodeRepetitionsThreshold),this.templateNodes=xe(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold})}while(this.templateNodes.length===t&&this.nodeRepetitionsThreshold>20)}else this.templateNodes=xe(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold});var n=Array.from(this.templateNodes).reduce((function(t,n){return t+e(n).length}),0);return console.log("[templatize] ".concat(n," elements marked to ignore for ").concat(this.templateNodes.length," templates")),!0}},{key:"getSelectorForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(h.length>1&&void 0!==h[1]?h[1]:{}).forceGenerate,o=void 0!==i&&i,a={selector:n,element:null,innerText:"",locator:"",parentFramesSelectors:[]},this.preMapReducedHTMLSelectors&&!o){e.next=14;break}if(s=new ye,u=this.elementsInSimplifiedDomByChecksumId[n]){e.next=7;break}return e.abrupt("return",a);case 7:return e.next=9,s.getSelectorAndLocator(u.element);case 9:return c=e.sent,l=c.selector,d=c.locator,f=c.parentFramesSelectors,e.abrupt("return",{element:u.element,selector:l,locator:d,clickOffset:u.clickOffset,parentFramesSelectors:f,innerText:u.element.innerText});case 14:if(this.selectors[n]||o){e.next=16;break}return e.abrupt("return",this.getSelectorForChecksumId(n,{forceGenerate:!0}));case 16:return e.abrupt("return",null!==(r=this.selectors[n])&&void 0!==r?r:a);case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getElementForChecksumId",value:function(e){var t;return null===(t=this.elementsInSimplifiedDomByChecksumId[e])||void 0===t?void 0:t.element}},{key:"hasInnerTextByChecksumId",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.maxLength,i=void 0===r?void 0:r,o=n.minLength,a=void 0===o?void 0:o;if(!this.preMapReducedHTMLSelectors){var s,u=null===(s=this.elementsInSimplifiedDomByChecksumId[e])||void 0===s?void 0:s.element,c=null===u||void 0===u?void 0:u.innerText;return!!c&&(!(a&&c.length<a)&&!(i&&c.length>i))}return!(null===(t=this.selectors[e])||void 0===t||!t.innerText)}},{key:"getInteractableElements",value:function(){return this.interactableElements}},{key:"getInteractableElementsInReducedHTML",value:function(){return this.interactableElementsFromSimplifiedDom}},{key:"startFlashingElementsDetection",value:function(){return this.flashingElementsDetector.start()}},{key:"addForceIncludeElement",value:function(e){this.forceIncludeElements.push(e)}}]),e}(),Be=function(){function e(){(0,a.Z)(this,e),this.esraExtractors=[],this.appSpecificRules=void 0,this.playwrightSelector=new ye,this.defaultExtractReducedHtmlAndSelector=!1,this.defaultInspectInteractableElements=!1,this.previousTargetNodeForReducedHTML=void 0,this.currentReducedHTMLChecksumIdAllocationCount="0",this.htmlReducer=new Fe}return(0,s.Z)(e,[{key:"getSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=m.length>1&&void 0!==m[1]?m[1]:{}).extractPlaywrightSelector,o=void 0===i||i,a=r.extractEsraMetadata,s=void 0===a||a,u=r.extractReducedHtmlAndSelector,c=void 0===u?this.defaultExtractReducedHtmlAndSelector:u,l=r.inspectInteractableElements,d=void 0===l?this.defaultInspectInteractableElements:l,n){e.next=3;break}return e.abrupt("return",null);case 3:if(console.log("[SessionDigesterSelector] generating for node",n),f={},s&&(console.log("extracting ESRA metadata..."),h=this.getESRAExtractor(n).extract(n),f.esraMetadata=h.toMetadata(),console.log("ESRA metadata extraction complete")),!o){e.next=14;break}return console.log("extracting playwright selector..."),e.next=10,this.playwrightSelector.getSelectorAndLocator(n);case 10:p=e.sent,v=p.selector,f.playwrightSelector=v,console.log("Playwright selector extraction complete");case 14:if(!c){e.next=20;break}return console.log("extracting reduced HTML..."),e.next=18,this.getReducedHTMLAndTargetNodeSelector(n);case 18:f.reducedHTML=e.sent,console.log("Reduced HTML extraction complete");case 20:if(!d){e.next=26;break}return console.log("extracting element inspection..."),e.next=24,this.isElementInteractable(n);case 24:f.interactionFoundOnInspection=e.sent,console.log("Element inspection extraction complete");case 26:return console.log("[SessionDigesterSelector] complete",f),e.abrupt("return",f);case 28:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.playwrightSelector.selector(n));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"setOptions",value:function(e){var t=e.defaultExtractReducedHtmlAndSelector,n=e.defaultInspectInteractableElements;this.defaultExtractReducedHtmlAndSelector=t,this.defaultInspectInteractableElements=n}},{key:"getReducedHTMLAndTargetNodeSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="checksum-target-node",n.setAttribute(r,"true"),i=this.previousTargetNodeForReducedHTML&&this.previousTargetNodeForReducedHTML!==n,this.previousTargetNodeForReducedHTML=n,o=!1,a=function(e){e.hasAttribute(r)&&(o=!0)},e.next=8,this.htmlReducer.reduceHTML(this.appSpecificRules,{initialChecksumId:this.currentReducedHTMLChecksumIdAllocationCount,extraAllowedAttributes:[r],checkElementInstanceType:!1,maintainSelectorsMapping:!1,forceIncludeAttribute:r,invalidateCache:i,onForceIncludeElement:a},n.ownerDocument);case 8:return s=e.sent,u=s.reducedDomHTMLElement,c=s.reducedHTML,l=s.currentChecksumId,n.removeAttribute(r),this.currentReducedHTMLChecksumIdAllocationCount=l,d=u.matches("[".concat(r,"=true]"))?u:u.querySelector("[".concat(r,"=true]")),f=d?d.getAttribute("checksumid"):void 0,e.abrupt("return",{html:c,selector:f,targetForceIncluded:o});case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getESRAExtractor",value:function(e){var t=this.esraExtractors.find((function(t){return t.isSameDocument(e.ownerDocument)}));if(t)return t;var n=new ce(e.ownerDocument);return this.esraExtractors.push(n),n}},{key:"isElementInteractable",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.htmlReducer.getInteractableElements())||!r.length){e.next=3;break}return e.abrupt("return",r.some((function(e){return e.element===n&&!e.forced})));case 3:return e.next=5,k(n.ownerDocument,this.appSpecificRules);case 5:return i=e.sent,e.abrupt("return",i.includes(n));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Ve=n(1414),Pe=n(8739),je=n(6842),We=n(6301),Ue=n.n(We),He=function(e){(0,me.Z)(i,e);var n=(0,ge.Z)(i);function i(e){var t,r=e.sessionMirror,o=e.elementSelector;return(0,a.Z)(this,i),(t=n.call(this)).sessionMirror=void 0,t.elementSelector=void 0,t.numberOfRetries=3,t.currentHref=void 0,t.previousMouseDownData=void 0,t.previousMousePositions=void 0,t.previousMousePositionsNodeSelectors={},t.hasUndefinedFocusNode=!1,t.lastMouseUpTime=0,t.lastMouseDownExtract=void 0,t.allInteractableElementsMetadata={mouseMove:void 0,mouseDown:void 0},t.events=void 0,t.currentEventIndex=-1,t.enableRecordingAvailableInteractableElements=!0,t.useTextInputFastForward=!0,t.textInputFastForwardInitialSelector=void 0,t.appSpecificRules=void 0,t.getBoundingBox=function(e){var n=E(t.sessionMirror.getNodeById(e),t.appSpecificRules.appSpecificInteractableElementsSelectors);if(n)return null===n||void 0===n?void 0:n.getBoundingClientRect()},t.isPointWithinBoundingBox=function(e,t,n){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom},t.isPointWithinNodeBoundingBox=function(e,n,r){var i=t.getBoundingBox(e);return!!i&&(n>=i.left&&n<=i.right&&r>=i.top&&r<=i.bottom)},t.elementSelector=o,t.sessionMirror=r,t}return(0,s.Z)(i,[{key:"setEvents",value:function(e){this.events=e}},{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward,r=void 0===n||n;this.enableRecordingAvailableInteractableElements=t,this.useTextInputFastForward=r}},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"skipEvents",value:function(e){this.currentEventIndex+=e.length}},{key:"preEvent",value:function(e){++this.currentEventIndex}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",r);case 2:if(r.availableInteractableElementsAtStart||!this.enableRecordingAvailableInteractableElements||n.type!==Ve.tw.IncrementalSnapshot||n.data.source!==Ve.yh.MouseInteraction&&n.data.source!==Ve.yh.Input&&n.data.source!==Ve.yh.MediaInteraction){e.next=6;break}return e.next=5,this.getInteractableElementsMetadata();case 5:r.availableInteractableElementsAtStart=e.sent;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMeta",value:function(e){if(e.href!==this.currentHref)return this.currentHref=e.href,{eventCode:je.$.Navigation,url:e.href}}},{key:"getNextUserTriggeredInputEvent",value:function(e){for(var t=this.currentEventIndex+1;t<this.events.length;++t){var n=this.events[t];if(n.type===Ve.tw.IncrementalSnapshot&&n.data.source===Ve.yh.Input&&n.data.userTriggered)return n;if(n.timestamp>e)return}}},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u,c,d=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.userTriggered){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(o=e.sent,(a=this.getInputEventCode(o,n))!==je.$.Input||!this.useTextInputFastForward){e.next=18;break}if(this.textInputFastForwardInitialSelector){e.next=11;break}return e.next=10,this.elementSelector.getSelector(o);case 10:this.textInputFastForwardInitialSelector=e.sent;case 11:return s=(0,l.Z)({eventCode:a},this.textInputFastForwardInitialSelector),u=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=d.getNextUserTriggeredInputEvent(i.timestamp+2e3))){e.next=9;break}return r=n.data,e.next=5,d.getNodeById(r.id);case 5:if((a=e.sent)===o){e.next=8;break}return e.abrupt("return",!1);case 8:return e.abrupt("return",d.getInputEventCode(a,r)===je.$.Input);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=15,u();case 15:if(e.sent){e.next=17;break}this.textInputFastForwardInitialSelector=void 0;case 17:return e.abrupt("return",s);case 18:return e.next=20,this.elementSelector.getSelector(o);case 20:return c=e.sent,e.abrupt("return",(0,l.Z)({eventCode:a},c));case 22:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMouseMove",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.previousMousePositions=n.positions,this.previousMousePositionsNodeSelectors={},!this.isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus()){e.next=39;break}this.previousMousePositionsNodeSelectors={},r={},i=(0,v.Z)(this.previousMousePositions),e.prev=6,i.s();case 8:if((o=i.n()).done){e.next=28;break}if(a=o.value,s=a.id,!r[s]){e.next=13;break}return e.abrupt("continue",26);case 13:return r[s]=!0,e.next=16,this.getNodeById(s);case 16:return u=e.sent,e.prev=17,e.next=20,this.elementSelector.getSelector(u);case 20:this.previousMousePositionsNodeSelectors[s]=e.sent,e.next=26;break;case 23:e.prev=23,e.t0=e.catch(17),console.warn("error with extracting selector for node during previousMousePositionsNodeSelectors mapping",u,e.t0);case 26:e.next=8;break;case 28:e.next=33;break;case 30:e.prev=30,e.t1=e.catch(6),i.e(e.t1);case 33:return e.prev=33,i.f(),e.finish(33);case 36:return e.next=38,this.getInteractableElementsMetadata();case 38:this.allInteractableElementsMetadata.mouseMove=e.sent;case 39:case"end":return e.stop()}}),e,this,[[6,30,33,36],[17,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===Ve.tw.IncrementalSnapshot)switch(t.data.source){case Ve.yh.MouseMove:return!1;case Ve.yh.MouseInteraction:switch(t.data.type){case Ve.Y2.Click:case Ve.Y2.MouseDown:return!0;case Ve.Y2.Focus:return-1===t.data.id}}}return!1}},{key:"handleMouseDown",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNodeById(n.id);case 2:return r=e.sent,e.prev=3,e.t0=r,e.next=7,this.elementSelector.getSelector(r);case 7:return e.t1=e.sent,this.lastMouseDownExtract={node:e.t0,selector:e.t1},e.next=11,this.getInteractableElementsMetadata();case 11:this.allInteractableElementsMetadata.mouseDown=e.sent,e.next=17;break;case 14:e.prev=14,e.t2=e.catch(3),console.warn("error with extracting selector for node during handleMouseDown",r,e.t2);case 17:this.previousMouseDownData=n;case 18:case"end":return e.stop()}}),e,this,[[3,14]])})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseUp",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.lastMouseUpTime=r.timestamp;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isLastMouseDownValidForClick",value:function(e){return!!this.lastMouseDownExtract&&e-this.lastMouseUpTime<10}},{key:"invalidateLastMouseDown",value:function(){this.lastMouseUpTime=0,this.lastMouseDownExtract=void 0,this.allInteractableElementsMetadata.mouseDown=void 0}},{key:"handleFocus",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.hasUndefinedFocusNode=-1===n.id;case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return o=this.isLastMouseDownValidForClick(i.timestamp),a=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var r,a,s,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=19;break}return e.t0=l.Z,e.t1=(0,l.Z)({},u.lastMouseDownExtract.selector),e.t2={},e.next=6,u.elementSelector.getSelector(u.lastMouseDownExtract.node,{extractEsraMetadata:!1});case 6:if(e.t4=r=e.sent,e.t3=null===e.t4,e.t3){e.next=10;break}e.t3=void 0===r;case 10:if(!e.t3){e.next=14;break}e.t5=void 0,e.next=15;break;case 14:e.t5=r.playwrightSelector;case 15:return e.t6=e.t5,e.t7=u.allInteractableElementsMetadata.mouseDown,e.t8={playwrightSelectorForSnapshot:e.t6,availableInteractableElementsAtStart:e.t7},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t8));case 19:return a=u.getNodeIdForClick(n,i),e.next=22,u.getNodeById(a);case 22:if(s=e.sent,!u.previousMousePositionsNodeSelectors[a]){e.next=42;break}return e.t9=l.Z,e.t10=(0,l.Z)({},u.previousMousePositionsNodeSelectors[a]),e.t11={},e.next=29,u.elementSelector.getSelector(s,{extractEsraMetadata:!1});case 29:if(e.t13=c=e.sent,e.t12=null===e.t13,e.t12){e.next=33;break}e.t12=void 0===c;case 33:if(!e.t12){e.next=37;break}e.t14=void 0,e.next=38;break;case 37:e.t14=c.playwrightSelector;case 38:return e.t15=e.t14,e.t16=u.allInteractableElementsMetadata.mouseMove,e.t17={playwrightSelectorForSnapshot:e.t15,availableInteractableElementsAtStart:e.t16},e.abrupt("return",(0,e.t9)(e.t10,e.t11,e.t17));case 42:return e.abrupt("return",u.elementSelector.getSelector(s));case 43:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=6,a();case 6:return s=e.sent,this.invalidateLastMouseDown(),e.abrupt("return",(0,l.Z)({eventCode:je.$.Click},s));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNextMouseMoveEvent",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===Ve.tw.IncrementalSnapshot&&t.data.source===Ve.yh.MouseMove)return t}}},{key:"getNodeIdForClick",value:function(e,t){var n=this;if(this.hasUndefinedFocusNode&&this.previousMouseDownData&&this.previousMouseDownData.id!==e.id){var r={next:function(){var e=n.getNextMouseMoveEvent();if(e){var r=e.data,i=(0,g.Z)(r.positions).reverse().find((function(n){return e.timestamp+n.timeOffset<t.timestamp}));if(i)return i.id}}(),previous:function(){if(n.previousMousePositions){var e=(0,g.Z)(n.previousMousePositions).reverse().find((function(e){return!0}));if(e)return e.id}}(),point:function(){try{var t=n.sessionMirror.getNodeById(e.id),r=Array.from(N(t)).filter((function(e){return"none"===window.getComputedStyle(e).pointerEvents})),i=[];if(r.length){r.forEach((function(e){var t=e,n=t.getAttribute("style");i.push(n),t.setAttribute("style",n+";pointer-events:auto !important")}));var o=document.querySelector("iframe").contentDocument.elementFromPoint(e.x,e.y);if(r.forEach((function(e,t){e.setAttribute("style",i[t])})),o){var a=n.sessionMirror.getMeta(o);if(a)return a.id}}}catch(jt){console.warn("element from point calc error",jt)}}(),original:e.id},i=r.next||r.previous||e.id;return r.point&&function(){if(i===r.point)return!1;var t=n.sessionMirror.getNodeById(i);return n.isPointWithinBoundingBox(e.x,e.y,t.getBoundingClientRect())}()?r.point:i}return e.id}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.numberOfRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionMirror.getNodeById(n)){e.next=9;break}return e.next=8,Ue()(100*(this.numberOfRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?E(u,this.appSpecificRules.appSpecificInteractableElementsSelectors):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"checkbox":case"radio":return t.isChecked?je.$.Check:je.$.UnCheck;default:return je.$.Input}}},{key:"getInteractableElementsMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o,a,s;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.enableRecordingAvailableInteractableElements){e.next=2;break}return e.abrupt("return",[]);case 2:return n=document.querySelector("iframe").contentWindow,i=n.document,console.log("Getting all interactable elements..."),o=k(i,this.appSpecificRules),console.log("Got ".concat(o.length," interactable elements")),console.log("Extracting ESRA metadata for all interactable elements..."),a=new ce(i),e.next=11,Promise.all(o.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.extract(n).toMetadata(),e.abrupt("return",{esraMetadata:r});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 11:return s=e.sent,console.log("Done processing all interactable elements..."),e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),i}(Pe.E),Ge=n(7666),ze=n(3246),qe=n(5512),Ye=n(7326);!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(De||(De={}));var Qe=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Ke(e){var t=[];for(var n in e){var r=e[n];if("string"===typeof r){var i=tt(n);t.push("".concat(i,": ").concat(r,";"))}}return t.join(" ")}var Xe=/-([a-z])/g,Je=/^--[a-zA-Z0-9-]+$/,$e=function(e){return Je.test(e)?e:e.replace(Xe,(function(e,t){return t?t.toUpperCase():""}))},et=/\B([A-Z])/g,tt=function(e){return e.replace(et,"-$1").toLowerCase()},nt=function(){function e(){(0,a.Z)(this,e),this.parentElement=null,this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.ELEMENT_NODE=ut.ELEMENT_NODE,this.TEXT_NODE=ut.TEXT_NODE}return(0,s.Z)(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}();function rt(e){return function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(e,r,i){var o;return(0,a.Z)(this,n),(o=t.call(this)).nodeType=ut.DOCUMENT_TYPE_NODE,o.RRNodeType=De.DocumentType,o.name=e,o.publicId=r,o.systemId=i,o.nodeName=e,o.textContent=null,o}return(0,s.Z)(n,[{key:"toString",value:function(){return"RRDocumentType"}}]),n}(e)}function it(e){return function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=ut.ELEMENT_NODE,r.RRNodeType=De.Element,r.attributes={},r.shadowRoot=null,r.tagName=e.toUpperCase(),r.nodeName=e.toUpperCase(),r}return(0,s.Z)(n,[{key:"textContent",get:function(){var e="";return this.childNodes.forEach((function(t){return e+=t.textContent})),e},set:function(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}},{key:"classList",get:function(){var e=this;return new ct(this.attributes.class,(function(t){e.attributes.class=t}))}},{key:"id",get:function(){return this.attributes.id||""}},{key:"className",get:function(){return this.attributes.class||""}},{key:"style",get:function(){var e=this,t=this.attributes.style?function(e){var t={},n=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[$e(r[0].trim())]=r[1].trim())}})),t}(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=function(r,i,o){if(!n.test(r)){var a=$e(r);i?t[a]=i:delete t[a],"important"===o&&(t[a]+=" !important"),e.attributes.style=Ke(t)}},t.removeProperty=function(r){if(n.test(r))return"";var i=$e(r),o=t[i]||"";return delete t[i],e.attributes.style=Ke(t),o},t}},{key:"getAttribute",value:function(e){return this.attributes[e]||null}},{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"setAttributeNS",value:function(e,t,n){this.setAttribute(t,n)}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"appendChild",value:function(e){return lt(this,e)}},{key:"insertBefore",value:function(e,t){return dt(this,e,t)}},{key:"removeChild",value:function(e){return ft(this,e)}},{key:"attachShadow",value:function(e){var t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}},{key:"dispatchEvent",value:function(e){return!0}},{key:"toString",value:function(){var e="";for(var t in this.attributes)e+="".concat(t,'="').concat(this.attributes[t],'" ');return"".concat(this.tagName," ").concat(e)}}]),n}(e)}function ot(e){return function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=ut.TEXT_NODE,r.nodeName="#text",r.RRNodeType=De.Text,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRText text=".concat(JSON.stringify(this.data))}}]),n}(e)}function at(e){return function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=ut.COMMENT_NODE,r.nodeName="#comment",r.RRNodeType=De.Comment,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRComment text=".concat(JSON.stringify(this.data))}}]),n}(e)}function st(e){return function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeName="#cdata-section",r.nodeType=ut.CDATA_SECTION_NODE,r.RRNodeType=De.CDATA,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRCDATASection data=".concat(JSON.stringify(this.data))}}]),n}(e)}var ut,ct=(0,s.Z)((function e(t,n){var r=this;if((0,a.Z)(this,e),this.classes=[],this.add=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i],s=String(a);r.classes.indexOf(s)>=0||r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))},this.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.classes=r.classes.filter((function(e){return-1===t.indexOf(e)})),r.onChange&&r.onChange(r.classes.join(" "))},t){var i,o=t.trim().split(/\s+/);(i=this.classes).push.apply(i,(0,g.Z)(o))}this.onChange=n}));function lt(e,t){return e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function dt(e,t,n){if(!n)return lt(e,t);if(n.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t.previousSibling=n.previousSibling,n.previousSibling=t,t.nextSibling=n,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument,t}function ft(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}!function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(ut||(ut={}));var ht={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},pt={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},vt=null;function mt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.mirror||t.ownerDocument.mirror;e=function(e,t,n,r){var i;n.afterAppend&&!vt&&(vt=new WeakSet,setTimeout((function(){vt=null}),0));if(!bt(e,t)){var o=yt(t,n.mirror,r);null===(i=e.parentNode)||void 0===i||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case De.Document:if(!wt(e,t,n.mirror,r)){var a=r.getMeta(t);a&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,a),null===vt||void 0===vt||vt.add(e))}break;case De.Element:var s=e,u=t;switch(u.tagName){case"IFRAME":var c=e.contentDocument;if(!c)break;mt(c,t.contentDocument,n,r)}if(u.shadowRoot){s.shadowRoot||s.attachShadow({mode:"open"});var l=s.shadowRoot.childNodes,d=u.shadowRoot.childNodes;(l.length>0||d.length>0)&&gt(Array.from(l),d,s.shadowRoot,n,r)}}return e}(e,t,n,r);var i=e.childNodes,o=t.childNodes;(i.length>0||o.length>0)&&gt(Array.from(i),o,e,n,r),function(e,t,n,r){var i;switch(t.RRNodeType){case De.Document:var o=t.scrollData;o&&n.applyScroll(o,!0);break;case De.Element:var a=e,s=t;switch(function(e,t,n){var r=e.attributes,i=t.attributes,o=function(){var r=i[a],o=n.getMeta(t);if((null===o||void 0===o?void 0:o.isSVG)&&ht[a])e.setAttributeNS(ht[a],a,r);else if("CANVAS"===t.tagName&&"rr_dataURL"===a){var s=document.createElement("img");s.src=r,s.onload=function(){var t=e.getContext("2d");t&&t.drawImage(s,0,0,s.width,s.height)}}else e.setAttribute(a,r)};for(var a in i)o();for(var s=0,u=Array.from(r);s<u.length;s++){var c=u[s].name;c in i||e.removeAttribute(c)}t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}(a,s,r),s.scrollData&&n.applyScroll(s.scrollData,!0),s.inputData&&n.applyInput(s.inputData),s.tagName){case"AUDIO":case"VIDEO":var u=e,c=s;void 0!==c.paused&&(c.paused?u.pause():u.play()),void 0!==c.muted&&(u.muted=c.muted),void 0!==c.volume&&(u.volume=c.volume),void 0!==c.currentTime&&(u.currentTime=c.currentTime),void 0!==c.playbackRate&&(u.playbackRate=c.playbackRate);break;case"CANVAS":var l=t;if(null!==l.rr_dataURL){var d=document.createElement("img");d.onload=function(){var e=a.getContext("2d");e&&e.drawImage(d,0,0,d.width,d.height)},d.src=l.rr_dataURL}l.canvasMutations.forEach((function(t){return n.applyCanvas(t.event,t.mutation,e)}));break;case"STYLE":var f=a.sheet;f&&t.rules.forEach((function(e){return n.applyStyleSheetMutation(e,f)}))}break;case De.Text:case De.Comment:case De.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}(null===vt||void 0===vt?void 0:vt.has(e))&&(vt.delete(e),null===(i=n.afterAppend)||void 0===i||i.call(n,e,n.mirror.getId(e)))}(e,t,n,r)}function gt(e,t,n,r,i){for(var o=0,a=e.length-1,s=0,u=t.length-1,c=e[o],l=e[a],d=t[s],f=t[u],h=void 0,p=void 0;o<=a&&s<=u;)if(void 0===c)c=e[++o];else if(void 0===l)l=e[--a];else if(wt(c,d,r.mirror,i))mt(c,d,r,i),c=e[++o],d=t[++s];else if(wt(l,f,r.mirror,i))mt(l,f,r,i),l=e[--a],f=t[--u];else if(wt(c,f,r.mirror,i)){try{n.insertBefore(c,l.nextSibling)}catch(jt){console.warn(jt)}mt(c,f,r,i),c=e[++o],f=t[--u]}else if(wt(l,d,r.mirror,i)){try{n.insertBefore(l,c)}catch(jt){console.warn(jt)}mt(l,d,r,i),l=e[--a],d=t[++s]}else{if(!h){h={};for(var v=o;v<=a;v++){var m=e[v];m&&r.mirror.hasNode(m)&&(h[r.mirror.getId(m)]=v)}}var g=e[p=h[i.getId(d)]];if(void 0!==p&&g&&wt(g,d,r.mirror,i)){try{n.insertBefore(g,c)}catch(jt){console.warn(jt)}mt(g,d,r,i),e[p]=void 0}else{var y=yt(d,r.mirror,i);"#document"===n.nodeName&&c&&(y.nodeType===y.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||y.nodeType===y.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(n.removeChild(c),r.mirror.removeNodeFromMap(c),c=e[++o]);try{n.insertBefore(y,c||null),mt(y,d,r,i)}catch(jt){console.warn(jt)}}d=t[++s]}if(o>a){var b=t[u+1],w=null;for(b&&(w=r.mirror.getNode(i.getId(b)));s<=u;++s){var S=yt(t[s],r.mirror,i);try{n.insertBefore(S,w),mt(S,t[s],r,i)}catch(jt){console.warn(jt)}}}else if(s>u)for(;o<=a;o++){var I=e[o];if(I&&n.contains(I))try{n.removeChild(I),r.mirror.removeNodeFromMap(I)}catch(jt){console.warn(jt)}}}function yt(e,t,n){var r=n.getId(e),i=n.getMeta(e),o=null;if(r>-1&&(o=t.getNode(r)),null!==o&&bt(o,e))return o;switch(e.RRNodeType){case De.Document:o=new Document;break;case De.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case De.Element:var a=e.tagName.toLowerCase();a=pt[a]||a,o=i&&"isSVG"in i&&(null===i||void 0===i?void 0:i.isSVG)?document.createElementNS(ht.svg,a):document.createElement(e.tagName);break;case De.Text:o=document.createTextNode(e.data);break;case De.Comment:o=document.createComment(e.data);break;case De.CDATA:o=document.createCDATASection(e.data)}i&&t.add(o,Object.assign({},i));try{null===vt||void 0===vt||vt.add(o)}catch(jt){}return o}function bt(e,t){return e.nodeType===t.nodeType&&(e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName)}function wt(e,t,n,r){var i=n.getId(e),o=r.getId(t);return-1!==i&&i===o&&bt(e,t)}var St=function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).UNSERIALIZED_STARTING_ID=-2,r._unserializedId=r.UNSERIALIZED_STARTING_ID,r.mirror=new Dt,r.scrollData=null,e&&(r.mirror=e),r}return(0,s.Z)(n,[{key:"unserializedId",get:function(){return this._unserializedId--}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new It(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t,n=e.toUpperCase();switch(n){case"AUDIO":case"VIDEO":t=new kt(n);break;case"IFRAME":t=new At(n,this.mirror);break;case"CANVAS":t=new Et(n);break;case"STYLE":t=new xt(n);break;default:t=new Ct(n)}return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new Mt(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new Nt(e);return t.ownerDocument=this,t}},{key:"createTextNode",value:function(e){var t=new Tt(e);return t.ownerDocument=this,t}},{key:"destroyTree",value:function(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}},{key:"open",value:function(){(0,pe.Z)((0,ve.Z)(n.prototype),"open",this).call(this),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}]),n}(function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call(this,i)).nodeType=ut.DOCUMENT_NODE,e.nodeName="#document",e.compatMode="CSS1Compat",e.RRNodeType=De.Document,e.textContent=null,e.ownerDocument=(0,Ye.Z)(e),e}return(0,s.Z)(n,[{key:"documentElement",get:function(){return this.childNodes.find((function(e){return e.RRNodeType===De.Element&&"HTML"===e.tagName}))||null}},{key:"body",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===De.Element&&"BODY"===e.tagName})))||null}},{key:"head",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===De.Element&&"HEAD"===e.tagName})))||null}},{key:"implementation",get:function(){return this}},{key:"firstElementChild",get:function(){return this.documentElement}},{key:"appendChild",value:function(e){var t=e.RRNodeType;if((t===De.Element||t===De.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===t})))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ".concat(t===De.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var n=lt(this,e);return n.parentElement=null,n}},{key:"insertBefore",value:function(e,t){var n=e.RRNodeType;if((n===De.Element||n===De.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===n})))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ".concat(n===De.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var r=dt(this,e,t);return r.parentElement=null,r}},{key:"removeChild",value:function(e){return ft(this,e)}},{key:"open",value:function(){this.firstChild=null,this.lastChild=null}},{key:"close",value:function(){}},{key:"write",value:function(e){var t;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===e?t="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===e&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){var n=this.createDocumentType("html",t,"");this.open(),this.appendChild(n)}}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new(rt(nt))(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t=new(it(nt))(e);return t.ownerDocument=this,t}},{key:"createElementNS",value:function(e,t){return this.createElement(t)}},{key:"createTextNode",value:function(e){var t=new(ot(nt))(e);return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new(at(nt))(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new(st(nt))(e);return t.ownerDocument=this,t}},{key:"toString",value:function(){return"RRDocument"}}]),n}(nt)),It=rt(nt),Ct=function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).inputData=null,e.scrollData=null,e}return(0,s.Z)(n)}(it(nt)),kt=function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n)}(function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"attachShadow",value:function(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}},{key:"play",value:function(){this.paused=!1}},{key:"pause",value:function(){this.paused=!0}}]),n}(Ct)),Et=function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rr_dataURL=null,e.canvasMutations=[],e}return(0,s.Z)(n,[{key:"getContext",value:function(){return null}}]),n}(Ct),xt=function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rules=[],e}return(0,s.Z)(n)}(Ct),At=function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(e,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e)).contentDocument=new St,i.contentDocument.mirror=r,i}return(0,s.Z)(n)}(Ct),Tt=ot(nt),Mt=at(nt),Nt=st(nt);function _t(e,t,n,r){var i,o;switch(e.nodeType){case ut.DOCUMENT_NODE:r&&"IFRAME"===r.nodeName?i=r.contentDocument:(i=t).compatMode=e.compatMode;break;case ut.DOCUMENT_TYPE_NODE:var a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break;case ut.ELEMENT_NODE:for(var s=e,u=(o=s)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),c=i=t.createElement(u),l=0,d=Array.from(s.attributes);l<d.length;l++){var f=d[l],h=f.name,p=f.value;c.attributes[h]=p}s.scrollLeft&&(c.scrollLeft=s.scrollLeft),s.scrollTop&&(c.scrollTop=s.scrollTop);break;case ut.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ut.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ut.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ut.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}var v=n.getMeta(e);return t instanceof St&&(v||(v=Ot(i,t.unserializedId),n.add(e,v)),t.mirror.add(i,Object.assign({},v))),i}function Rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Qe,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new St;return function e(r,i){var o=_t(r,n,t,i);if(null!==o)if("IFRAME"!==(null===i||void 0===i?void 0:i.nodeName)&&r.nodeType!==ut.DOCUMENT_FRAGMENT_NODE&&(null===i||void 0===i||i.appendChild(o),o.parentNode=i,o.parentElement=i),"IFRAME"===r.nodeName){var a=r.contentDocument;a&&e(a,o)}else r.nodeType!==ut.DOCUMENT_NODE&&r.nodeType!==ut.ELEMENT_NODE&&r.nodeType!==ut.DOCUMENT_FRAGMENT_NODE||(r.nodeType===ut.ELEMENT_NODE&&r.shadowRoot&&e(r.shadowRoot,o),r.childNodes.forEach((function(t){return e(t,o)})))}(e,null),n}var Dt=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function Ot(e,t){switch(e.RRNodeType){case De.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case De.DocumentType:var n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case De.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case De.Text:case De.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case De.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Zt(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map((function(e){e(n)})),(r=e.get("*"))&&r.slice().map((function(e){e(t,n)}))}}}function Lt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,"undefined"===typeof e?this.scrollLeft:~~e,"undefined"===typeof t?this.scrollTop:~~t)}else{if("number"===typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=function(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function u(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!==typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=l(e,"Y")&&d(e,"Y"),n=l(e,"X")&&d(e,"X");return t||n}function h(t){var n,r,o,s,u=(a()-t.startTime)/i;s=u=u>1?1:u,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,r,i){var s,c,l,d,f=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,d=o.scroll):(s=n,c=n.scrollLeft,l=n.scrollTop,d=u),h({scrollable:s,method:d,startTime:f,startX:c,startY:l,x:r,y:i})}}var Ft,Bt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,a.Z)(this,e),this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed}return(0,s.Z)(e,[{key:"addAction",value:function(e){var t=!0===this.raf;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{var n=this.findActionIndex(e);this.actions.splice(n,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}},{key:"start",value:function(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}},{key:"rafCheck",value:function(){var e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){var t=this.actions[0];if(!(this.timeOffset>=t.delay))break;this.actions.shift(),t.doAction()}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}},{key:"clear",value:function(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}},{key:"setSpeed",value:function(e){this.speed=e}},{key:"isActive",value:function(){return null!==this.raf}},{key:"findActionIndex",value:function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;n=r-1}}return t}}]),e}();function Vt(e,t){if(e.type===Ve.tw.IncrementalSnapshot&&e.data.source===Ve.yh.MouseMove&&e.data.positions&&e.data.positions.length){var n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}function Pt(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Ft||(Ft={}));var jt={type:"xstate.init"};function Wt(e){return void 0===e?[]:[].concat(e)}function Ut(e){return{type:"xstate.assign",assignment:e}}function Ht(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function Gt(e){return function(t){return e===t}}function zt(e){return"string"==typeof e?{type:e}:e}function qt(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Gt(e)}}function Yt(e,t,n){var r=t,i=!1;return[e.filter((function(e){if("xstate.assign"===e.type){i=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(i){t[i]="function"==typeof e.assignment[i]?e.assignment[i](r,n):e.assignment[i]})),r=t,!1}return!0})),r,i]}function Qt(e,t){void 0===t&&(t={});var n=Pt(Yt(Wt(e.states[e.initial].entry).map((function(e){return Ht(e,t.actions)})),e.context,jt),2),r=n[0],i=n[1],o={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Gt(e.initial)},transition:function(t,n){var r,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,u=a.context,c=zt(n),l=e.states[s];if(l.on){var d=Wt(l.on[c.type]);try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),h=f.next();!h.done;h=f.next()){var p=h.value;if(void 0===p)return qt(s,u);var v="string"==typeof p?{target:p}:p,m=v.target,g=v.actions,y=void 0===g?[]:g,b=v.cond,w=void 0===b?function(){return!0}:b,S=void 0===m,I=null!=m?m:s,C=e.states[I];if(w(u,c)){var k=Pt(Yt((S?Wt(y):[].concat(l.exit,y,C.entry).filter((function(e){return e}))).map((function(e){return Ht(e,o._options.actions)})),u,c),3),E=k[0],x=k[1],A=k[2],T=null!=m?m:s;return{value:T,context:x,actions:E,changed:m!==s||E.length>0||A,matches:Gt(T)}}}}catch(Pt){r={error:Pt}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}return qt(s,u)}};return o}var Kt=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function Xt(e){var t=e.initialState,n=Ft.NotStarted,r=new Set,i={_machine:e,send:function(i){n===Ft.Running&&(t=e.transition(t,i),Kt(t,zt(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var o="object"==typeof r?r:{context:e.config.context,value:r};t={value:o.value,actions:[],context:o.context,matches:Gt(o.value)}}return n=Ft.Running,Kt(t,jt),i},stop:function(){return n=Ft.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function Jt(e,t){var n=t.getCastFn,r=t.applyEventsSynchronously,i=t.emitter,o=Qt({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ut({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:Ut((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),Object.assign(Object.assign({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,o=e.timer,a=e.events,s=e.baselineTime,u=e.lastPlayedEvent;o.clear();var c,l=(0,v.Z)(a);try{for(l.s();!(c=l.n()).done;){Vt(c.value,s)}}catch(y){l.e(y)}finally{l.f()}var d=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===Ve.tw.Meta&&r.timestamp<=t)return e.slice(n)}return e}(a,s),f=null===u||void 0===u?void 0:u.timestamp;(null===u||void 0===u?void 0:u.type)===Ve.tw.IncrementalSnapshot&&u.data.source===Ve.yh.MouseMove&&(f=u.timestamp+(null===(t=u.data.positions[0])||void 0===t?void 0:t.timeOffset)),s<(f||0)&&i.emit(Ve.SA.PlayBack);var h,p=new Array,m=(0,v.Z)(d);try{var g=function(){var e=h.value;if(f&&f<s&&(e.timestamp<=f||e===u))return 1;if(e.timestamp<s)p.push(e);else{var t=n(e,!1);o.addAction({doAction:function(){t()},delay:e.delay})}};for(m.s();!(h=m.n()).done;)g()}catch(y){m.e(y)}finally{m.f()}r(p),i.emit(Ve.SA.Flush),o.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:Ut((function(e){return Object.assign(Object.assign({},e),{lastPlayedEvent:null})})),startLive:Ut({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:Ut((function(e,t){var r=e.baselineTime,i=e.timer,o=e.events;if("ADD_EVENT"===t.type){var a=t.payload.event;Vt(a,r);var s=o.length-1;if(!o[s]||o[s].timestamp<=a.timestamp)o.push(a);else{for(var u=-1,c=0;c<=s;){var l=Math.floor((c+s)/2);o[l].timestamp<=a.timestamp?c=l+1:s=l-1}-1===u&&(u=c),o.splice(u,0,a)}var d=a.timestamp<r,f=n(a,d);d?f():i.isActive()&&i.addAction({doAction:function(){f()},delay:a.delay})}return Object.assign(Object.assign({},e),{events:o})}))}});return Xt(o)}var $t=n(1737),en=n(5647),tn=n(3464),nn=new Map;function rn(e,t){var n=nn.get(e);return n||(n=new Map,nn.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function on(e,n,r){var i=this;return function(o){return(0,ze.m)(i,void 0,void 0,(0,t.Z)().mark((function i(){var a,s,u,c,l,d,f,h,p,v,m;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o||"object"!==typeof o||!("rr_type"in o)){t.next=55;break}if(r&&(r.isUnchanged=!1),"ImageBitmap"!==o.rr_type||!("args"in o)){t.next=11;break}return t.next=5,on(e,n,r)(o.args);case 5:return a=t.sent,t.next=8,createImageBitmap.apply(null,a);case 8:return t.abrupt("return",t.sent);case 11:if(!("index"in o)){t.next=18;break}if(!r&&null!==n){t.next=14;break}return t.abrupt("return",o);case 14:return s=o.rr_type,u=o.index,t.abrupt("return",rn(n,s)[u]);case 18:if(!("args"in o)){t.next=31;break}return c=o.rr_type,l=o.args,d=window[c],t.t0=en.Z,t.t1=d,t.t2=g.Z,t.next=26,Promise.all(l.map(on(e,n,r)));case 26:return t.t3=t.sent,t.t4=(0,t.t2)(t.t3),t.abrupt("return",(0,t.t0)(t.t1,t.t4));case 31:if(!("base64"in o)){t.next=35;break}return t.abrupt("return",(0,tn.J)(o.base64));case 35:if(!("src"in o)){t.next=47;break}if(!(f=e.get(o.src))){t.next=41;break}return t.abrupt("return",f);case 41:return(h=new Image).src=o.src,e.set(o.src,h),t.abrupt("return",h);case 45:t.next=53;break;case 47:if(!("data"in o)||"Blob"!==o.rr_type){t.next=53;break}return t.next=50,Promise.all(o.data.map(on(e,n,r)));case 50:return p=t.sent,v=new Blob(p,{type:o.type}),t.abrupt("return",v);case 53:t.next=60;break;case 55:if(!Array.isArray(o)){t.next=60;break}return t.next=58,Promise.all(o.map(on(e,n,r)));case 58:return m=t.sent,t.abrupt("return",m);case 60:return t.abrupt("return",o);case 61:case"end":return t.stop()}}),i)})))}}function an(e,t){try{return t===Ve.FX.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(jt){return null}}var sn=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function un(e,t){if(null===t||void 0===t?void 0:t.constructor){var n=t.constructor.name;if(sn.includes(n)){var r=rn(e,n);r.includes(t)||r.push(t)}}}function cn(e){var n=e.mutation,r=e.target,i=e.type,o=e.imageMap,a=e.errorHandler;return(0,ze.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=an(r,i)){e.next=4;break}return e.abrupt("return");case 4:if(!n.setter){e.next=7;break}return s[n.property]=n.args[0],e.abrupt("return");case 7:return u=s[n.property],e.next=10,Promise.all(n.args.map(on(o,s)));case 10:c=e.sent,l=u.apply(s,c),un(s,l),!1,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),a(n,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}function ln(e){var n=e.event,r=e.mutation,i=e.target,o=e.imageMap,a=e.errorHandler;return(0,ze.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=i.getContext("2d"),!r.setter){e.next=5;break}return s[r.property]=r.args[0],e.abrupt("return");case 5:if(u=s[r.property],"drawImage"!==r.property||"string"!==typeof r.args[0]){e.next=11;break}o.get(n),u.apply(s,r.args),e.next=15;break;case 11:return e.next=13,Promise.all(r.args.map(on(o,s)));case 13:c=e.sent,u.apply(s,c);case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),a(r,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}function dn(e){var n=e.event,r=e.mutation,i=e.target,o=e.imageMap,a=e.canvasEventMap,s=e.errorHandler;return(0,ze.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,u=a.get(n)||r,c="commands"in u?u.commands:[u],![Ve.FX.WebGL,Ve.FX.WebGL2].includes(r.type)){e.next=13;break}l=0;case 5:if(!(l<c.length)){e.next=12;break}return d=c[l],e.next=9,cn({mutation:d,type:r.type,target:i,imageMap:o,errorHandler:s});case 9:l++,e.next=5;break;case 12:return e.abrupt("return");case 13:f=0;case 14:if(!(f<c.length)){e.next=21;break}return h=c[f],e.next=18,ln({event:n,mutation:h,target:i,imageMap:o,errorHandler:s});case 18:f++,e.next=14;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(0),s(r,e.t0);case 26:case"end":return e.stop()}}),e,null,[[0,23]])})))}var fn=Zt||e,hn="[replayer]",pn={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function vn(e){return e.type==Ve.tw.IncrementalSnapshot&&(e.data.source==Ve.yh.TouchMove||e.data.source==Ve.yh.MouseInteraction&&e.data.type==Ve.Y2.TouchStart)}var mn,gn=function(){function e(t,n){var r=this;if((0,a.Z)(this,e),this.usingVirtualDom=!1,this.virtualDom=new St,this.mouseTail=null,this.tailPositions=[],this.emitter=fn(),this.legacy_missingNodeRetryMap={},this.cache=(0,qe.Df)(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=(0,qe.bZ)(),this.styleMirror=new $t.ug,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=function(e){r.iframe.style.display="inherit";for(var t=0,n=[r.mouseTail,r.iframe];t<n.length;t++){var i=n[t];i&&(i.setAttribute("width",String(e.width)),i.setAttribute("height",String(e.height)))}},this.applyEventsSynchronously=function(e){var t,n=(0,v.Z)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;switch(i.type){case Ve.tw.DomContentLoaded:case Ve.tw.Load:case Ve.tw.Custom:continue;case Ve.tw.FullSnapshot:case Ve.tw.Meta:case Ve.tw.Plugin:case Ve.tw.IncrementalSnapshot:}r.getCastFn(i,!0)()}}catch(o){n.e(o)}finally{n.f()}!0===r.touchActive?r.mouse.classList.add("touch-active"):!1===r.touchActive&&r.mouse.classList.remove("touch-active"),r.touchActive=null},this.getCastFn=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case Ve.tw.DomContentLoaded:case Ve.tw.Load:break;case Ve.tw.Custom:t=function(){r.emitter.emit(Ve.SA.CustomEvent,e)};break;case Ve.tw.Meta:t=function(){return r.emitter.emit(Ve.SA.Resize,{width:e.data.width,height:e.data.height})};break;case Ve.tw.FullSnapshot:t=function(){var t;if(r.firstFullSnapshot){if(r.firstFullSnapshot===e)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.rebuildFullSnapshot(e,n),null===(t=r.iframe.contentWindow)||void 0===t||t.scrollTo(e.data.initialOffset),r.styleMirror.reset()};break;case Ve.tw.IncrementalSnapshot:t=function(){if(r.applyIncremental(e,n),!n&&(e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){var t,i=(0,v.Z)(r.service.state.context.events);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(!(o.timestamp<=e.timestamp)&&r.isUserInteraction(o)){o.delay-e.delay>1e4*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=o);break}}}catch(u){i.e(u)}finally{i.f()}if(r.nextUserInteractionEvent){var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/5e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:s}),r.emitter.emit(Ve.SA.SkipStart,s)}}}}return function(){t&&t();var i,o=(0,v.Z)(r.config.plugins||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.handler&&a.handler(e,n,{replayer:r})}}catch(c){o.e(c)}finally{o.f()}r.service.send({type:"CAST_EVENT",payload:{event:e}});var s=r.service.state.context.events.length-1;if(!r.config.liveMode&&e===r.service.state.context.events[s]){var u=50;e.type===Ve.tw.IncrementalSnapshot&&e.data.source===Ve.yh.MouseMove&&e.data.positions.length&&(u+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout((function(){s<r.service.state.context.events.length-1||(r.backToNormal(),r.service.send("END"),r.emitter.emit(Ve.SA.Finish))}),u)}r.emitter.emit(Ve.SA.EventCast,e)}},!(null===n||void 0===n?void 0:n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:pn,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(Ve.SA.Resize,this.handleResize),this.setupDom();var o,s=(0,v.Z)(this.config.plugins||[]);try{for(s.s();!(o=s.n()).done;){var u=o.value;u.getMirror&&u.getMirror({nodeMirror:this.mirror})}}catch(m){s.e(m)}finally{s.f()}this.emitter.on(Ve.SA.Flush,(function(){if(r.usingVirtualDom){var e={mirror:r.mirror,applyCanvas:function(e,t,n){dn({event:e,mutation:t,target:n,imageMap:r.imageMap,canvasEventMap:r.canvasEventMap,errorHandler:r.warnCanvasMutationFailed.bind(r)})},applyInput:r.applyInput.bind(r),applyScroll:r.applyScroll.bind(r),applyStyleSheetMutation:function(e,t){e.source===Ve.yh.StyleSheetRule?r.applyStyleSheetRule(e,t):e.source===Ve.yh.StyleDeclaration&&r.applyStyleDeclaration(e,t)},afterAppend:function(e,t){var n,i=(0,v.Z)(r.config.plugins||[]);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.onBuild&&o.onBuild(e,{id:t,replayer:r})}}catch(m){i.e(m)}finally{i.f()}}};if(r.iframe.contentDocument)try{mt(r.iframe.contentDocument,r.virtualDom,e,r.virtualDom.mirror)}catch(jt){console.warn(jt)}if(r.virtualDom.destroyTree(),r.usingVirtualDom=!1,Object.keys(r.legacy_missingNodeRetryMap).length)for(var t in r.legacy_missingNodeRetryMap)try{var n=r.legacy_missingNodeRetryMap[t],i=yt(n.node,r.mirror,r.virtualDom.mirror);mt(i,n.node,e,r.virtualDom.mirror),n.node=i}catch(o){r.warn(o)}r.constructedStyleMutations.forEach((function(e){r.applyStyleSheetMutation(e)})),r.constructedStyleMutations=[],r.adoptedStyleSheets.forEach((function(e){r.applyAdoptedStyleSheet(e)})),r.adoptedStyleSheets=[]}r.mousePos&&(r.moveAndHover(r.mousePos.x,r.mousePos.y,r.mousePos.id,!0,r.mousePos.debugData),r.mousePos=null),r.lastSelectionData&&(r.applySelection(r.lastSelectionData),r.lastSelectionData=null)})),this.emitter.on(Ve.SA.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset(),r.styleMirror.reset()}));var c=new Bt([],{speed:this.config.speed});this.service=Jt({events:t.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(Ve.SA.StateChange,{player:e})})),this.speedService=Xt(Qt({id:"speed",context:{normalSpeed:-1,timer:c},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:Ut({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(Ve.SA.StateChange,{speed:e})}));var l=this.service.state.context.events.find((function(e){return e.type===Ve.tw.Meta})),d=this.service.state.context.events.find((function(e){return e.type===Ve.tw.FullSnapshot}));if(l){var f=l.data,h=f.width,p=f.height;setTimeout((function(){r.emitter.emit(Ve.SA.Resize,{width:h,height:p})}),0)}d&&setTimeout((function(){var e;r.firstFullSnapshot||(r.firstFullSnapshot=d,r.rebuildFullSnapshot(d),null===(e=r.iframe.contentWindow)||void 0===e||e.scrollTo(d.data.initialOffset))}),1),this.service.state.context.events.find(vn)&&this.mouse.classList.add("touch-device")}return(0,s.Z)(e,[{key:"timer",get:function(){return this.service.state.context.timer}},{key:"on",value:function(e,t){return this.emitter.on(e,t),this}},{key:"off",value:function(e,t){return this.emitter.off(e,t),this}},{key:"setConfig",value:function(e){var t=this;Object.keys(e).forEach((function(n){e[n],t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),"undefined"!==typeof e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),"undefined"!==typeof e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}},{key:"getMetaData",value:function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}},{key:"getCurrentTime",value:function(){return this.timer.timeOffset+this.getTimeOffset()}},{key:"getTimeOffset",value:function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp}},{key:"getMirror",value:function(){return this.mirror}},{key:"play",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:n}}),null===(t=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.getElementsByTagName("html")[0])||void 0===t||t.classList.remove("rrweb-paused"),this.emitter.emit(Ve.SA.Start)}},{key:"pause",value:function(e){var t,n;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"===typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(n=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===n||n.classList.add("rrweb-paused"),this.emitter.emit(Ve.SA.Pause)}},{key:"resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(Ve.SA.Resume)}},{key:"destroy",value:function(){this.pause(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Ve.SA.Destroy)}},{key:"startLive",value:function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}},{key:"addEvent",value:function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;vn(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))}},{key:"enableInteract",value:function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}},{key:"disableInteract",value:function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}},{key:"resetCache",value:function(){this.cache=(0,qe.Df)()}},{key:"setupDom",value:function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Lt(this.iframe.contentWindow,this.iframe.contentDocument),(0,$t.OK)(this.iframe.contentWindow))}},{key:"rebuildFullSnapshot",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var r=[],i=function(e,n){t.collectIframeAndAttachDocument(r,e);var i,o=(0,v.Z)(t.config.plugins||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.onBuild&&a.onBuild(e,{id:n,replayer:t})}}catch(s){o.e(s)}finally{o.f()}};this.mirror.reset(),(0,qe.VU)(e.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,e.data.node.id);for(var o=function(){var e=s[a],n=e.mutationInQueue,r=e.builtNode;t.attachDocumentToIframe(n,r),t.newDocumentQueue=t.newDocumentQueue.filter((function(e){return e!==n}))},a=0,s=r;a<s.length;a++)o();var u=this.iframe.contentDocument,c=u.documentElement,l=u.head;this.insertStyleRules(c,l),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Ve.SA.FullsnapshotRebuilded,e),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}},{key:"insertStyleRules",value:function(e,t){var n,r,i=(r=this.config.blockClass,[".".concat(r," { background: currentColor }"),"noscript { display: none !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,Ot(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:Ve.yh.StyleSheetRule,adds:i.map((function(e,t){return{rule:e,index:t}}))})}else{var a=document.createElement("style");e.insertBefore(a,t);for(var s=0;s<i.length;s++)null===(n=a.sheet)||void 0===n||n.insertRule(i[s],s)}}},{key:"attachDocumentToIframe",value:function(e,t){var n=this,r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=function(e,o){n.collectIframeAndAttachDocument(i,e);var a=r.getMeta(e);if((null===a||void 0===a?void 0:a.type)===qe.Jq.Element&&"HTML"===(null===a||void 0===a?void 0:a.tagName.toUpperCase())){var s=t.contentDocument,u=s.documentElement,c=s.head;n.insertStyleRules(u,c)}if(!n.usingVirtualDom){var l,d=(0,v.Z)(n.config.plugins||[]);try{for(d.s();!(l=d.n()).done;){var f=l.value;f.onBuild&&f.onBuild(e,{id:o,replayer:n})}}catch(h){d.e(h)}finally{d.f()}}};(0,qe.GQ)(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(var a=function(){var e=u[s],t=e.mutationInQueue,r=e.builtNode;n.attachDocumentToIframe(t,r),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==t}))},s=0,u=i;s<u.length;s++)a()}},{key:"collectIframeAndAttachDocument",value:function(e,t){var n=this;if((0,$t.Cj)(t,this.mirror)){var r=this.newDocumentQueue.find((function(e){return e.parentId===n.mirror.getId(t)}));r&&e.push({mutationInQueue:r,builtNode:t})}}},{key:"waitForStylesheetLoad",value:function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(Ve.SA.Start,a),this.emitter.on(Ve.SA.Pause,a);var s=function(){t.emitter.off(Ve.SA.Start,a),t.emitter.off(Ve.SA.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(Ve.SA.LoadStylesheetEnd),r&&clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Ve.SA.LoadStylesheetStart),r=setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}}},{key:"preloadAllImages",value:function(){return(0,ze.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var n,r,i,o,a,s=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.service.state,n=function(){s.service.state},this.emitter.on(Ve.SA.Start,n),this.emitter.on(Ve.SA.Pause,n),r=[],i=(0,v.Z)(this.service.state.context.events),e.prev=6,a=(0,t.Z)().mark((function e(){var n;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=o.value).type===Ve.tw.IncrementalSnapshot&&n.data.source===Ve.yh.CanvasMutation&&(r.push(s.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach((function(e){s.preloadImages(e,n)})));case 2:case"end":return e.stop()}}),e)})),i.s();case 9:if((o=i.n()).done){e.next=13;break}return e.delegateYield(a(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),i.e(e.t1);case 18:return e.prev=18,i.f(),e.finish(18);case 21:return e.abrupt("return",Promise.all(r));case 22:case"end":return e.stop()}}),e,this,[[6,15,18,21]])})))}},{key:"preloadImages",value:function(e,t){if("drawImage"===e.property&&"string"===typeof e.args[0]&&!this.imageMap.has(t)){var n=document.createElement("canvas"),r=n.getContext("2d"),i=null===r||void 0===r?void 0:r.createImageData(n.width,n.height);null===i||void 0===i||i.data,JSON.parse(e.args[0]),null===r||void 0===r||r.putImageData(i,0,0)}}},{key:"deserializeAndPreloadCanvasEvents",value:function(e,n){return(0,ze.m)(this,void 0,void 0,(0,t.Z)().mark((function r(){var i,o,a,s=this;return(0,t.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.canvasEventMap.has(n)){r.next=13;break}if(i={isUnchanged:!0},!("commands"in e)){r.next=9;break}return r.next=5,Promise.all(e.commands.map((function(e){return(0,ze.m)(s,void 0,void 0,(0,t.Z)().mark((function n(){var r;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.args.map(on(this.imageMap,null,i)));case 2:return r=t.sent,t.abrupt("return",Object.assign(Object.assign({},e),{args:r}));case 4:case"end":return t.stop()}}),n,this)})))})));case 5:o=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{commands:o})),r.next=13;break;case 9:return r.next=11,Promise.all(e.args.map(on(this.imageMap,null,i)));case 11:a=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{args:a}));case 13:case"end":return r.stop()}}),r,this)})))}},{key:"applyIncremental",value:function(e,t){var n,r,i,o=this,a=e.data;switch(a.source){case Ve.yh.Mutation:try{this.applyMutation(a,t)}catch(y){this.warn("Exception in mutation ".concat(y.message||y),a)}break;case Ve.yh.Drag:case Ve.yh.TouchMove:case Ve.yh.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(n){var r={doAction:function(){o.moveAndHover(n.x,n.y,n.id,t,a)},delay:n.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case Ve.yh.MouseInteraction:if(-1===a.id||t)break;var u=new Event(Ve.Y2[a.type].toLowerCase()),c=this.mirror.getNode(a.id);if(!c)return this.debugNodeNotFound(a,a.id);this.emitter.emit(Ve.SA.MouseInteraction,{type:a.type,target:c});var l=this.config.triggerFocus;switch(a.type){case Ve.Y2.Blur:"blur"in c&&c.blur();break;case Ve.Y2.Focus:l&&c.focus&&c.focus({preventScroll:!0});break;case Ve.Y2.Click:case Ve.Y2.TouchStart:case Ve.Y2.TouchEnd:t?(a.type===Ve.Y2.TouchStart?this.touchActive=!0:a.type===Ve.Y2.TouchEnd&&(this.touchActive=!1),this.mousePos={x:a.x,y:a.y,id:a.id,debugData:a}):(a.type===Ve.Y2.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x,a.y,a.id,t,a),a.type===Ve.Y2.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===Ve.Y2.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===Ve.Y2.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case Ve.Y2.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(u)}break;case Ve.yh.Scroll:if(-1===a.id)break;if(this.usingVirtualDom){var d=this.virtualDom.mirror.getNode(a.id);if(!d)return this.debugNodeNotFound(a,a.id);d.scrollData=a;break}this.applyScroll(a,t);break;case Ve.yh.ViewportResize:this.emitter.emit(Ve.SA.Resize,{width:a.width,height:a.height});break;case Ve.yh.Input:if(-1===a.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);f.inputData=a;break}this.applyInput(a);break;case Ve.yh.MediaInteraction:var h=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!h)return this.debugNodeNotFound(a,a.id);var p=h;try{void 0!==a.currentTime&&(p.currentTime=a.currentTime),void 0!==a.volume&&(p.volume=a.volume),void 0!==a.muted&&(p.muted=a.muted),1===a.type&&p.pause(),0===a.type&&p.play(),4===a.type&&(p.playbackRate=a.playbackRate)}catch(y){this.warn("Failed to replay media interactions: ".concat(y.message||y))}break;case Ve.yh.StyleSheetRule:case Ve.yh.StyleDeclaration:this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&(null===(r=this.virtualDom.mirror.getNode(a.id))||void 0===r||r.rules.push(a)):this.applyStyleSheetMutation(a);break;case Ve.yh.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var v=this.virtualDom.mirror.getNode(a.id);if(!v)return this.debugNodeNotFound(a,a.id);v.canvasMutations.push({event:e,mutation:a})}else{var m=this.mirror.getNode(a.id);if(!m)return this.debugNodeNotFound(a,a.id);dn({event:e,mutation:a,target:m,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case Ve.yh.Font:try{var g=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(g)}catch(y){this.warn(y)}break;case Ve.yh.Selection:if(t){this.lastSelectionData=a;break}this.applySelection(a);break;case Ve.yh.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a)}}},{key:"applyMutation",value:function(e,t){var n=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Rt(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(var r in this.legacy_missingNodeRetryMap)try{var i=this.legacy_missingNodeRetryMap[r],o=_t(i.node,this.virtualDom,this.mirror);o&&(i.node=o)}catch(m){this.warn(m)}var a=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes.forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.parentId})))return;return n.warnNodeNotFound(e,t.id)}var o=a.getNode(t.parentId);if(!o)return n.warnNodeNotFound(e,t.parentId);if(t.isShadow&&(0,$t.He)(o)&&(o=o.shadowRoot),a.removeNodeFromMap(i),o)try{o.removeChild(i),n.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===o.nodeName&&(null===(r=o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}catch(m){if(!(m instanceof DOMException))throw m;n.warn("parent could not remove child in mutation",o,i,e)}}));var s=Object.assign({},this.legacy_missingNodeRetryMap),u=[],c=function(e){var t,r;if(!n.iframe.contentDocument)return n.warn("Looks like your replayer has been destroyed.");var i=a.getNode(e.parentId);if(!i)return e.node.type===qe.Jq.Document?n.newDocumentQueue.push(e):u.push(e);e.node.isShadow&&((0,$t.He)(i)||i.attachShadow({mode:"open"}),i=i.shadowRoot);var o=null,c=null;if(e.previousId&&(o=a.getNode(e.previousId)),e.nextId&&(c=a.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return u.push(e);if(!e.node.rootId||a.getNode(e.node.rootId)){var l=e.node.rootId?a.getNode(e.node.rootId):n.usingVirtualDom?n.virtualDom:n.iframe.contentDocument;if((0,$t.Cj)(i,a))n.attachDocumentToIframe(e,i);else{var d=function(e,t){if(!n.usingVirtualDom){var r,i=(0,v.Z)(n.config.plugins||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.onBuild&&o.onBuild(e,{id:t,replayer:n})}}catch(a){i.e(a)}finally{i.f()}}},f=(0,qe.GQ)(e.node,{doc:l,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache,afterAppend:d});if(-1!==e.previousId&&-1!==e.nextId){var h=a.getMeta(i);if(h&&h.type===qe.Jq.Element&&"textarea"===h.tagName&&e.node.type===qe.Jq.Text){var p,m=Array.isArray(i.childNodes)?i.childNodes:Array.from(i.childNodes),g=(0,v.Z)(m);try{for(g.s();!(p=g.n()).done;){var y=p.value;y.nodeType===i.TEXT_NODE&&i.removeChild(y)}}catch(I){g.e(I)}finally{g.f()}}else if((null===h||void 0===h?void 0:h.type)===qe.Jq.Document){var b=i;e.node.type===qe.Jq.DocumentType&&(null===(t=b.childNodes[0])||void 0===t?void 0:t.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),"HTML"===f.nodeName&&b.documentElement&&b.removeChild(b.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?i.insertBefore(f,o.nextSibling):c&&c.parentNode?i.contains(c)?i.insertBefore(f,c):i.insertBefore(f,null):i.appendChild(f),d(f,e.node.id),n.usingVirtualDom&&"#text"===f.nodeName&&"STYLE"===i.nodeName&&(null===(r=i.rules)||void 0===r?void 0:r.length)>0&&(i.rules=[]),(0,$t.Cj)(f,n.mirror)){var w=n.mirror.getId(f),S=n.newDocumentQueue.find((function(e){return e.parentId===w}));S&&(n.attachDocumentToIframe(S,f),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==S})))}(e.previousId||e.nextId)&&n.legacy_resolveMissingNode(s,i,f,e)}else s[e.node.id]={node:f,mutation:e}}}};e.adds.forEach((function(e){c(e)}));for(var l=Date.now();u.length;){var d=(0,$t.s6)(u);if(u.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}var f,h=(0,v.Z)(d);try{for(h.s();!(f=h.n()).done;){var p=f.value;a.getNode(p.value.parentId)?(0,$t.Fn)(p,(function(e){c(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",p)}}catch(g){h.e(g)}finally{h.f()}}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),(0,$t.E2)(e.texts).forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}if(i.textContent=t.value,n.usingVirtualDom){var o=i.parentNode;(null===(r=null===o||void 0===o?void 0:o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}})),e.attributes.forEach((function(t){var r=a.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}for(var i in t.attributes)if("string"===typeof i){var o=t.attributes[i];if(null===o)r.removeAttribute(i);else if("string"===typeof o)try{if("_cssText"===i&&("LINK"===r.nodeName||"STYLE"===r.nodeName))try{var s=a.getMeta(r);Object.assign(s.attributes,t.attributes);var u=(0,qe.GQ)(s,{doc:r.ownerDocument,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache}),c=r.nextSibling,l=r.parentNode;if(u&&l){l.removeChild(r),l.insertBefore(u,c),a.replace(t.id,u);break}}catch(jt){}r.setAttribute(i,o)}catch(m){n.warn("An error occurred may due to the checkout feature.",m)}else if("style"===i){var d=o,f=r;for(var h in d)if(!1===d[h])f.style.removeProperty(h);else if(d[h]instanceof Array){var p=d[h];f.style.setProperty(h,p[0],p[1])}else{var v=d[h];f.style.setProperty(h,v)}}}}))}},{key:"applyScroll",value:function(e,t){var n,r,i=this.mirror.getNode(e.id);if(!i)return this.debugNodeNotFound(e,e.id);var o=this.mirror.getMeta(i);if(i===this.iframe.contentDocument)null===(n=this.iframe.contentWindow)||void 0===n||n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((null===o||void 0===o?void 0:o.type)===qe.Jq.Document)null===(r=i.defaultView)||void 0===r||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}},{key:"applyInput",value:function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(n){}}},{key:"applySelection",value:function(e){var t=this;try{var n=new Set,r=e.ranges.map((function(e){var r=e.start,i=e.startOffset,o=e.end,a=e.endOffset,s=t.mirror.getNode(r),u=t.mirror.getNode(o);if(s&&u){var c=new Range;c.setStart(s,i),c.setEnd(u,a);var l=s.ownerDocument,d=null===l||void 0===l?void 0:l.getSelection();return d&&n.add(d),{range:c,selection:d}}}));n.forEach((function(e){return e.removeAllRanges()})),r.forEach((function(e){var t;return e&&(null===(t=e.selection)||void 0===t?void 0:t.addRange(e.range))}))}catch(i){}}},{key:"applyStyleSheetMutation",value:function(e){var t,n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=(null===(t=this.mirror.getNode(e.id))||void 0===t?void 0:t.sheet)||null),n&&(e.source===Ve.yh.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===Ve.yh.StyleDeclaration&&this.applyStyleDeclaration(e,n))}},{key:"applyStyleSheetRule",value:function(e,t){var n,r,i,o;if(null===(n=e.adds)||void 0===n||n.forEach((function(e){var n=e.rule,r=e.index;try{if(Array.isArray(r)){var i=(0,$t._X)(r),o=i.positions,a=i.index;(0,$t.md)(t.cssRules,o).insertRule(n,a)}else{var s=void 0===r?void 0:Math.min(r,t.cssRules.length);null===t||void 0===t||t.insertRule(n,s)}}catch(jt){}})),null===(r=e.removes)||void 0===r||r.forEach((function(e){var n=e.index;try{if(Array.isArray(n)){var r=(0,$t._X)(n),i=r.positions,o=r.index;(0,$t.md)(t.cssRules,i).deleteRule(o||0)}else null===t||void 0===t||t.deleteRule(n)}catch(jt){}})),e.replace)try{null===(i=t.replace)||void 0===i||i.call(t,e.replace)}catch(jt){}if(e.replaceSync)try{null===(o=t.replaceSync)||void 0===o||o.call(t,e.replaceSync)}catch(jt){}}},{key:"applyStyleDeclaration",value:function(e,t){e.set&&(0,$t.md)(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority);e.remove&&(0,$t.md)(t.rules,e.index).style.removeProperty(e.remove.property)}},{key:"applyAdoptedStyleSheet",value:function(e){var t,n=this,r=this.mirror.getNode(e.id);if(r){null===(t=e.styles)||void 0===t||t.forEach((function(e){var t,i=null,o=null;if((0,$t.He)(r)?o=(null===(t=r.ownerDocument)||void 0===t?void 0:t.defaultView)||null:"#document"===r.nodeName&&(o=r.defaultView),o)try{i=new o.CSSStyleSheet,n.styleMirror.add(i,e.styleId),n.applyStyleSheetRule({source:Ve.yh.StyleSheetRule,adds:e.rules},i)}catch(jt){}}));var i=0;!function e(t,r){var o=r.map((function(e){return n.styleMirror.getStyle(e)})).filter((function(e){return null!==e}));(0,$t.He)(t)?t.shadowRoot.adoptedStyleSheets=o:"#document"===t.nodeName&&(t.adoptedStyleSheets=o),o.length!==r.length&&i<10&&(setTimeout((function(){return e(t,r)}),0+100*i),i++)}(r,e.styleIds)}}},{key:"legacy_resolveMissingNode",value:function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var u=a.node,c=a.mutation;t.insertBefore(u,n),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(s){var l=s.node,d=s.mutation;t.insertBefore(l,n.nextSibling),delete e[d.node.id],delete this.legacy_missingNodeRetryMap[d.node.id],(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(e,t,l,d)}}},{key:"moveAndHover",value:function(e,t,n,r,i){var o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(i,n);var a=(0,$t.vD)(o,this.iframe),s=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left="".concat(s,"px"),this.mouse.style.top="".concat(u,"px"),r||this.drawMouseTail({x:s,y:u}),this.hoverElements(o)}},{key:"drawMouseTail",value:function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?pn:Object.assign({},pn,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=r,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}}},{key:"hoverElements",value:function(e){var t;null===(t=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")})),this.lastHoveredRootNode=e.getRootNode();for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}},{key:"isUserInteraction",value:function(e){return e.type===Ve.tw.IncrementalSnapshot&&(e.data.source>Ve.yh.Mutation&&e.data.source<=Ve.yh.Input)}},{key:"backToNormal",value:function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Ve.SA.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}},{key:"warnNodeNotFound",value:function(e,t){this.warn("Node with id '".concat(t,"' not found. "),e)}},{key:"warnCanvasMutationFailed",value:function(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}},{key:"debugNodeNotFound",value:function(e,t){this.debug("Node with id '".concat(t,"' not found. "),e)}},{key:"warn",value:function(){var e;if(this.config.showWarning){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).warn.apply(e,[hn].concat(n))}}},{key:"debug",value:function(){var e;if(this.config.showDebug){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).log.apply(e,[hn].concat(n))}}}]),e}(),yn=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.events=[],this.castedEvents=[],this.replayer=void 0,this.onEventCast=void 0,this.config={enableInteract:!1},this.useTimestampCompression=!0,this.fastForward=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=r.sort((function(e,t){return e.timestamp-t.timestamp})),n.useTimestampCompression&&(o=Date.now(),i=i.map((function(e,t){return(0,l.Z)((0,l.Z)({},e),{},{timestamp:o+t})}))),n.events=[].concat((0,g.Z)(n.events),(0,g.Z)(i)),a=new Promise((function(e){n.onEventCast=function(t){n.castedEvents.push(t),n.castedEvents.length===n.events.length&&(n.onEventCast=void 0,e(t))}})),s=(0,v.Z)(i);try{for(s.s();!(u=s.n()).done;)c=u.value,n.replayer.addEvent(c)}catch(t){s.e(t)}finally{s.f()}return e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.stop=function(){n.replayer.destroy()},this.getNodeById=function(e){return n.replayer.getMirror().getNode(e)},this.getMeta=function(e){return n.replayer.getMirror().getMeta(e)},this.config=(0,l.Z)((0,l.Z)({},this.config),i)}return(0,s.Z)(e,[{key:"start",value:function(e){var t=this,n=e.firstEventTimestamp,r=e.speed,i=void 0===r?8:r,o=e.useTimestampCompression,a=void 0===o||o;this.replayer=new gn([],{mouseTail:!1,pauseAnimation:!1,speed:i,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0}),this.config.enableInteract?this.replayer.enableInteract():this.replayer.disableInteract(),this.useTimestampCompression=a,this.replayer.startLive(this.useTimestampCompression?Date.now():n),this.replayer.on("event-cast",(function(e){t.onEventCast&&t.onEventCast(e)}))}}]),e}(),bn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.eventProcessor=void 0,this.sessionReplayer=void 0,this.eventHandlers=void 0,this.sessionReplayer=new yn(t),this.eventProcessor=new Ge.u({eventHandlers:new Pe.E})}return(0,s.Z)(e,[{key:"setEventHandlers",value:function(e){this.eventHandlers=e,this.eventProcessor.setHandlers(this.eventHandlers)}},{key:"start",value:function(e){this.sessionReplayer.start(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.preCastEvent(n);case 2:return e.next=4,this.sessionReplayer.fastForward([n]);case 4:return e.next=6,this.eventProcessor.processEvent(n);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"skipEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.skipEvents(n);case 2:return e.next=4,this.sessionReplayer.fastForward(n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stop",value:function(){this.sessionReplayer.stop()}}]),e}(),wn=function(e){(0,me.Z)(i,e);var n=(0,ge.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).pageIdentifiers=void 0,e.elementSelector=new Be,e.appSpecificRules=void 0,e.setEventHandlers(new He({sessionMirror:e.sessionReplayer,elementSelector:e.elementSelector})),e}return(0,s.Z)(i,[{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward;this.eventHandlers.setConfiguration({enableRecordingAvailableInteractableElements:t,useTextInputFastForward:n})}},{key:"setEvents",value:function(e){this.eventHandlers.setEvents(e)}},{key:"setOptions",value:function(e){this.elementSelector.setOptions({defaultExtractReducedHtmlAndSelector:e.extractReducedHTML,defaultInspectInteractableElements:e.inspectInteractables})}},{key:"setAppRules",value:function(e){this.appSpecificRules=e,this.elementSelector.setAppRules(e),this.eventHandlers.setAppRules(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,pe.Z)((0,ve.Z)(i.prototype),"handleEvent",this).call(this,n);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),i}(bn),Sn=n(4925),In=function(e){return e.TextElementAppear="text_element_appear",e.TextElementDisappear="text_element_disappear",e.PageUrlChange="page_url_change",e}({}),Cn=function(){function e(t){(0,a.Z)(this,e),this.urlChangeEventCallback=void 0,this.currentURL=void 0,this.originalPushState=void 0,this.originalReplaceState=void 0,this.urlChangeEventCallback=t}return(0,s.Z)(e,[{key:"onURLChange",value:function(){var e=this;try{var t=Date.now();setTimeout((function(){var n=window.location.href;if(n!==e.currentURL){e.currentURL=n;var r={url:n,timestamp:t};e.urlChangeEventCallback(r)}}))}catch(jt){}}},{key:"startMonitoring",value:function(){this.toggleWindowEventListeners(!0),this.overrideHistoryStateChanges(),this.currentURL=window.location.href}},{key:"stopMonitoring",value:function(){this.toggleWindowEventListeners(!1),this.restoreHistoryStateChanges()}},{key:"toggleWindowEventListeners",value:function(t){var n=this,r=t?"addEventListener":"removeEventListener";e.WINDOW_EVENTS.forEach((function(e){window[r](e,n.onURLChange.bind(n))}))}},{key:"overrideHistoryStateChanges",value:function(){this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState,this.originalPushState&&(window.history.pushState=function(){return this.onURLChange(),this.originalPushState.apply(window.history,arguments)}.bind(this)),this.originalReplaceState&&(window.history.replaceState=function(){return this.onURLChange(),this.originalReplaceState.apply(window.history,arguments)}.bind(this))}},{key:"restoreHistoryStateChanges",value:function(){this.originalPushState&&(window.history.pushState=this.originalPushState),this.originalReplaceState&&(window.history.replaceState=this.originalReplaceState)}}]),e}();Cn.WINDOW_EVENTS=["popstate","locationchange","hashchange"],function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(mn||(mn={}));!function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}();var kn=/([^\\]):hover/;new RegExp(kn.source,"g");var En=function(e){return e.replace(/\u200b/g,"").trim().replace(/\s+/g," ")};function xn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,n=t.get(e);if(void 0!==n)return n;if(n={full:"",normalized:"",immediate:[]},e instanceof Element&&e.getElementsByTagName("*").length>100)return n;if(!function(e){var t=e.ownerDocument;return"SCRIPT"===e.nodeName||"NOSCRIPT"===e.nodeName||"STYLE"===e.nodeName||t.head&&t.head.contains(e)}(e)){var r="";if(e instanceof HTMLInputElement&&("submit"===e.type||"button"===e.type))n={full:e.value,normalized:En(e.value),immediate:[e.value]};else{for(var i=e.firstChild;i;i=i.nextSibling)i.nodeType===Node.TEXT_NODE?(n.full+=i.nodeValue||"",r+=i.nodeValue||""):(r&&n.immediate.push(r),r="",i.nodeType===Node.ELEMENT_NODE&&(n.full+=xn(i,t).full));r&&n.immediate.push(r),e.shadowRoot&&(n.full+=xn(e.shadowRoot,t).full),n.full&&(n.normalized=En(n.full))}}return t.set(e,n),n}var An,Tn=function(e,t){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,t):void 0},Mn=function(e){var t=e.ownerDocument.createRange();t.selectNode(e);var n=t.getBoundingClientRect();return n.width>0&&n.height>0};function Nn(e){var t=Tn(e);if(!t)return!0;if("contents"===t.display){for(var n=e.firstChild;n;n=n.nextSibling){if(1===n.nodeType&&Nn(n))return!0;if(3===n.nodeType&&Mn(n))return!0}return!1}if(!function(e,t){var n;if(!(t=null!==(n=t)&&void 0!==n?n:Tn(e)))return!0;if(Element.prototype.checkVisibility){if(!e.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!1}))return!1}else{var r=e.closest("details,summary");if(r!==e&&"DETAILS"===(null===r||void 0===r?void 0:r.nodeName)&&!r.open)return!1}return"visible"===t.visibility}(e,t))return!1;var r=e.getBoundingClientRect();return r.width>0&&r.height>0}var _n=function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(e){var r,i=e.sessionMirror,o=e.elementSelectorGenerator,s=e.assertionsConfig;return(0,a.Z)(this,n),(r=t.call(this)).sessionMirror=void 0,r.elementSelectorGenerator=void 0,r.urlObserver=void 0,r.assertionsConfig=void 0,r.isMonitoring=void 0,r.assertions=[],r.urlChangeCount=0,r.previousDomState=void 0,r.currentDomState=void 0,r.elementSelectorGenerator=o,r.sessionMirror=i,r.isMonitoring=!1,r.assertionsConfig=s,r.urlObserver=new Cn(r.handleUrlChange.bind((0,Ye.Z)(r))),r}return(0,s.Z)(n,[{key:"startMonitoring",value:function(){this.isMonitoring=!0,this.urlChangeCount=0,this.urlObserver.startMonitoring(),this.previousDomState=this.calculateDomState(),this.currentDomState=this.previousDomState}},{key:"calculateDomState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this.getChangedRrwebNodeIds(e),r=this.getElementByNodeId(t),i=this.getParentNodeIdByNodeId(t),o=this.getElementVisibilityByElementId(t),a=this.getMaxDistanceToTextNodeByNodeId(),s=this.getInnerTextByResolvedVisibleNodeId(t,o,i,a);return{nodeByNodeId:r,visibilityByElementId:o,parentNodeIdByNodeId:i,innerTextByResolvedVisibleNodeId:s,resolvedVisibleNodesIdsByInnerText:n.groupMapByValue(s),childrenNodeIdsByNodeId:n.groupMapByValue(i),maxDistanceToTextNodeByNodeId:a}}},{key:"createMapByNodeId",value:function(e,t,n){var r=this,i=new Map(e),o=new Set(t),a=Array.from(o),s=function(e){var t=r.getRrwebNodeId(e);void 0===t||o.has(t)||(o.add(t),a.push(t))};t.forEach((function(e){var t=r.getNodeById(e);if(t)for(var n=0;n<3&&t.parentElement&&(t.parentElement&&!(t.parentElement instanceof HTMLBodyElement));n++)t=t.parentElement,s(t)}));for(var u=0;u<a.length;u++){var c=a[u],l=this.getNodeById(c);if(l){var d=n(c,l);d!==e.get(c)&&(null===d?i.delete(c):i.set(c,d),this.getRelatedNodes(l).forEach(s))}else i.delete(c)}return i}},{key:"getElementByNodeId",value:function(e){var t,n;return this.createMapByNodeId(null!==(t=null===(n=this.previousDomState)||void 0===n?void 0:n.nodeByNodeId)&&void 0!==t?t:new Map,e,(function(e,t){return t}))}},{key:"getParentNodeIdByNodeId",value:function(e){var t,n,r=this;return this.createMapByNodeId(null!==(t=null===(n=this.previousDomState)||void 0===n?void 0:n.parentNodeIdByNodeId)&&void 0!==t?t:new Map,e,(function(e,t){if(!(t instanceof HTMLBodyElement)){if(!t.isConnected)return null;if(t.parentElement)return r.getRrwebNodeId(t.parentElement)}}))}},{key:"getElementVisibilityByElementId",value:function(e){var t,n;return this.createMapByNodeId(null!==(t=null===(n=this.previousDomState)||void 0===n?void 0:n.visibilityByElementId)&&void 0!==t?t:new Map,e,(function(e,t){if(t.nodeType===Node.ELEMENT_NODE)return Nn(t)}))}},{key:"getInnerTextByResolvedVisibleNodeId",value:function(e,t,n,r){var i,o,a=this,s=null!==(i=null===(o=this.previousDomState)||void 0===o?void 0:o.innerTextByResolvedVisibleNodeId)&&void 0!==i?i:new Map,u=new Map;return this.createMapByNodeId(s,e,(function(e,i){var o,s,c;if(i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE){if(!(i.nodeType===Node.ELEMENT_NODE?t.get(e):n.get(e)&&t.get(n.get(e))))return null;var l=i.nodeType===Node.ELEMENT_NODE&&(null!==(o=r.get(e))&&void 0!==o?o:0)<=a.assertionsConfig.maxDistanceFromTextNode?xn(i,u).normalized:null!==(s=null===(c=i.textContent)||void 0===c?void 0:c.trim())&&void 0!==s?s:"";return 0===l.length||l.length>a.assertionsConfig.assertionsTextMaxLength||(i.nodeType===Node.ELEMENT_NODE?Array.from(i.childNodes).filter((function(e){return e.nodeType===Node.ELEMENT_NODE})):[]).some((function(e){return xn(e,u).normalized===l}))?null:l}}))}},{key:"getRelatedNodes",value:function(e){return e.childNodes?Array.from(e.childNodes):[]}},{key:"getRrwebNodeId",value:function(e){var t,n=null===(t=this.sessionMirror.getMeta(e))||void 0===t?void 0:t.id;if(n)return n;console.log("no meta for node",e)}},{key:"filterCoveredBranches",value:function(e,t,n){var r,i=this;if(1===e.maxDepthFromTextNode)return!0;var o=function(e){return n.innerTextByResolvedVisibleNodeId.has(i.getRrwebNodeId(e))},a=e.element;if((null!==(r=n.childrenNodeIdsByNodeId.get(e.nodeId))&&void 0!==r?r:[]).map((function(e){return n.nodeByNodeId.get(e)})).filter((function(e){return e.nodeType===Node.TEXT_NODE&&o(e)})).length>0)return!0;var s=Array.from(a.children).filter((function(e){return e instanceof HTMLElement})).filter(o);if(0===s.length)return!1;var u=s.filter((function(e){return t.some((function(t){return t.element===e}))}));return u.length!==s.length}},{key:"filterCoveredLeaves",value:function(e,t,n){var r=n.parentNodeIdByNodeId.get(e.nodeId);return!t.find((function(e){return e.nodeId===r}))}},{key:"filterUniqueTextAssertionsByTagPriority",value:function(e){var t=new Map;return e.forEach((function(e){var r=e.text,i=t.get(r);(!i||n.getTagPrecedenceIndex(e.element)<n.getTagPrecedenceIndex(i.element))&&t.set(r,e)})),Array.from(t.values())}},{key:"createAssertionsForAllElementsWithText",value:function(e,t,r,i,o){var a,s,u=this,c=null!==(a=r.resolvedVisibleNodesIdsByInnerText.get(e))&&void 0!==a?a:[],l=new Set(null!==(s=t.resolvedVisibleNodesIdsByInnerText.get(e))&&void 0!==s?s:[]);return c.filter((function(e){return!l.has(e)})).filter((function(e){var t=r.nodeByNodeId.get(e);return(null===t||void 0===t?void 0:t.nodeType)===Node.ELEMENT_NODE&&!n.EXCLUDED_TAGS_FOR_ASSERTION.includes(t.tagName)})).filter((function(e){var n=r.maxDistanceToTextNodeByNodeId.get(e),i=t.maxDistanceToTextNodeByNodeId.get(e);return n<=u.assertionsConfig.maxDistanceFromTextNode&&(!i||i<=u.assertionsConfig.maxDistanceFromTextNode)})).map((function(t){var n=r.nodeByNodeId.get(t),a=u.getLowestAncestorIdWithSameVisibility(n,i);return{type:i,text:e,element:n,nodeId:t,tag:n.tagName.toLowerCase(),timestamp:o,domTreeRootId:a,maxDepthFromTextNode:r.maxDistanceToTextNodeByNodeId.get(t)}}))}},{key:"generateAssertionsForNextTexts",value:function(e,t,r,i){var o,a=this,s=Array.from(r.resolvedVisibleNodesIdsByInnerText.keys()).filter((function(e){return!t.resolvedVisibleNodesIdsByInnerText.has(e)})).filter(this.assertionsConfig.usePlaywrightGetByText?n.canTextWorkInExactLocator:function(){return!0});if(s.length){var u=s.flatMap((function(n){return a.createAssertionsForAllElementsWithText(n,t,r,e,i)}));this.assertionsConfig.removeCoveredBranches&&(u=u.filter((function(e){return a.filterCoveredBranches(e,u,r)}))),this.assertionsConfig.removeCoveredLeaves&&(u=u.filter((function(e){return a.filterCoveredLeaves(e,u,r)}))),u=this.filterUniqueTextAssertionsByTagPriority(u);var c=this.groupAssertionByDomRoot(u);(o=this.assertions).push.apply(o,(0,g.Z)(c.map((function(e){return e.sort(n.sortByTagPrecedenceThenYPosition)}))))}}},{key:"getLowestAncestorIdWithSameVisibility",value:function(e,t){for(var n,r=this.getRrwebNodeId(e),i=t===In.TextElementAppear;e.parentElement;){var o,a=this.getRrwebNodeId(e.parentElement);if((null!==(o=this.currentDomState.visibilityByElementId.get(a))&&void 0!==o&&o)!==i)break;e=e.parentElement,r=a}return null!==(n=r)&&void 0!==n?n:-1}},{key:"groupAssertionByDomRoot",value:function(e){var t=new Map;return e.forEach((function(e){var n;t.set(e.domTreeRootId,[].concat((0,g.Z)(null!==(n=t.get(e.domTreeRootId))&&void 0!==n?n:[]),[e]))})),Array.from(t.values())}},{key:"isTextVisibilityChanged",value:function(){var e,t;return e=new Set(this.previousDomState.resolvedVisibleNodesIdsByInnerText.keys()),t=new Set(this.currentDomState.resolvedVisibleNodesIdsByInnerText.keys()),(0,g.Z)(e).some((function(e){return!t.has(e)}))||(0,g.Z)(t).some((function(t){return!e.has(t)}))}},{key:"generateAssertions",value:function(){var e=this;return this.log("possible assertions count before filtering",this.countPossibleAssertions()),this.filterAssertionsWithSameText(),this.validateAssertionsVisibilityInCurrentDom(),this.filterUrlChangeAssertionsBeforeLast(),this.log("possible assertions count after filtering",this.countPossibleAssertions()),this.getAssertionsDomSlicing().map((function(t,n){return e.assertions[n].slice(0,t)})).flat()}},{key:"getAssertionsDomSlicing",value:function(){var e=this,t=function(e){return e.reduce((function(e,t){return e+t}),0)},n=this.assertions.map((function(t){return Math.min(t.length,e.assertionsConfig.maxAssertionsPerDomTree)}));if(t(n)<=this.assertionsConfig.maxAssertions)return n;for(var r=this.assertions.map((function(){return 1})),i=0;i<this.assertions.length&&t(r)<this.assertionsConfig.maxAssertions;i++)r[i]<n[i]&&r[i]++,i===this.assertions.length-1&&(i=0);return r}},{key:"filterAssertionsWithSameText",value:function(){var e,t=new Map,n=(0,v.Z)(this.assertions);try{for(n.s();!(e=n.n()).done;){var r,i=e.value,o=(0,v.Z)(i);try{for(o.s();!(r=o.n()).done;){var a,s=r.value;if(s.type!==In.PageUrlChange){var u=s.text;t.set(u,(null!==(a=t.get(u))&&void 0!==a?a:0)+1)}}}catch(l){o.e(l)}finally{o.f()}}}catch(l){n.e(l)}finally{n.f()}for(var c=0;c<this.assertions.length;c++)this.assertions[c]=this.assertions[c].filter((function(e){return e.type===In.PageUrlChange||1===t.get(e.text)})),0===this.assertions[c].length&&(this.assertions.splice(c,1),c--)}},{key:"validateAssertionsVisibilityInCurrentDom",value:function(){for(var e=this,t=0;t<this.assertions.length;t++)this.assertions[t]=this.assertions[t].filter((function(t){var n=e.validateAssertionVisibilityInCurrentDom(t);return n||e.log("Assertion removed due to visibility validation",t),n}))}},{key:"validateAssertionVisibilityInCurrentDom",value:function(e){if(e.type===In.PageUrlChange)return!0;if(!this.assertionsConfig.usePlaywrightGetByText)return!0;var t=e.text,r=[];try{r=n.getElementsByTextWithPlaywright(t)}catch(jt){return!1}if(r.length>1)return!1;if(0===r.length)return e.type===In.TextElementDisappear;var i=r[0];return e.type===(Nn(i)?In.TextElementAppear:In.TextElementDisappear)}},{key:"filterUrlChangeAssertionsBeforeLast",value:function(){var e=this.assertions.map((function(e,t){return{assertionTree:e,index:t}})).filter((function(e){var t;return(null===(t=e.assertionTree[0])||void 0===t?void 0:t.type)===In.PageUrlChange})).map((function(e){return e.index}));e.length<=1||(e.pop(),this.assertions=this.assertions.filter((function(t,n){return!e.includes(n)})))}},{key:"countPossibleAssertions",value:function(){return this.assertions.reduce((function(e,t){return e+t.length}),0)}},{key:"stopMonitoringAndGenerateAssertions",value:function(){var e=this.generateAssertions();return this.stopMonitoring(),e}},{key:"stopMonitoring",value:function(){this.isMonitoring=!1,this.urlObserver.stopMonitoring(),this.assertions=[],this.urlChangeCount=0,this.previousDomState=void 0,this.currentDomState=void 0}},{key:"handleMutation",value:function(e,t){this.isMonitoring&&(this.processMutationData(e),this.currentDomState=this.calculateDomState(e),this.isTextVisibilityChanged()&&(this.log("mutation data",e),this.generateAssertionsForNextTexts(In.TextElementDisappear,this.currentDomState,this.previousDomState,t.timestamp),this.generateAssertionsForNextTexts(In.TextElementAppear,this.previousDomState,this.currentDomState,t.timestamp),this.previousDomState=this.currentDomState))}},{key:"processMutationData",value:function(e){try{var t=function(e){var t={};return e.filter((function(e){var n=e.parentId;return t[n]=n in t?t[n]+1:0,t[n]<=50}))};e.adds=t(e.adds),e.removes=t(e.removes)}catch(jt){console.error("Error while filtering mutation data")}}},{key:"handleUrlChange",value:function(e){if(this.isMonitoring){this.urlChangeCount++;var t={type:In.PageUrlChange,url:e.url,urlChangeCount:this.urlChangeCount};this.log("new url change assertion",t),this.assertions.push([t])}}},{key:"getNodesByDepthDesc",value:function(){for(var e=[],t=[document.body];t.length>0;)e.push.apply(e,(0,g.Z)(t)),t=t.flatMap((function(e){return e.nodeType===Node.ELEMENT_NODE&&"svg"===e.tagName?[]:Array.from(e.childNodes).filter((function(e){return n.TRACKED_NODE_TYPES.includes(e.nodeType)}))}));return e.reverse()}},{key:"getMaxDistanceToTextNodeByNodeId",value:function(){var e=this,t=new Map;return this.getNodesByDepthDesc().forEach((function(r){var i=e.getRrwebNodeId(r);if(n.TRACKED_NODE_TYPES.includes(r.nodeType))if(r.nodeType===Node.TEXT_NODE){var o,a;(null!==(o=null===(a=r.textContent)||void 0===a?void 0:a.trim())&&void 0!==o?o:"")&&t.set(i,0)}else{var s=Array.from(r.childNodes).map((function(n){return t.get(e.getRrwebNodeId(n))})).filter((function(e){return void 0!==e}));s.length>0&&t.set(i,1+Math.max.apply(Math,(0,g.Z)(s)))}})),t}},{key:"getNodeById",value:function(e){var t,n,r;return null!==(t=this.sessionMirror.getNodeById(e))&&void 0!==t?t:null===(n=this.previousDomState)||void 0===n||null===(r=n.nodeByNodeId)||void 0===r?void 0:r.get(e)}},{key:"getInitialRrwebNodeIds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return[this.getRrwebNodeId(e)].concat((0,g.Z)(Array.from(e.childNodes).flatMap(this.getInitialRrwebNodeIds.bind(this))))}},{key:"filterAddsToTrackedNode",value:function(e){var t=this,n=new Map(e.map((function(e){return[e.node.id,e.parentId]})));return e.filter((function(e){return t.currentDomState.nodeByNodeId.has(function(e){for(;n.has(e);)e=n.get(e);return e}(e.node.id))}))}},{key:"getAllDescendantsIds",value:function(e){var t=this.currentDomState.childrenNodeIdsByNodeId.get(e);return t?[].concat((0,g.Z)(t),(0,g.Z)(t.flatMap(this.getAllDescendantsIds.bind(this)))):[]}},{key:"getChangedRrwebNodeIds",value:function(e){var t=this;if(!e)return new Set(this.getInitialRrwebNodeIds());var r=e.adds.filter((function(e){return e.node.type===mn.Element&&!n.UNTRACKED_TAGS.includes(e.node.tagName)||e.node.type===mn.Text}));r=this.filterAddsToTrackedNode(r);var i=function(e){var n=e.id;return t.currentDomState.nodeByNodeId.has(n)},o=e.removes.filter(i),a=o.flatMap((function(e){var n=e.id;return[n].concat((0,g.Z)(t.getAllDescendantsIds(n)))})),s=o.map((function(e){return e.parentId}));return new Set([].concat((0,g.Z)(r.flatMap((function(e){return[e.node.id,e.parentId]}))),(0,g.Z)(a),(0,g.Z)(s),(0,g.Z)(e.attributes.filter(i).flatMap((function(e){var n=e.id;return[n].concat((0,g.Z)(t.getAllDescendantsIds(n)))}))),(0,g.Z)(e.texts.filter(i).flatMap((function(e){var n,r,i=e.id;return[null===(n=t.currentDomState)||void 0===n||null===(r=n.parentNodeIdByNodeId)||void 0===r?void 0:r.get(i),i]})))).filter((function(e){return void 0!==e})))}},{key:"log",value:function(){var e;n.LOG_TO_CONSOLE&&(e=console).log.apply(e,arguments)}}],[{key:"groupMapByValue",value:function(e){var t=new Map;return e.forEach((function(e,n){var r=t.get(e)||[];t.set(e,[].concat((0,g.Z)(r),[n]))})),t}},{key:"canTextWorkInExactLocator",value:function(e){return n.getElementsByTextWithPlaywright(e).length<2}},{key:"getElementsByTextWithPlaywright",value:function(e){return window.playwright.getByText(e,{exact:!0}).elements}},{key:"sortByTagPrecedenceThenYPosition",value:function(e,t){var r=e.type===In.TextElementAppear,i=e.element,o=t.element,a=5e3*(n.getTagPrecedenceIndex(i)-n.getTagPrecedenceIndex(o));return r&&(a+=i.getBoundingClientRect().top-o.getBoundingClientRect().top),a}}]),n}(Pe.E);An=_n,_n.LOG_TO_CONSOLE=!1,_n.TAG_PRECEDENCE_ORDERING=["h1","h2","h3","h4","h5","h6","a","span","div"],_n.UNTRACKED_TAGS=["script","style"],_n.TRACKED_NODE_TYPES=[Node.ELEMENT_NODE,Node.DOCUMENT_NODE,Node.TEXT_NODE],_n.EXCLUDED_TAGS_FOR_ASSERTION=["OPTION"],_n.getTagPrecedenceIndex=function(e){var t,n=An.TAG_PRECEDENCE_ORDERING.indexOf(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase());return-1===n?An.TAG_PRECEDENCE_ORDERING.length:n};var Rn=n(5473),Dn=["aria-label","aria-labelledby","label","title","alt"];function On(e){var t,n;return null!==(t=e._debugSource)&&void 0!==t&&t.fileName?null===(n=e._debugSource)||void 0===n?void 0:n.fileName:""}function Zn(e,t){if("Unknown"===e)return!1;if("string"!==typeof e)return!1;if(e[0]!==e[0].toUpperCase())return!1;if(t.type.$$typeof===Symbol.for("react.context")||t.type.$$typeof===Symbol.for("react.forward_ref")||t.type.$$typeof===Symbol.for("react.memo")||t.type.$$typeof===Symbol.for("react.profiler")||t.type.$$typeof===Symbol.for("react.suspense"))return!1;var n=On(t);return!/.*\/node_modules\//.test(n)&&e!==n&&!/^(?!.*src).*$/.test(n)}function Ln(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return["",{}];var n=e.type,r=n?n.name||n:"Unknown",i="";if(Zn(r,e)){i+="<".concat(r,">");var o=On(e);t[r]=o}if(e.child){var a=Ln(e.child,t),s=(0,m.Z)(a,2),u=s[0],c=s[1];i+=u,t=(0,l.Z)((0,l.Z)({},t),c)}if(Zn(r,e)&&(i+="</".concat(r,">")),e.sibling){var d=Ln(e.sibling,t),f=(0,m.Z)(d,2),h=f[0],p=f[1];i+=h,t=(0,l.Z)((0,l.Z)({},t),p)}return[i,t]}function Fn(e){var t,n=null===(t=e._reactRootContainer)||void 0===t?void 0:t._internalRoot.current;return n||console.log("No react tree in element",e),Ln(n)}var Bn=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"setPrefix",value:function(t){["log","warn","error"].forEach((function(n){e.original[n]||(e.original[n]=console[n]),console[n]=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];i.unshift(t),e.original[n].apply(console,i)}}))}}]),e}();Bn.original={};var Vn,Pn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.map((function(e){return e.target}))},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collectElement:!0};(0,a.Z)(this,e),this.filterElements=t,this.observeOptions=n,this.options=r,this.elements=void 0,this.observer=void 0,this.mutationEventListeners=[]}return(0,s.Z)(e,[{key:"addEventListener",value:function(e,t){this.mutationEventListeners.push({selector:e,listener:t})}},{key:"startListening",value:function(){var e=this;this.elements=[],this.observer=new MutationObserver((function(t){e.options.collectElement&&(e.elements=[].concat((0,g.Z)(e.elements),(0,g.Z)(e.filterElements(t)))),e.mutationEventListeners.length&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE){var n=t;e.mutationEventListeners.forEach((function(e){n.matches(e.selector)?e.listener(n):n.querySelectorAll(e.selector).forEach((function(t){e.listener(t)}))}))}}))}))})),this.observer.observe(document.body,this.observeOptions)}},{key:"stopListening",value:function(){return this.observer.disconnect(),this.elements}}]),e}();function jn(e){var t=e.filter((function(e){return e.addedNodes.length>0})).reduce((function(e,t){return[].concat((0,g.Z)(e),(0,g.Z)(t.addedNodes))}),[]),n=e.filter((function(e){return"attributes"===e.type&&"style"===e.attributeName&&e.target instanceof HTMLElement&&/display\s*:\s*none/.test(e.oldValue)&&D(e.target).visible})).map((function(e){return e.target}));return[].concat((0,g.Z)(t),(0,g.Z)(n))}function Wn(e){Vn=!1;var t=Un(e);return Vn?t:null}var Un=function e(t){var n=function(e){var t=window.getComputedStyle(e).backgroundImage;if(t&&"none"!==t){var n=t.match(/url\("(.+)"\)/);if(n)return Vn=!0,"BGIMG:".concat(e.tagName.toLowerCase()+n[1])}for(var r=0,i=["::before","::after"];r<i.length;r++){var o=i[r],a=window.getComputedStyle(e,o).content.replace(/['"]/g,""),s=window.getComputedStyle(e,o).fontFamily;if("none"!==a&&""!==a){Vn=!0;var u=a.charCodeAt(0).toString(16).padStart(4,"0");return"FONT:".concat(e.tagName.toLowerCase()+s+u)}}return e.tagName.toLowerCase()};if(t&&t.nodeType!==Node.TEXT_NODE&&t.tagName){var r=t instanceof SVGElement?function(e){if(!(e.tagName.toLowerCase()in h))return e.tagName.toLowerCase();var t=h[e.tagName.toLowerCase()].map((function(t){return"".concat(t,":").concat(e.getAttribute(t))})).join(",");return t?(Vn=!0,"SVG:".concat(t)):e.tagName.toLowerCase()}(t):t instanceof HTMLImageElement?function(e){Vn=!0;var t=n(e);return"IMG:".concat(e.src)+(t!==e.tagName.toLowerCase()?"(".concat(t,")"):"")}(t):n(t);if(t.childNodes.length>0){var i=Array.from(t.childNodes).map(e).filter(Boolean).join("+");i&&i.length>0&&(r+="("+i+")")}return r}};function Hn(e,t){var n,r=function(e,t){for(var n=new Set;e;)n.add(e),e=e.parentNode;for(;t;){if(n.has(t))return t;t=t.parentNode}return null}(e,t),i=0;if(!r)return 99999;for(n=e;n&&n!==r;)i++,n=n.parentNode;for(n=t;n&&n!==r;)i++,n=n.parentNode;return i}var Gn=function(){function e(t,n){(0,a.Z)(this,e),this.dbName=t,this.storeName=n,this.db=null}return(0,s.Z)(e,[{key:"open",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new Promise((function(n,r){var i=indexedDB.open(e.dbName,t);i.onupgradeneeded=function(t){e.db=i.result,e.db.objectStoreNames.contains(e.storeName)||e.db.createObjectStore(e.storeName)},i.onsuccess=function(t){e.db=i.result,n(e.db)},i.onerror=function(e){r(i.error)}}))}},{key:"count",value:function(){var e=this;return new Promise((function(t,n){if(e.db){var r=e.db.transaction([e.storeName]).objectStore(e.storeName).count();r.onsuccess=function(){return t(r.result)},r.onerror=function(){return n(r.error)}}else n("Database has not been initialized")}))}},{key:"set",value:function(e,t){var n=this;return new Promise((function(r,i){if(n.db){var o=n.db.transaction([n.storeName],"readwrite").objectStore(n.storeName).add(e,t);o.onsuccess=function(){return r()},o.onerror=function(){return i(o.error)}}else i("Database has not been initialized")}))}},{key:"get",value:function(e,t,n){var r=this;return new Promise((function(i,o){if(r.db){var a=r.db.transaction([r.storeName]).objectStore(r.storeName),s=e?a.getAll(t,n):a.get(t);s.onsuccess=function(){return i(s.result)},s.onerror=function(){return o(s.error)}}else o("Database has not been initialized")}))}},{key:"getOne",value:function(e){return this.get(!1,e)}},{key:"getAll",value:function(e,t){return this.get(!0,e,t)}}]),e}(),zn=["element","innerText"],qn=function(e){(0,me.Z)(i,e);var n=(0,ge.Z)(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)(this,i),Bn.setPrefix("$checksum"),(e=n.call(this)).options={skipElementHighlighting:!1},e.elementSelector=void 0,e.testIdCounter=0,e.currentESRASelector=void 0,e.lastHighlights=[],e.assertionGenerator=void 0,e.initialized=!1,e.htmlReducer=void 0,e.appSpecificRules=void 0,e.config=void 0,e.rrwebEventsIndexedDB=void 0,e.rrwebEventsLoaded=!1,e.loadRRwebEvents=[],e.rrwebCrossFrameEventIdCounter=0,e.mutationDetector=void 0,e.lastFileInputDetected=void 0,e.elementSelector=new ye,e.options=(0,l.Z)((0,l.Z)({},e.options),t),e.htmlReducer=new Fe,e}return(0,s.Z)(i,[{key:"init",value:function(e){var t,n,r,i,o=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{assertionGenerator:!0},u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.appSpecificRules=e,this.config=a,this.options=(0,l.Z)((0,l.Z)({},this.options),u),!this.initialized){this.initialized=!0;var c,d=new Rn.L((function(e){return o.onRRwebEvent(e),o.eventProcessor.processEvent(e)}));if(this.initRRwebEvents(),s.assertionGenerator)this.assertionGenerator=new _n({sessionMirror:d,elementSelectorGenerator:this.elementSelector,assertionsConfig:null!==(c=this.config.assertionsConfig)&&void 0!==c?c:{maxAssertionsPerDomTree:2,maxAssertions:10,assertionsTextMaxLength:200,maxDistanceFromTextNode:2,removeCoveredLeaves:!1,removeCoveredBranches:!1,usePlaywrightGetByText:!0}});d.start(),s.assertionGenerator&&this.setEventHandlers(this.assertionGenerator),de.limitChildren=null!==(t=null===(n=this.appSpecificRules)||void 0===n||null===(r=n.esraSelectionRules)||void 0===r?void 0:r.limitChildren)&&void 0!==t?t:[],null!==(i=this.config.logPrefix)&&void 0!==i&&i.length&&Bn.setPrefix(this.config.logPrefix),"complete"===document.readyState?this.listenToInputMutations():window.addEventListener("load",(function(){o.listenToInputMutations()}))}}},{key:"listenToInputMutations",value:function(){var e=this,t=new Pn((function(e){return e.map((function(e){return e.target instanceof HTMLInputElement?e.target:null})).filter((function(e){return e}))}),{childList:!0,subtree:!0,attributes:!1,attributeOldValue:!1},{collectElement:!1});t.startListening();var n=function(t){e.lastFileInputDetected=t.target};this.querySelectorExtended("input[type=file]").forEach((function(e){e.addEventListener("click",n)})),t.addEventListener('input[type="file"]',(function(e){e.addEventListener("click",n)}))}},{key:"getElementSelector",value:function(){return this.elementSelector}},{key:"getLastSelectionLogs",value:function(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}},{key:"getBestMatchingElementSimilarityScore",value:function(e){return this.currentESRASelector=new de(e),this.currentESRASelector.selectOne().score}},{key:"extractESRAMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new ce(document).extract(n).toMetadata());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"select",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.elementSelector.selector(n,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getSelectionDataForSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.elementSelector.selector(n,r);case 3:if(a=e.sent){e.next=7;break}return console.warn("could not find element for selector: "+n),e.abrupt("return",null);case 7:return e.next=9,this.elementSelector.getSelectorAndLocator(a,{testIdSelector:null===(i=this.appSpecificRules)||void 0===i||null===(o=i.esraSelectionRules)||void 0===o?void 0:o.testIdSelector});case 9:return s=e.sent,u=s.locator,e.next=13,this.extractESRAMetadata(a);case 13:return c=e.sent,e.abrupt("return",{generatedLocator:u,esraMetadata:c,selector:n,parentFramesSelectors:r});case 17:return e.prev=17,e.t0=e.catch(0),console.log("getMetadataForSelector exception",e.t0),e.abrupt("return");case 21:case"end":return e.stop()}}),e,this,[[0,17]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=h.length>1&&void 0!==h[1]?h[1]:{minSelectionScore:.3}).minSelectionScore,o=r.cachedSelector,a=r.staticMetadata,s=h.length>2&&void 0!==h[2]&&h[2],e.prev=2,!o){e.next=8;break}return console.log("Trying to locate using cached selector",o),e.next=7,this.elementSelector.selector(o);case 7:u=e.sent;case 8:if(u||(console.log("Trying to locate using ESRA",n),q(a)&&console.log("and static data",a),this.currentESRASelector=new de(n,a),(d=this.currentESRASelector.selectOne({minSelectionScore:i})).score>=i?(u=d.candidate,c=d.score,l=d.clickOffset):console.log("Best matching element was below threshold",d)),console.log(u?["Located with score ".concat(c),u]:"Element not located"),u){e.next=12;break}return e.abrupt("return");case 12:return s&&new y(u).scrollIntoView(),this.highlightElement(u),e.next=16,this.makeMatchingElementSelectionData(u,c);case 16:return f=e.sent,l&&(f.clickOffset=l),e.abrupt("return",f);case 21:return e.prev=21,e.t0=e.catch(2),console.log("getMatchingElementSelectionData exception",e.t0),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[2,21]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAllInteractableElementsForLastSelectQuery",value:function(){var e=this,n=this.currentESRASelector.getFinalCandidates();return Promise.all(n.map(function(){var n=(0,r.Z)((0,t.Z)().mark((function n(r){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=r.esraMetadata,t.next=3,e.makeMatchingElementSelectionData(r.candidate,r.score);case 3:return t.t1=t.sent,t.abrupt("return",{esraMetadata:t.t0,selectionData:t.t1});case 5:case"end":return t.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()))}},{key:"getInteractableElementsRaw",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",k());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getInteractableElements",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=k(),i=new ce(document),e.abrupt("return",Promise.all(n.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.extract(n).toMetadata(),e.next=3,o.makeMatchingElementSelectionData(n);case 3:return a=e.sent,e.abrupt("return",{esraMetadata:r,selectionData:a});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getCurrentESRASelector",value:function(){return this.currentESRASelector}},{key:"startFlashingElementsDetection",value:function(){return this.htmlReducer.startFlashingElementsDetection()}},{key:"startMonitoringForAssertions",value:function(){return this.assertionGenerator.startMonitoring()}},{key:"generateAssertions",value:function(){return this.assertionGenerator.generateAssertions()}},{key:"stopMonitoringAndGenerateAssertions",value:function(){return this.assertionGenerator?this.assertionGenerator.stopMonitoringAndGenerateAssertions():(console.warn("Assertion generator not initialized, returning empty assertions"),[])}},{key:"stopMonitoring",value:function(){this.assertionGenerator.stopMonitoring()}},{key:"onRRwebEvent",value:function(e){this.rrwebEventsLoaded?this.rrwebEventsIndexedDB.set(e,this.rrwebCrossFrameEventIdCounter++):this.loadRRwebEvents.push(e)}},{key:"initRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.rrwebEventsIndexedDB=new Gn("checksum","rrwebEvents"),e.prev=1,e.next=4,this.rrwebEventsIndexedDB.open();case 4:e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(1),e.abrupt("return");case 9:return e.next=11,this.rrwebEventsIndexedDB.count();case 11:this.rrwebCrossFrameEventIdCounter=e.sent,this.loadRRwebEvents.forEach((function(e){n.rrwebEventsIndexedDB.set(e,n.rrwebCrossFrameEventIdCounter++)})),this.rrwebEventsLoaded=!0;case 14:case"end":return e.stop()}}),e,this,[[1,6]])})));return function(){return e.apply(this,arguments)}}()},{key:"postRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.rrwebEventsLoaded){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.rrwebEventsIndexedDB.getAll();case 4:return r=e.sent,e.abrupt("return",fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.rrwebEventsLoaded){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.rrwebEventsIndexedDB.getAll(IDBKeyRange.lowerBound(n));case 4:return r=e.sent,e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:{},r=s.length>1&&void 0!==s[1]?s[1]:{},i=s.length>2&&void 0!==s[2]?s[2]:document,this.lastFileInputDetected=null,e.next=6,this.htmlReducer.reduceHTML((0,l.Z)((0,l.Z)({},this.appSpecificRules),n),r,i);case 6:return o=e.sent,r.extractESRAForInterpretationRequiredElements&&(console.log("Extracting ESRA for interpretation required elements..."),a=this.htmlReducer.getInteractableElementsInReducedHTML(),o.elementsForNodeInterpretation=a.reduce((function(e,t){var n,r=t.checksumId,i=t.element;if(!(i instanceof HTMLElement))return e;if(null!==(n=i.innerText)&&void 0!==n&&n.trim().length)return e;var o=new ce(document).extract(i).toMetadata();return[].concat((0,g.Z)(e),[{checksumId:r,esraMetadata:o}])}),[]),console.log("Done with ESRA extraction for interpretation required elements")),e.abrupt("return",o);case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"displayInterpretationForElements",value:function(e){var t=this;this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach((function(n){var r=n.checksumId,i=n.element,o=e[r];o&&(i.isConnected?t.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}}):console.log("Element ".concat(r," is not connected to the DOM, skipping display")))}))}},{key:"overlayInteractableElementsWithChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,d,f,h,p,v=this,m=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=m.length>0&&void 0!==m[0]?m[0]:{}).reduceBeforeRender,i=void 0!==r&&r,o=n.mode,a=void 0===o?"full":o,s=n.textPosition,u=void 0===s?"tag"===a?"above":void 0:s,c=n.shouldFlipHighlightTextOutsideViewport,d=void 0===c||c,f=n.scrollIntoView,h=void 0!==f&&f,this.clearHighlights(),!i){e.next=5;break}return e.next=5,this.reduceHTML();case 5:p=function(e,t,n){if(t.isConnected){var r=t.getBoundingClientRect(),i=r.width,o=r.height;if(!(i<=0||o<=0)){var s=function(e){var t=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return e?t[e%t.length]:"red"}(n);v.highlightElement(t,(0,l.Z)((0,l.Z)({text:e,clear:!1,highlightStyle:{outline:"tag"===a?"3px dashed ".concat(s):"none"}},u?{textPosition:u}:{}),{},{textStyle:function(e){switch(a){case"tag":return{background:e,width:"initial",left:"-2px",border:"3px dashed ".concat(e),"font-weight":"bold"};case"full":return{background:"black",height:"100%"}}}(s),shouldFlipHighlightTextOutsideViewport:d}))}}else console.log("Element ".concat(e," is not connected to the DOM, skipping display"))},this.htmlReducer.getInteractableElementsInReducedHTML().filter((function(e){return!Z(e.element,(0,l.Z)((0,l.Z)({},Le),{},{scrollIntoView:h})).isHidden})).forEach((function(e,t){var n=e.checksumId,r=e.element;p(n,r,t)}));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getElementForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.htmlReducer.getSelectorForChecksumId(n);case 2:if(e.t1=r=e.sent,e.t0=null===e.t1,e.t0){e.next=6;break}e.t0=void 0===r;case 6:if(!e.t0){e.next=10;break}e.t2=void 0,e.next=11;break;case 10:e.t2=r.element;case 11:return e.abrupt("return",e.t2);case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSelectorForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.htmlReducer.getSelectorForChecksumId(n);case 2:return r=e.sent,r.element,r.innerText,i=(0,Sn.Z)(r,zn),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"hasInnerTextByChecksumId",value:function(e){return this.htmlReducer.hasInnerTextByChecksumId(e)}},{key:"getSelectorByPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=document.elementFromPoint(n,r),e.next=3,this.elementSelector.getSelectorAndLocator(i);case 3:return o=e.sent,a=o.selector,s=o.locator,u=o.parentFramesSelectors,e.abrupt("return",{selector:a,locator:s,parentFramesSelectors:u});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isInput",value:function(e){var t=T(e);if(t.length)return["input","textarea"].includes(t[0].tagName.toLowerCase())}},{key:"querySelectorExtended",value:function(e){return T(e)}},{key:"getReactTree",value:function(e){return Fn(e)}},{key:"isHidden",value:function(e,t){return Z(e,t)}},{key:"showGrid",value:function(){this.removeGrid();var e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML='\n .checksum_grid {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAJ1JREFUaEPtksEJgDAUxX73H1oRxAECkSrppacXaNI1M8f84Kz7Idf95XP0kM3yVWSzIFORikgG+lqSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddKwIpJYjK0IVicNKyKJxdiKYHXSsCKSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddLwKSLx38Oej8ZiASoSUGMAAAAASUVORK5CYII=");\n background-repeat: repeat;\n background-size: 20px;\n background-position: 0px 0px;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n z-index: 1000;\n }\n',document.body.prepend(e);var t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}},{key:"removeGrid",value:function(){var e=document.querySelector("#checksum_grid_style");e&&e.remove();var t=document.querySelector(".checksum_grid");t&&t.remove()}},{key:"clearHighlights",value:function(){this.lastHighlights.length&&(this.lastHighlights.forEach((function(e){return e.remove()})),this.lastHighlights=[])}},{key:"highlightElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.highlightStyle,r=void 0===n?{}:n,i=t.textStyle,o=void 0===i?{}:i,a=t.mousePosition,s=t.text,u=t.textType,c=void 0===u?"static":u,l=t.textPosition,d=void 0===l?"overlap":l,f=t.clear,h=void 0===f||f,p=t.shouldFlipHighlightTextOutsideViewport,v=void 0===p||p;if(!this.options.skipElementHighlighting&&(h&&this.clearHighlights(),e)){var m=P(e),g=e.getBoundingClientRect(),y=document.createElement("div");if(y.style.outline="2px dashed rgba(255,0,0,.75)",y.style.position=m?"fixed":"absolute",y.style.left=g.left+"px",y.style.top=g.top+"px",y.style.width=g.right-g.left+"px",y.style.height=g.bottom-g.top+"px",y.style.pointerEvents="none",y.style.zIndex="2147483647",y.className="checksum-dom-cache-ignore",this.mergeStyle(y,r),a){var b=document.createElement("div");if(b.style.position="absolute",b.style.left=+a.x-16+"px",b.style.top=+a.y-16+"px",b.style.color="#004DFF",b.className="checksum-dom-cache-ignore mouse-cross",b.style.zIndex="2147483648",!document.head.querySelector("style[role=mouse-location]")){var w=document.head.appendChild(document.createElement("style"));w.setAttribute("role","mouse-location"),w.innerHTML=".mouse-cross:before, .mouse-cross:after {position: absolute;left: 15px;content: ' ';height: 33px;width: 3px;background-color: #004DFF;}.mouse-cross:before {transform: rotate(0deg);}.mouse-cross:after {transform: rotate(-90deg);}"}document.body.appendChild(b),this.lastHighlights.push(b)}var S=document.createElement("div");s&&(S.className="checksum-dom-cache-ignore",S.innerText=s,S.style.fontSize="12px",S.style.width="".concat(g.width,"px"),S.style.background="#000000a1",S.style.color="white",S.style.padding="5px",S.style.position="absolute",S.style.pointerEvents="none",S.style.userSelect="none","above"===d?S.style.bottom="".concat(g.height,"px"):"below"===d&&(S.style.top="".concat(g.height,"px")),this.mergeStyle(S,o),y.appendChild(S),y.style.pointerEvents="auto","hover"===c&&(S.style.display="none",y.addEventListener("mouseover",(function(){S.style.display="block"})),y.addEventListener("mouseout",(function(){S.style.display="none"})))),document.body.appendChild(y),"above"===d&&j(S)>0?(S.style.bottom="initial",S.style.top="".concat(g.height,"px")):"below"===d&&W(S)>0&&(S.style.top="initial",S.style.bottom="".concat(g.height,"px")),this.lastHighlights.push(y),v&&this.flipHighlightTextPositionOutsideViewport(S,d,g.height)}}},{key:"flipHighlightTextPositionOutsideViewport",value:function(e,t,n){"above"===t&&j(e)>0?(e.style.bottom="initial",e.style.top="".concat(n,"px")):"below"===t&&W(e)>0&&(e.style.top="initial",e.style.bottom="".concat(n,"px"))}},{key:"getNodeSelector",value:function(e){return(new Be).getSelector(e)}},{key:"startListeningForHTMLChanges",value:function(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new Pn(jn),this.mutationDetector.startListening()}},{key:"stopListeningForHTMLChanges",value:function(e){return this.mutationDetector.stopListening().map((function(e){var t,n;return null===(t=null!==(n=e.innerText)&&void 0!==n?n:e.textContent)||void 0===t?void 0:t.trim()}))}},{key:"recordScrollPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getElementForChecksumId(n);case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:(i=new y(r)).getScrollableParentsPositions(),r._checksumScrollHelper=i;case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"restoreScrollPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getElementForChecksumId(n);case 2:if((r=e.sent)&&"_checksumScrollHelper"in r){e.next=5;break}return e.abrupt("return");case 5:r._checksumScrollHelper.restore(),delete r._checksumScrollHelper;case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getElementCaptioningKeyForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.htmlReducer.getElementForChecksumId(n)){e.next=4;break}return console.warn("Element with checksumId ".concat(n," not found")),e.abrupt("return");case 4:return e.abrupt("return",Wn(r));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"determineClosestNode",value:function(e,t,n){return Hn(e,n)-Hn(t,n)}},{key:"getLastDetectedFileInput",value:function(){if(!this.lastFileInputDetected||!this.lastFileInputDetected.isConnected)return this.lastFileInputDetected=null,{detected:!1};var e="_"+Math.random().toString(36).slice(2,4);return this.htmlReducer.addForceIncludeElement({element:this.lastFileInputDetected,checksumid:e}),this.lastFileInputDetected=null,{detected:!0,checksumid:e}}},{key:"shouldCaptionElement",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{recursive:!0}).recursive,n=this.htmlReducer.getElementForChecksumId(e);if(!n)return!1;for(var r=Dn,i=function(e){var t=e.parentElement;if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;var n=t.getBoundingClientRect(),r=n.width,i=n.height,o=e.getBoundingClientRect(),a=o.width,s=o.height;return Math.abs(r-a)<15&&Math.abs(i-s)<15},o=n;;){if(r.some((function(e){return o.getAttribute(e)})))return!1;if(o.querySelectorAll("[checksuminteractable]").length>0)return!1;if(1===r.filter((function(e){return o.querySelectorAll("[".concat(e,"]"))})).length)return!1;if(!t||!i(o))break;o=o.parentElement}return!0}},{key:"mergeStyle",value:function(e,t){for(var n in t)e.style[n]=t[n]}},{key:"makeMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i,o){var a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,S,I,C,k,E,x,A;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,f=this.setAndGetTestId(n),h=this.getVisibleParent(n),p=this.setAndGetTestId(h),v=this.getElementAtCenterOfElement(n),m=this.setAndGetTestId(v),g={element:f,visibleElement:p===f?void 0:p,atPointElement:m===f||m===p?void 0:m},e.next=9,this.elementSelector.getSelectorAndLocator(n,{testIdSelector:null===(a=this.appSpecificRules)||void 0===a||null===(s=a.esraSelectionRules)||void 0===s?void 0:s.testIdSelector});case 9:return y=e.sent,e.next=12,this.elementSelector.getSelectorAndLocator(v,{testIdSelector:null===(u=this.appSpecificRules)||void 0===u||null===(c=u.esraSelectionRules)||void 0===c?void 0:c.testIdSelector});case 12:return b=e.sent,e.next=15,this.elementSelector.getSelectorAndLocator(h,{testIdSelector:null===(l=this.appSpecificRules)||void 0===l||null===(d=l.esraSelectionRules)||void 0===d?void 0:d.testIdSelector});case 15:return w=e.sent,S={element:null===y||void 0===y?void 0:y.selector,visibleElement:null===w||void 0===w?void 0:w.selector,atPointElement:null===b||void 0===b?void 0:b.selector},I={element:null===y||void 0===y?void 0:y.parentFramesSelectors,visibleElement:null===w||void 0===w?void 0:w.parentFramesSelectors,atPointElement:null===b||void 0===b?void 0:b.parentFramesSelectors},k={element:(C=function(e){return{tag:e.tagName.toLowerCase()}})(n),visibleElement:g.visibleElement?C(h):void 0,atPointElement:g.atPointElement?C(v):void 0},E=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r!==n||!o){e.next=2;break}return e.abrupt("return",o);case 2:return i=new ce(document),e.abrupt("return",i.extract(r).toMetadata());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=23,E(n);case 23:if(e.t0=e.sent,!g.visibleElement){e.next=30;break}return e.next=27,E(h);case 27:e.t1=e.sent,e.next=31;break;case 30:e.t1=void 0;case 31:if(e.t2=e.t1,!g.atPointElement){e.next=38;break}return e.next=35,E(v);case 35:e.t3=e.sent,e.next=39;break;case 38:e.t3=void 0;case 39:return e.t4=e.t3,x={element:e.t0,visibleElement:e.t2,atPointElement:e.t4},A=null===y||void 0===y?void 0:y.locator,e.abrupt("return",{testIds:g,selectors:S,parentFramesSelectors:I,elementData:k,score:i,esraMetadata:x,generatedLocator:A});case 45:return e.prev=45,e.t5=e.catch(0),console.log("[makeMatchingElementSelectionData] exception",e.t5),e.abrupt("return",{testIds:{element:void 0},selectors:{element:void 0},parentFramesSelectors:{element:void 0},elementData:{element:void 0},esraMetadata:{element:void 0},generatedLocator:void 0});case 49:case"end":return e.stop()}}),e,this,[[0,45]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getElementAtCenterOfElement",value:function(e){var t=e.getBoundingClientRect(),n=t.x,r=t.y,i=e.ownerDocument.elementFromPoint(n,r);return i instanceof HTMLElement?i:void 0}},{key:"setAndGetTestId",value:function(e){if(e){var t=e.getAttribute("data-checksum-testid");if(t)return t;var n=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",n),n}}},{key:"getVisibleParent",value:function(e){return e instanceof HTMLElement?null!==e.offsetParent?e:this.getVisibleParent(_(e)):e}}]),i}(bn),Yn=function(){function e(){(0,a.Z)(this,e),this.goals=void 0,this.goals={}}return(0,s.Z)(e,[{key:"init",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"recordGoalFinished",value:function(e){var t;console.log("Goal reached: ".concat(e)),this.goals[e]||(this.goals[e]=0),this.goals[e]+=1,null===(t=window.checksumai)||void 0===t||t.capture("goal_reached",{goalName:e})}},{key:"getGoals",value:function(){return this.goals}}]),e}(),Qn=function(e){(0,me.Z)(n,e);var t=(0,ge.Z)(n);function n(e){var r,i=e.sessionMirror;return(0,a.Z)(this,n),(r=t.call(this)).sessionMirror=void 0,r.events=[],r.sessionMirror=i,r}return(0,s.Z)(n,[{key:"preEvent",value:function(e){this.events.push(e)}}]),n}(Pe.E),Kn=function(e){(0,me.Z)(i,e);var n=(0,ge.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).setEventHandlers(new Qn({sessionMirror:e.sessionReplayer})),e}return(0,s.Z)(i,[{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,pe.Z)((0,ve.Z)(i.prototype),"handleEvent",this).call(this,n));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),i}(bn);!function(){var e=Element.prototype.addEventListener;Element.prototype.addEventListener=function(t,n,r){e.call(this,t,n,r),this._checksum_eventListenerList||(this._checksum_eventListenerList={}),this._checksum_eventListenerList[t]||(this._checksum_eventListenerList[t]=[]),this._checksum_eventListenerList[t].push(n)}}(),window.checksum||(window.checksum={testGenerator:new qn,sessionDigester:new wn,goalTracker:new Yn,timeMachine:new Kn});var Xn=!!(0,i.v)().app,Jn=(0,i.v)().type||Xn?o.pR.App:void 0;function $n(){return($n=(0,r.Z)((0,t.Z)().mark((function e(){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=Jn||o.De.appType,e.next=e.t0===o.pR.App?3:e.t0===o.pR.Script?9:10;break;case 3:return e.next=5,Promise.all([n.e(810),n.e(516)]).then(n.bind(n,6158));case 5:return r=e.sent,(0,r.bootstrapApp)(),e.abrupt("break",10);case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}"true"===(0,i.v)().injectESRA&&(window.esraExtractor=new ce(document),window.esraSelector=function(e){return new de(e)},window.esraMetadata=u),function(){$n.apply(this,arguments)}()}()}();
3
- //# sourceMappingURL=main.eb61fffc.js.map
1
+ /*! For license information please see main.2179693d.js.LICENSE.txt */
2
+ !function(){var e={603:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var r={queryParams:void 0},i=function(){return r.queryParams||(r.queryParams=Object.fromEntries(new URLSearchParams(window.location.search).entries())),r.queryParams}},7750:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var r=n(2982),i=n(5671),o=n(3144),a=n(573),s=n(7873),u=new(function(){function e(){(0,i.Z)(this,e),this.weightsSum=0,this.config={attributes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},classes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},tagName:{decisionWeight:this.makeWeight(.6)},style:{inlineWeight:.6,computedWeight:.4,decisionWeight:this.makeWeight(.4)},innerText:{decisionWeight:this.makeWeight(.6),qualification:{exactMatchMax:20,containsMatchMax:10,maxLength:256,minLength:1},ignoreSimilarityScoreBelow:.6},innerFeatures:{decisionWeight:this.makeWeight(.8)},visualVicinity:{decisionWeight:this.makeWeight(.2)},structuralVicinity:{decisionWeight:this.makeWeight(.2)}}}return(0,o.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"get",value:function(){return this.config}},{key:"weight",value:function(e){return e/this.weightsSum}}]),e}()),c=function(){function e(t){var n=this;(0,i.Z)(this,e),this.targetElementESRAMetadata=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.unqualifiedClasses=[],this.qualifiedInnerText=void 0,this.visualVicinityComparable=[],this.structuralVicinityComparable=[],this.innerFeaturesComparable=[],this.rank=function(e){if(n.isDealBreaker(e))return{score:0,scores:{}};var t=n.tagSimilarity(e),r=n.attributesSimilarity(e),i=n.classSimilarity(e),o=n.styleSimilarity(e),a=n.innerTextSimilarity(e),s=n.innerFeaturesSimilarity(e),c=n.visualVicinitySimilarity(e),l=n.structuralVicinitySimilarity(e),d={tagScore:t,attributesScore:r,classesScore:i,styleScore:o,innerTextScore:a,innerFeaturesScore:s,visualVicinityScore:c,structuralVicinityScore:l,svgsScore:n.svgsSimilarity(e)},f={tagScore:u.weight(u.get().tagName.decisionWeight)*t,attributesScore:u.weight(u.get().attributes.decisionWeight)*r,classesScore:u.weight(u.get().classes.decisionWeight)*i,innerTextScore:u.weight(u.get().innerText.decisionWeight)*a,innerFeaturesScore:u.weight(u.get().innerFeatures.decisionWeight)*s,styleScore:u.weight(u.get().style.decisionWeight)*o,visualVicinityScore:u.weight(u.get().visualVicinity.decisionWeight)*c,structuralVicinityScore:u.weight(u.get().structuralVicinity.decisionWeight)*l};return{score:Object.values(f).reduce((function(e,t){return e+t}),0),scores:d}},this.targetElementESRAMetadata=t,this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}return(0,o.Z)(e,[{key:"getQualifiedAttributes",value:function(){return this.qualifiedAttributes}},{key:"getQualifiedClasses",value:function(){return this.qualifiedClasses}},{key:"getQualifiedInnerText",value:function(){return this.qualifiedInnerText}},{key:"setQualifiedAttributes",value:function(){var e=this.targetElementESRAMetadata.attributes,t=this.makeQualifiedAttributes(e),n=t.qualifiedAttributes,r=t.qualifiedAttributesMap;this.qualifiedAttributes=n,this.qualifiedAttributesMap=r}},{key:"makeQualifiedAttributes",value:function(e,t){var n=Object.keys(e).filter((function(n){if("input"===t)if("value"===n)return!1;var r=e[n];for(var i in r)i.endsWith("Uniqenuess")&&(r[i.replace("Uniqenuess","Uniqueness")]=r[i]);return r.globalUniqueness>u.get().attributes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.get().attributes.qualification.tagUniquenessThreshold})),r=n.reduce((function(t,n){return t[n]=e[n].value,t}),{});return{qualifiedAttributes:n,qualifiedAttributesMap:r}}},{key:"setQualifiedClasses",value:function(){var e=this;this.qualifiedClasses=this.makeQualifiedClasses(this.targetElementESRAMetadata.classes),this.unqualifiedClasses=Object.keys(this.targetElementESRAMetadata.classes).filter((function(t){return!e.qualifiedClasses.includes(t)}))}},{key:"isValidClass",value:function(e){return/^[A-Za-z_-][0-9A-Za-z_-]*$/.test(e)}},{key:"makeQualifiedClasses",value:function(e){var t=this;return Object.keys(e).filter((function(n){var r=e[n];return!!t.isValidClass(n)&&(!n.startsWith("jss")&&!n.startsWith("css-")&&":hover"!==n&&(r.globalUniqueness>u.get().classes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.get().classes.qualification.tagUniquenessThreshold))}))}},{key:"setQualifiedInnerText",value:function(){this.qualifiedInnerText=this.makeQualifiedInnerText(this.targetElementESRAMetadata.innerText)}},{key:"makeQualifiedInnerText",value:function(e){return e&&e.content.length<=u.get().innerText.qualification.maxLength&&e.content.length>=u.get().innerText.qualification.minLength?e:null}},{key:"makeBasicElementPropertiesComparable",value:function(e){var t=this;return e.reduce((function(e,n){var i=n.position?"".concat(n.tag,".").concat(n.position.slice(0,2).join(",")):n.tag,o="".concat(i,"+").concat(n.relativePosition),a=t.makeQualifiedClasses(n.classes).map((function(e){return"".concat(i,".").concat(e)})),u=[];t.makeQualifiedAttributes(n.attributes).qualifiedAttributes.forEach((function(e){u.push("".concat(i,"[").concat(e,"]")),u.push("".concat(i,"[").concat(e,"]=").concat(n.attributes[e].value))}));var c=n.feature?t.makeInnerFeaturesComparable([n.feature],{customTag:i,includeTag:!1,featureTypeWhiteList:[s.EI.SVG]}):[],l=[].concat((0,r.Z)(e),[i,o],(0,r.Z)(a),u,(0,r.Z)(c));return n.text&&(l.push("".concat(i,"<>")),l.push("".concat(i,"<").concat(n.text,">"))),n.distance&&(l.push("".concat(i,"->").concat(n.distance)),l.push("".concat(i,"->[]").concat(t.getDistanceRange(n.distance)))),l}),[])}},{key:"getDistanceRange",value:function(e){for(var t=[10,20,30,40,50,60,70,80,90,100],n=0,r=t;n<r.length;n++){var i=r[n];if(e<i)return i}return t[t.length-1]}},{key:"setVisualVicinityComparable",value:function(){this.visualVicinityComparable=this.makeVisualVicinityComparable(this.targetElementESRAMetadata.visualVicinity)}},{key:"makeVisualVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"setStructuralVicinityComparable",value:function(){this.structuralVicinityComparable=this.makeStructuralVicinityComparable(this.targetElementESRAMetadata.structuralVicinity)}},{key:"makeStructuralVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"makeInnerFeaturesComparable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.customTag,i=void 0===n?void 0:n,o=t.includeTag,a=void 0===o||o,u=t.featureTypeWhiteList,c=void 0===u?void 0:u;return e.reduce((function(e,t){if(c&&!c.includes(t.type)||t.isHidden)return e;var n=null!==i&&void 0!==i?i:t.tag,o=a?[].concat((0,r.Z)(e),[n]):e;switch(t.type){case s.EI.Button:o.push("".concat(n,"[type=").concat(t.buttonType,"]"));break;case s.EI.Input:t.inputType&&o.push("".concat(n,"[type=").concat(t.inputType,"]")),t.placeholder&&o.push("".concat(n,"[placeholder=").concat(t.placeholder,"]"));break;case s.EI.SVG:t.components.forEach((function(e){var t=[];for(var r in e.attributes)t.push("[".concat(r,"=").concat(e.attributes[r],"]"));o.push("".concat(n).concat(t.join("")))}))}return"text"in t&&t.text&&(o.push("".concat(n,"<>")),o.push("".concat(n,"<").concat(t.text,">"))),o}),[])}},{key:"setInnerFeaturesComparable",value:function(){this.innerFeaturesComparable=this.makeInnerFeaturesComparable(this.targetElementESRAMetadata.innerFeatures)}},{key:"isDealBreaker",value:function(e){if("input"===this.targetElementESRAMetadata.tag&&"input"===e.tag){var t=function(e){return e.type?e.type.value:"text"};if(t(this.targetElementESRAMetadata.attributes)!==t(e.attributes))return!0}return!1}},{key:"tagSimilarity",value:function(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}},{key:"attributesSimilarity",value:function(e){var t=this,n=function(e){return[].concat((0,r.Z)(t.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},i=this.makeQualifiedAttributes(e.attributes).qualifiedAttributesMap;return this.jaccard(n(this.qualifiedAttributesMap),n(i))}},{key:"indicativeAttributesSimilarity",value:function(e){return this.qualifiedAttributesMap.placehoder&&e.attributes.placehoder&&this.qualifiedAttributesMap.placehoder===e.attributes.placehoder.value?1:0}},{key:"classSimilarity",value:function(e){return this.jaccard(this.qualifiedClasses,this.makeQualifiedClasses(e.classes))}},{key:"innerTextSimilarity",value:function(e){var t=this;if(!this.targetElementESRAMetadata.innerText&&!e.innerText)return 1;var n=this.makeQualifiedInnerText(e.innerText);if(!this.qualifiedInnerText||!n)return 0;if(this.qualifiedInnerText.content===n.content)return 1;Object.values({email:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,url:/^(http|https):\/\/[^ "]+$/}).forEach((function(e){if(e.test(t.qualifiedInnerText.content)&&e.test(n.content))return.5}));try{return new Date(this.qualifiedInnerText.content),new Date(n.content),.5}catch(i){}var r=function(e){return e.replace(/\d/g,"d").replace(/[a-zA-Z]/g,"s")};return r(this.qualifiedInnerText.content)===r(n.content)?.5:0}},{key:"innerFeaturesSimilarity",value:function(e){return this.jaccard(this.innerFeaturesComparable,this.makeInnerFeaturesComparable(e.innerFeatures))}},{key:"visualVicinitySimilarity",value:function(e){return this.jaccard(this.visualVicinityComparable,this.makeVisualVicinityComparable(e.visualVicinity))}},{key:"structuralVicinitySimilarity",value:function(e){return this.jaccard(this.structuralVicinityComparable,this.makeStructuralVicinityComparable(e.structuralVicinity))}},{key:"styleSimilarity",value:function(e){var t,n,i,o,a=this,s=function(e){return[].concat((0,r.Z)(a.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},c=this.jaccard(s(null!==(t=this.targetElementESRAMetadata.style.inline)&&void 0!==t?t:{}),s(null!==(n=e.style.inline)&&void 0!==n?n:{})),l=this.jaccard(s(null!==(i=this.targetElementESRAMetadata.style.computed)&&void 0!==i?i:{}),s(null!==(o=e.style.computed)&&void 0!==o?o:{}));return c*u.get().style.inlineWeight+l*u.get().style.computedWeight}},{key:"svgsSimilarity",value:function(e){return this.targetElementESRAMetadata.svgs||e.svgs?this.targetElementESRAMetadata.svgs&&e.svgs&&JSON.stringify(this.targetElementESRAMetadata.svgs)===JSON.stringify(e.svgs)?1:0:1}},{key:"keyValueObjectToArray",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 Object.keys(e).map((function(r){return"".concat(r).concat(t).concat(function(t){return n?n(e,t):e[t]}(r))}))}},{key:"jaccard",value:function(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,a.$m)(e,t)}}]),e}()},7873:function(e,t,n){"use strict";n.d(t,{BM:function(){return o},EI:function(){return r},Qy:function(){return a},i7:function(){return i}});var r=function(e){return e[e.Media=0]="Media",e[e.NoData=1]="NoData",e[e.Anchor=2]="Anchor",e[e.Button=3]="Button",e[e.Input=4]="Input",e[e.Text=5]="Text",e[e.SVG=6]="SVG",e}({}),i=function(e){return e.Element="element",e.Parent="parent",e.Child="child",e.LeftSibling="left-sibling",e.RightSibling="right-sibling",e}({}),o=function(e){return e.Center="center",e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e.TopRight="top-right",e.TopLeft="top-left",e.BottomRight="bottom-right",e.BottomLeft="bottom-left",e}({}),a=function(e){return e[e.Query=0]="Query",e[e.Intersection=1]="Intersection",e[e.Interactables=2]="Interactables",e[e.All=3]="All",e}({})},1855:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});var r=function(e){return e.Click="click",e.DoubleClick="double_click",e.DragAndDrop="drag_and_drop",e.Input="input",e.ClickAndType="click_and_type",e.ClearAndType="clear_and_type",e.Check="check",e.UnCheck="uncheck",e.Hover="hover",e.Navigation="navigation",e.Keystroke="keystroke",e.SelectOption="selectoption",e.UploadFiles="upload_files",e.Wait="wait",e.SwitchTab="switch_tab",e.CustomCode="custom_code",e}({})},9478:function(e,t,n){"use strict";n.d(t,{De:function(){return o},hj:function(){return i},pR:function(){return r}});var r=function(e){return e.Script="script",e.App="app",e}({}),i=function(e){return e.TodoListApp="todo",e.ReplayerApp="replayer",e.SessionGraphApp="sessiongraph",e}({}),o={appType:"script",testAppName:"sessiongraph"}},1209:function(e,t,n){"use strict";n.d(t,{J:function(){return s}});var r=n(1413),i=n(5671),o=n(3144),a=n(458),s=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.target,o=void 0===r?document:r,a=n.disabled,s=void 0!==a&&a,u=n.log,c=void 0===u||u,l=n.name,d=n.monitorInput,f=void 0!==d&&d;(0,i.Z)(this,e),this.target=void 0,this.name=void 0,this.disabled=void 0,this.logActivity=void 0,this.monitorInput=void 0,this.cache=void 0,this.observer=void 0,this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid"],this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"],this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"],this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(","),this.shouldIgnoreMutationRecord=function(e){try{if("attributes"===e.type&&t.ignoreMutationsWithAttributes.includes(e.attributeName))return!0;if("attributes"===e.type&&t.ignoreMutationsWithAttributeRegexPatterns.some((function(t){return new RegExp("^"+t+"$").test(e.attributeName)})))return!0;if("attributes"===e.type&&"class"===e.attributeName){var n=function(e){return e.split(" ").filter((function(e){return![":hover","rrweb-paused"].includes(e)})).sort().join(" ")};return n(e.oldValue)===n(e.target.className)}var r=function(e){return t.ignoreElementsWithClasses.some((function(t){return e.classList.contains(t)}))};if("childList"===e.type&&Array.from(e.addedNodes).every((function(e){return r(e)}))&&Array.from(e.removedNodes).every((function(e){return r(e)})))return!0}catch(i){}return!1},this.monitoredTextElements=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){t.invalidate()}))},this.target=o,this.name=l,this.disabled=s,this.logActivity=c,this.monitorInput=f,this.startObserver()}return(0,o.Z)(e,[{key:"startObserver",value:function(){var e=this;this.observer=new MutationObserver((function(t){t.every(e.shouldIgnoreMutationRecord)||(e.invalidate(),e.monitorInput&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE){var n=t;n.matches(e.inputEnabledSelectors)||n.isContentEditable?e.monitorInputEnabledElement(n):Array.from(n.querySelectorAll("*")).filter((function(t){return t.matches&&t.matches(e.inputEnabledSelectors)||t.isContentEditable})).forEach(e.monitorInputEnabledElement)}}))})))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.monitorInput&&this.startInputMonitoring()}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=(0,a.RA)(this.inputEnabledSelectors),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}},{key:"get",value:function(){return this.log("get","has cache:",!!this.cache),this.cache}},{key:"set",value:function(e){this.disabled||(this.cache=e)}},{key:"hasCache",value:function(){return this.log("hasCache",!!this.cache),!!this.cache}},{key:"invalidate",value:function(){this.set(void 0)}},{key:"log",value:function(){var e;if(this.logActivity){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).log.apply(e,["[DOMMutationDependentCache] ".concat(this.name?"[".concat(this.name,"]"):"",":")].concat(n))}}}],[{key:"getInstance",value:function(t,n){var i,o=this.makeNameForCache(t,null===n||void 0===n?void 0:n.flags);e.instances[o]||(e.instances[o]=new e((0,r.Z)((0,r.Z)({},n),{},{name:null!==(i=null===n||void 0===n?void 0:n.name)&&void 0!==i?i:t})),null!==n&&void 0!==n&&n.initialValue&&e.instances[o].set(null===n||void 0===n?void 0:n.initialValue));var a=e.instances[o];return null!==n&&void 0!==n&&n.invalidate&&a.invalidate(),a}},{key:"invalidateAll",value:function(){Object.values(e.instances).forEach((function(e){return e.invalidate()}))}},{key:"makeNameForCache",value:function(e,t){return"".concat(e).concat(t?JSON.stringify(t):"")}}]),e}();s.instances={}},458:function(e,t,n){"use strict";n.d(t,{$s:function(){return D},C0:function(){return w},Du:function(){return y},Ey:function(){return c},GF:function(){return T},GU:function(){return C},MX:function(){return l},PZ:function(){return x},QI:function(){return m},RA:function(){return b},ZH:function(){return E},ZS:function(){return O},Zl:function(){return I},_N:function(){return L},ko:function(){return _},m7:function(){return R},mn:function(){return k},nq:function(){return S},w1:function(){return v}});var r=n(7762),i=n(885),o=n(1413),a=n(2982),s=n(5034),u=n(1209);window.DOMMutationDependentCache=u.J;var c=function(e){},l=function(e){},d=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]',"label[for]"],f=["pointer","grab","text","vertical-text","zoom-in","zoom-out","help"],h=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle","onMouseEnter"],p=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle","onmouseenter"],v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.allowDisabled,i=void 0!==r&&r,o=n.useDataVisibleAttributes,s=void 0===o||o,v=n.excludeCrossOriginIframes,g=void 0===v||v,y=u.J.getInstance("getAllInteractableHTMLElements",{target:e,log:!1}),w=Date.now(),k=function(e){var t=e.reduce((function(e,t){return!i&&t.state.disabled?e:[].concat((0,a.Z)(e),[t.element])}),[]);return console.log("[getAllInteractableHTMLElements] done, took",Date.now()-w,"ms"),t};if(y.hasCache())return k(y.get());var E=b("*",e,{excludeCrossOriginIframes:g});c("[getAllInteractableHTMLElements] items");var S=E.reduce((function(e,n){var r,i="disabled"in n&&n.disabled;return n.matches(d.concat(t.appSpecificInteractableElementsSelectors||[]).filter((function(e){return!!e})).join(","))||f.includes(window.getComputedStyle(n).cursor)||n.isContentEditable&&!(null!==(r=n.parentElement)&&void 0!==r&&r.isContentEditable)||!t.ignoreEventListenersWhenDeterminingInteractability&&(p.some((function(e){return n[e]}))||function(e){if(e._checksum_eventListenerList){var t=e._checksum_eventListenerList;if(p.some((function(e){return t[e.slice(2)]})))return!0}var n=Object.keys(e).find((function(e){return e.startsWith("__reactFiber")})),r=n?e[n]:void 0;return!(!r||!r.memoizedProps)&&h.some((function(e){return r.memoizedProps[e]}))}(n))?[].concat((0,a.Z)(e),[{element:n,disabled:i}]):e}),[]);l("[getAllInteractableHTMLElements] items"),c("[getAllInteractableHTMLElements] getCompoundInteractableRootElement");var x=S.reduce((function(e,n){var r=m(n.element,t.appSpecificInteractableElementsSelectors||[]),i=e.find((function(e){return e.element===r}));return i?!n.disabled&&i.state.disabled&&(i.state.disabled=!1):e.push({element:r,state:{disabled:n.disabled}}),e}),[]);l("[getAllInteractableHTMLElements] getCompoundInteractableRootElement"),c("[getAllInteractableHTMLElements] isElementHidden");var I=x.filter((function(e){var t=e.element;if(s){if(!t)return!1;var n=t.getAttribute("checksum-data-visible");if(n){var r="true"===n,i="true"===t.getAttribute("checksum-data-visible-under-transparent-element"),o="true"===t.getAttribute("checksum-data-transparently-visible");return r&&!i||o}}return!T(t,{markTransparentElementsAsHidden:!1}).isHidden}));return l("[getAllInteractableHTMLElements] isElementHidden"),y.set(I),k(I)},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return e;var n=window.getComputedStyle(e).cursor,r=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!1},r=e;r;){var i=r.parentElement;if(!i||i.nodeType!==Node.ELEMENT_NODE)return r;if(t(i))break;if(window.getComputedStyle(i).cursor!==n)return r;r=i}};try{if("isContentEditable"in e&&e.isContentEditable)return e;if("closest"in e){var i=y(e,d.concat(t).filter((function(e){return!!e})).join(","));if(i&&function(e){try{if(e.matches("label[for]")&&!e.matches(d.concat(t).filter((function(e){return!!e&&"label[for]"!==e})).join(","))){var n=e.getAttribute("for"),r=document.getElementById(n);return!!r&&"input"===r.tagName.toLowerCase()&&["checkbox","radio"].includes(r.getAttribute("type"))}}catch(i){console.error("interactableParentIsValid",e,i)}return!0}(i)){if(i===e)return e;var o=r(e,(function(e){return e===i}));return o||i}}if(["auto","default","context-menu","help","progress","wait"].includes(n))return e;var a=r(e);return a||e}catch(s){return console.error("getCompoundInteractableRootElement",e,s),e}};function g(e){return!e.src||window.location.origin!==new URL(e.src).origin}var y=function e(t,n){if(t.matches(n))return t;var r=t.slot;if(r){for(var i=t.parentElement;i;){if(i.shadowRoot){var o=i.shadowRoot.querySelector('slot[name="'.concat(r,'"]'));if(o)return e(o,n)}i=i.parentElement}return null}var a=t.closest(n);if(a)return a;var s=t.getRootNode();return s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e(s.host,n):null},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.excludeCrossOriginIframes,i=void 0!==r&&r,o=n.includeHTML,a=void 0!==o&&o,s=[];return function t(n){!function(t){t.querySelectorAll(e).forEach((function(e){return s.push(e)}))}(n);var r=[];!function e(t){t.shadowRoot&&r.push(t.shadowRoot),t.childNodes.forEach((function(t){return e(t)}))}(n),r.forEach((function(e){return t(e)})),n.querySelectorAll("iframe").forEach((function(e){if(!i||!g(e))try{var n=e.contentDocument;n&&t(n)}catch(r){return}}))}(t),a&&t.nodeType===Node.DOCUMENT_NODE&&t.documentElement.matches(e)&&s.push(t.documentElement),s};function w(e){var t=e.getRootNode();return t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?function(e,t){var n=e.querySelectorAll("slot");if(!n.length)return e.innerText;var r=e.cloneNode(!0),i=r.querySelectorAll("slot");return n.forEach((function(e,t){var n=e.assignedNodes();i[t].innerText=n.map((function(e){switch(e.nodeType){case Node.TEXT_NODE:return e.textContent;case Node.ELEMENT_NODE:return e.innerText}})).filter((function(e){return!!e})).join("\n")})),r.innerText.trim()}(e):e.innerText}var k=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).flattenShadowRootChildren,n=void 0!==t&&t,r=Array.from(e.childNodes);if(e.nodeType===Node.ELEMENT_NODE){var i,o=e;if(o.shadowRoot&&(r=r.filter((function(e){return!e.assignedSlot})),n?r=r.concat(Array.from(o.shadowRoot.childNodes)):r.push(o.shadowRoot)),"slot"===o.tagName.toLowerCase())(i=r).push.apply(i,(0,a.Z)(o.assignedNodes()))}return r},E=function(e){var t,n,r=Array.from(e.children);e.shadowRoot&&(t=r=r.filter((function(e){return!e.assignedSlot}))).push.apply(t,(0,a.Z)(Array.from(e.shadowRoot.children)));"slot"===e.tagName.toLowerCase()&&(n=r).push.apply(n,(0,a.Z)(e.assignedElements()));return r},S=function(e){var t=e.parentElement;if(t)return t;switch(e.nodeType){case Node.ELEMENT_NODE:var n=e;if(n.assignedSlot)return n.assignedSlot;break;case Node.DOCUMENT_FRAGMENT_NODE:return e.host}var r=e.parentNode;if(r)switch(r.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return r.host;case Node.DOCUMENT_NODE:if(window.document===r)return null;var i=Array.from(window.document.querySelectorAll("iframe")).find((function(e){return e.contentDocument===r}));if(i)return i}return null};function x(e){if(!e)return!1;var t=e.getBoundingClientRect();return t.top<=window.innerHeight&&t.left<=window.innerWidth&&t.bottom>=0&&t.right>=0}function I(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=window.getComputedStyle(e),r="0"===n.opacity;return{visible:"hidden"!==n.visibility&&"none"!==n.display&&(!t||!r),isTransparent:r}}function C(e,t){var n,r;return null!==(n=null!==t&&void 0!==t?t:null===e||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)&&void 0!==n?n:window}function T(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.markTransparentElementsAsHidden,u=void 0===a||a,c=n.markElementsHiddenByTransparentElementAsVisible,l=void 0!==c&&c,d=n.scrollIntoView,f=void 0===d||d,h=n.useCache,p=void 0!==h&&h;if(p){var v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=M(t);return n.has(e)?n.get(e):void 0}(e,{markTransparentElementsAsHidden:u,markElementsHiddenByTransparentElementAsVisible:l,scrollIntoView:f});if(v)return v}var m={isHidden:!0},g=function(n){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t&&t.restore(),p&&N(e,n,{markTransparentElementsAsHidden:u,markElementsHiddenByTransparentElementAsVisible:l}),(0,o.Z)((0,o.Z)({},m),n)};if(!e)return g({isHidden:!0});var y=I(e="OPTION"===e.tagName&&(e.closest("select")||e.closest("datalist"))||e,u),w=y.visible,k=y.isTransparent;if(m.isTransparent=k,!w)return g({isHidden:!0});if(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.scrollIntoView,i=void 0===r||r,o=e.parentElement,a=window.getComputedStyle(e);if("absolute"===a.position||"fixed"===a.position)return!1;i&&(t=new s.t(e).scrollIntoView());var u=function(e){return t&&t.restore(),e};for(;o;){if(!(o instanceof C(e).Element))return u(!1);var c=window.getComputedStyle(o);if("absolute"===c.position||"fixed"===c.position)return u(!1);var l="hidden"===c.overflowX,d="hidden"===c.overflowY;if((l||d)&&!A(o,e,l,d))return u(!0);o=o.parentElement}return u(!1)}(e,{scrollIntoView:f}))return g({isHidden:!0});try{var E;f&&(t=new s.t(e).scrollIntoView());var x=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView,r=e.ownerDocument,i={top:0,left:0,right:n.innerWidth||r.documentElement.clientWidth,bottom:n.innerHeight||r.documentElement.clientHeight},o={top:Math.max(t.top,i.top),left:Math.max(t.left,i.left),right:Math.min(t.right,i.right),bottom:Math.min(t.bottom,i.bottom)};return o.width=o.right-o.left,o.height=o.bottom-o.top,o.width>0&&o.height>0?o:null}(e);if(!x)return g({isHidden:!0});var _,R=[[x.width/2,x.height/2,!0],[Math.max(.01*x.width,1),Math.max(.01*x.height,1)],[Math.min(.99*x.width,x.width-1),Math.max(.01*x.height,1)],[Math.max(.01*x.width,1),Math.min(.99*x.height,x.height-1)],[Math.min(.99*x.width,x.width-1),Math.min(.99*x.height,x.height-1)]],D=null!==(E=function(e){for(var t=e;t;){if(11===t.nodeType)return[t,t.ownerDocument.defaultView];t=t.parentNode}}(e))&&void 0!==E?E:[e.ownerDocument,e.ownerDocument.defaultView],O=(0,i.Z)(D,2),L=O[0],Z=O[1];if(e instanceof C(e).HTMLInputElement&&e.id&&e.type&&["checkbox","radio"].includes(e.type)){var F=b('label[for="'.concat(e.id,'"]'),L);F.length&&(_=F[0])}for(var P=0,B=R;P<B.length;P++){var V=(0,i.Z)(B[P],3),j=V[0],H=V[1],U=V[2],W=x.left+j>=0&&x.left+j<=Z.innerWidth?x.left+j:j,q=x.top+H>=0&&x.top+H<=Z.innerHeight?x.top+H:H,G=L.elementFromPoint(W,q);if(G===e)return g({isHidden:!1,clickOffset:U?void 0:{x:j,y:H}});if(G){if(!0===U&&G.shadowRoot)return g(T(G,n));for(var z=G;z;){if(z===e||_&&_===z)return g({isHidden:!1,clickOffset:U?void 0:{x:j,y:H}});z=S(z)}if(l)try{var $,Y=L.elementsFromPoint(W,q),Q=(0,r.Z)(Y);try{for(Q.s();!($=Q.n()).done;){var X=$.value;if(X===e)return g({isHidden:!1,clickOffset:U?void 0:{x:j,y:H},isBehindTransparentElement:!0});var K=Z.getComputedStyle(X),J=X.getBoundingClientRect();if("0"!==K.opacity&&"hidden"!==K.visibility&&!/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(K.backgroundColor)||J.width>1.2*x.width||J.height>1.2*x.height)break}}catch(ee){Q.e(ee)}finally{Q.f()}}catch(te){console.error("Error while checking transparent elements over interactable",te)}}}return t&&(t.restore(),t=void 0),_?T(_,n):g({isHidden:!0})}catch(te){throw te}}var M=function(e){var t=u.J.getInstance("isElementHidden",{log:!1,flags:e}),n=t.get();return n||(n=new Map,t.set(n)),n};var N=function(e,t){M(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).set(e,t)};function A(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=e.getBoundingClientRect(),o=t.getBoundingClientRect(),a=i.left<o.right&&i.right>o.left,s=i.top<o.bottom&&i.bottom>o.top;return(!n||a)&&(!r||s)}function _(e,t,n){return e?e.replace(new RegExp(t,"g"),n):e}function R(e,t){try{var n=e.ownerDocument.defaultView;return e instanceof n[t]||e instanceof n.top[t]}catch(r){}return!1}!function(){for(var e=[],t=1;t<=20;t++){var n=t/20;e.push(n)}e.push(0)}();function D(e){try{return"fixed"===getComputedStyle(e).position||!(!e.parentElement||e.parentElement===document.body)&&D(e.parentElement)}catch(t){return console.error("isAncestorOrSelfFixed",t),!1}}function O(e){var t=e.getBoundingClientRect().top;return t<0?-t:0}function L(e){var t=e.getBoundingClientRect().bottom,n=window.innerHeight;return t>n?t-n:0}},8739:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(5671),i=n(3144),o=function(){function e(){(0,r.Z)(this,e)}return(0,i.Z)(e,[{key:"skipEvents",value:function(e){}},{key:"preCastEvent",value:function(e){}},{key:"preEvent",value:function(e){}},{key:"postEvent",value:function(e,t){return t}},{key:"handleMeta",value:function(e,t){}},{key:"handleViewportResize",value:function(e){}},{key:"handleMutation",value:function(e,t){}},{key:"handleInput",value:function(e,t){}},{key:"handleClick",value:function(e,t){}},{key:"handleDblClick",value:function(e,t){}},{key:"handleMouseDown",value:function(e,t){}},{key:"handleMouseUp",value:function(e,t){}},{key:"handleMouseMove",value:function(e,t){}},{key:"handleFocus",value:function(e,t){}},{key:"handleBlur",value:function(e,t){}},{key:"handleContentEditableInput",value:function(e,t){}},{key:"handleKeyStroke",value:function(e,t){}},{key:"handleURLChange",value:function(e,t){}}]),e}()},7666:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(4165),i=n(5861),o=n(5671),a=n(3144),s=n(1414),u=n(4228),c=function(){function e(t){var n=this,a=t.eventHandlers;(0,o.Z)(this,e),this.handlers=void 0,this.preCastEvent=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.handlers.preCastEvent(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.processEvent=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){var i,o,a,s=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!(s.length>1&&void 0!==s[1])||s[1],n.handlers.preEvent(t),!i){e.next=8;break}return e.next=5,n.handleEvent(t);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=void 0;case 9:return o=e.t0,e.next=12,n.handlers.postEvent(t,o);case 12:return a=e.sent,e.abrupt("return",n.handlers.controlledReturn?n.handlers.getReturnValue():a);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.skipEvents=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.handlers.skipEvents(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.handlers=a}return(0,a.Z)(e,[{key:"setHandlers",value:function(e){this.handlers=e}},{key:"handleEvent",value:function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===s.tw.Meta?3:e.t0===s.tw.IncrementalSnapshot?4:e.t0===s.tw.Custom?14:21;break;case 3:return e.abrupt("return",this.handlers.handleMeta(t.data,t));case 4:e.t1=t.data.source,e.next=e.t1===s.yh.ViewportResize?7:e.t1===s.yh.Mutation?8:e.t1===s.yh.Input?9:e.t1===s.yh.MouseInteraction?10:e.t1===s.yh.MouseMove?11:12;break;case 7:return e.abrupt("return",this.handlers.handleViewportResize(t.data,t));case 8:return e.abrupt("return",this.handlers.handleMutation(t.data,t));case 9:return e.abrupt("return",this.handlers.handleInput(t.data,t));case 10:return e.abrupt("return",this.handleMouseInteraction(t.data,t));case 11:return e.abrupt("return",this.handlers.handleMouseMove(t.data,t));case 12:return e.abrupt("break",13);case 13:case 20:case 21:return e.abrupt("break",22);case 14:e.t2=t.data.tag,e.next=e.t2===u.N.ContentEditableInput?17:e.t2===u.N.KeyStroke?18:e.t2===u.N.URLChange?19:20;break;case 17:return e.abrupt("return",this.handlers.handleContentEditableInput(t.data.payload,t));case 18:return e.abrupt("return",this.handlers.handleKeyStroke(t.data.payload,t));case 19:return e.abrupt("return",this.handlers.handleURLChange(t.data.payload,t));case 22:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseInteraction",value:function(){var e=(0,i.Z)((0,r.Z)().mark((function e(t,n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===s.Y2.Click?3:e.t0===s.Y2.DblClick?4:e.t0===s.Y2.MouseDown?5:e.t0===s.Y2.MouseUp?6:e.t0===s.Y2.Focus?7:e.t0===s.Y2.Blur?8:9;break;case 3:return e.abrupt("return",this.handlers.handleClick(t,n));case 4:return e.abrupt("return",this.handlers.handleDblClick(t,n));case 5:return e.abrupt("return",this.handlers.handleMouseDown(t,n));case 6:return e.abrupt("return",this.handlers.handleMouseUp(t,n));case 7:return e.abrupt("return",this.handlers.handleFocus(t,n));case 8:return e.abrupt("return",this.handlers.handleBlur(t,n));case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}()},5034:function(e,t,n){"use strict";n.d(t,{t:function(){return s}});var r=n(7762),i=n(5671),o=n(3144),a=n(458),s=function(){function e(t){(0,i.Z)(this,e),this.element=void 0,this.elRect=void 0,this.initialScrollPositions=void 0,this.element=t,this.elRect=this.element.getBoundingClientRect()}return(0,o.Z)(e,[{key:"scrollIntoView",value:function(){if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!(0,a.PZ)(this.element)){var e,t=(0,r.Z)(this.initialScrollPositions);try{for(t.s();!(e=t.n()).done;){var n=e.value,i=n.element.getBoundingClientRect();if(this.elRect.top<i.top||this.elRect.bottom>i.bottom){var o=this.elRect.top-i.top+n.element.scrollTop;n.element.scrollTop=o}}}catch(s){t.e(s)}finally{t.f()}}return this}},{key:"restore",value:function(){this.initialScrollPositions.forEach((function(e){var t=e.element,n=e.top,r=e.left;try{t.scroll(r,n)}catch(i){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:t,top:n,left:r},i)}}))}},{key:"getScrollableParentsPositions",value:function(){this.initialScrollPositions=[];for(var e=(0,a.nq)(this.element);null!=e;)(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&this.initialScrollPositions.push({element:e,top:e.scrollTop,left:e.scrollLeft}),e=(0,a.nq)(e)}}]),e}()},408:function(e,t,n){"use strict";n.d(t,{L:function(){return he}});var r=n(7762),i=n(3144),o=n(5671),a=n(5512),s=n(885),u=n(2982),c=n(1737),l=n(1414);function d(e){return"__ln"in e}var f,h=function(){function e(){(0,o.Z)(this,e),this.length=0,this.head=null,this.tail=null}return(0,i.Z)(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null===t||void 0===t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&d(e.previousSibling)){var 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&&d(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),e}(),p=function(e,t){return"".concat(e,"@").concat(t)},v=function(){function e(){var t=this;(0,o.Z)(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],n=new Set,i=new h,o=function(e){for(var n=e,r=a.zi;r===a.zi;)r=(n=n&&n.nextSibling)&&t.mirror.getId(n);return r},s=function(r){if(r.parentNode&&(0,c._f)(r)&&"TEXTAREA"!==r.parentNode.tagName){var s=(0,a.Zq)(r.parentNode)?t.mirror.getId((0,c.jB)(r)):t.mirror.getId(r.parentNode),u=o(r);if(-1===s||-1===u)return i.addNode(r);var l=(0,a.eD)(r,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){(0,c.Cj)(e,t.mirror)&&t.iframeManager.addIframe(e),(0,c.qs)(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),(0,c.He)(r)&&t.shadowDomManager.addShadowRoot(r.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});l&&(e.push({parentId:s,nextId:u,node:l}),n.add(l.id))}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());var u,l=(0,r.Z)(t.movedSet);try{for(l.s();!(u=l.n()).done;){var d=u.value;g(t.removes,d,t.mirror)&&!t.movedSet.has(d.parentNode)||s(d)}}catch(M){l.e(M)}finally{l.f()}var f,p=(0,r.Z)(t.addedSet);try{for(p.s();!(f=p.n()).done;){var v=f.value;b(t.droppedSet,v)||g(t.removes,v,t.mirror)?b(t.movedSet,v)?s(v):t.droppedSet.add(v):s(v)}}catch(M){p.e(M)}finally{p.f()}for(var m=null;i.length;){var y=null;if(m){var w=t.mirror.getId(m.value.parentNode),k=o(m.value);-1!==w&&-1!==k&&(y=m)}if(!y)for(var E=i.tail;E;){var S=E;if(E=E.previous,S){var x=t.mirror.getId(S.value.parentNode);if(-1===o(S.value))continue;if(-1!==x){y=S;break}var I=S.value;if(I.parentNode&&I.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var C=I.parentNode.host;if(-1!==t.mirror.getId(C)){y=S;break}}}}if(!y){for(;i.head;)i.removeNode(i.head.value);break}m=y.previous,i.removeNode(y.value),s(y.value)}var T={texts:t.texts.map((function(e){var n=e.node;return n.parentNode&&"TEXTAREA"===n.parentNode.tagName&&t.genTextAreaValueMutation(n.parentNode),{id:t.mirror.getId(n),value:e.value}})).filter((function(e){return!n.has(e.id)})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){var n=e.attributes;if("string"===typeof n.style){var r=JSON.stringify(e.styleDiff),i=JSON.stringify(e._unchangedStyles);r.length<n.style.length&&(r+i).split("var(").length===n.style.split("var(").length&&(n.style=e.styleDiff)}return{id:t.mirror.getId(e.node),attributes:n}})).filter((function(e){return!n.has(e.id)})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};(T.texts.length||T.attributes.length||T.removes.length||T.adds.length)&&(t.texts=[],t.attributes=[],t.attributeMap=new WeakMap,t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(T))}},this.genTextAreaValueMutation=function(e){var n=t.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(n),t.attributeMap.set(e,n)),n.attributes.value=Array.from(e.childNodes,(function(e){return e.textContent||""})).join("")},this.processMutation=function(e){if(!(0,c.WU)(e.target,t.mirror))switch(e.type){case"characterData":var n=e.target.textContent;(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:(0,a.IG)(e.target,t.maskTextClass,t.maskTextSelector,!0)&&n?t.maskTextFn?t.maskTextFn(n,(0,c.rU)(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,i=e.attributeName,o=e.target.getAttribute(i);if("value"===i){var s=(0,a.kv)(r);o=(0,a.wR)({element:r,maskInputOptions:t.maskInputOptions,tagName:r.tagName,type:s,value:o,maskInputFn:t.maskInputFn})}if((0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||o===e.oldValue)return;var u=t.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===i&&!t.keepIframeSrcFn(o)){if(r.contentDocument)return;i="rr_src"}if(u||(u={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(u),t.attributeMap.set(e.target,u)),"type"===i&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!(0,a.P8)(r.tagName,i)&&(u.attributes[i]=(0,a.We)(t.doc,(0,a.UR)(r.tagName),(0,a.UR)(i),o),"style"===i)){if(!t.unattachedDoc)try{t.unattachedDoc=document.implementation.createHTMLDocument()}catch(k){t.unattachedDoc=t.doc}var l=t.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(var d=0,f=Array.from(r.style);d<f.length;d++){var h=f[d],v=r.style.getPropertyValue(h),g=r.style.getPropertyPriority(h);v!==l.style.getPropertyValue(h)||g!==l.style.getPropertyPriority(h)?u.styleDiff[h]=""===g?v:[v,g]:u._unchangedStyles[h]=[v,g]}for(var y=0,b=Array.from(l.style);y<b.length;y++){var w=b[y];""===r.style.getPropertyValue(w)&&(u.styleDiff[w]=!1)}}break;case"childList":if((0,c.IT)(e.target,t.blockClass,t.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void t.genTextAreaValueMutation(e.target);e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(n){var r=t.mirror.getId(n),i=(0,a.Zq)(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||(0,c.WU)(n,t.mirror)||!(0,c.nF)(n,t.mirror)||(t.addedSet.has(n)?(m(t.addedSet,n),t.droppedSet.add(n)):t.addedSet.has(e.target)&&-1===r||(0,c.y5)(e.target,t.mirror)||(t.movedSet.has(n)&&t.movedMap[p(r,i)]?m(t.movedSet,n):t.removes.push({parentId:i,id:r,isShadow:!(!(0,a.Zq)(e.target)||!(0,a.DS)(e.target))||void 0})),t.mapRemoves.push(n))}))}},this.genAdds=function(e,n){if(!t.processedNodeManager.inOtherBuffer(e,t)&&!t.addedSet.has(e)&&!t.movedSet.has(e)){if(t.mirror.hasNode(e)){if((0,c.WU)(e,t.mirror))return;t.movedSet.add(e);var r=null;n&&t.mirror.hasNode(n)&&(r=t.mirror.getId(n)),r&&-1!==r&&(t.movedMap[p(t.mirror.getId(e),r)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);(0,c.IT)(e,t.blockClass,t.blockSelector,!1)||(e.childNodes.forEach((function(e){return t.genAdds(e)})),(0,c.He)(e)&&e.shadowRoot.childNodes.forEach((function(n){t.processedNodeManager.add(n,t),t.genAdds(n,e)})))}}}return(0,i.Z)(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function m(e,t){e.delete(t),t.childNodes.forEach((function(t){return m(e,t)}))}function g(e,t,n){return 0!==e.length&&y(e,t,n)}function y(e,t,n){var r=t.parentNode;if(!r)return!1;var i=n.getId(r);return!!e.some((function(e){return e.id===i}))||y(e,r,n)}function b(e,t){return 0!==e.size&&w(e,t)}function w(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||w(e,n))}function k(e){f=e}function E(){f=void 0}var S=function(e){if(!f)return e;return function(){try{return e.apply(void 0,arguments)}catch(t){if(f&&!0===f(t))return;throw t}}},x=[];function I(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(Q){}return e&&e.target}function C(e,t){var n,r,i=new v;x.push(i),i.init(e);var o=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(o=window[a]);var s=new o(S(i.processMutations.bind(i)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function T(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.sampling;if(!1===s.mouseInteraction)return function(){};var u=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,d=[],f=null;return Object.keys(l.Y2).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==u[e]})).forEach((function(e){var s=(0,a.UR)(e),u=function(e){return function(n){var a=I(n);if(!(0,c.IT)(a,i,o,!0)){var s=null,u=e;if("pointerType"in n){switch(n.pointerType){case"mouse":s=l.Et.Mouse;break;case"touch":s=l.Et.Touch;break;case"pen":s=l.Et.Pen}s===l.Et.Touch?l.Y2[e]===l.Y2.MouseDown?u="TouchStart":l.Y2[e]===l.Y2.MouseUp&&(u="TouchEnd"):l.Et.Pen}else(0,c.xO)(n)&&(s=l.Et.Touch);null!==s?(f=s,(u.startsWith("Touch")&&s===l.Et.Touch||u.startsWith("Mouse")&&s===l.Et.Mouse)&&(s=null)):l.Y2[e]===l.Y2.Click&&(s=f,f=null);var d=(0,c.xO)(n)?n.changedTouches[0]:n;if(d){var h=r.getId(a),p=d.clientX,v=d.clientY;S(t)(Object.assign({type:l.Y2[u],id:h,x:p,y:v},null!==s&&{pointerType:s}))}}}}(e);if(window.PointerEvent)switch(l.Y2[e]){case l.Y2.MouseDown:case l.Y2.MouseUp:s=s.replace("mouse","pointer");break;case l.Y2.TouchStart:case l.Y2.TouchEnd:return}d.push((0,c.on)(s,u,n))})),S((function(){d.forEach((function(e){return e()}))}))}function M(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling,s=S((0,c.P2)(S((function(e){var a=I(e);if(a&&!(0,c.IT)(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var u=(0,c.$1)(n.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100));return(0,c.on)("scroll",s,n)}var N=["INPUT","TEXTAREA","SELECT"],A=new WeakMap;function _(e){return function(e,t){if(L("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||L("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||L("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||L("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function R(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function D(e,t){var n,r,i,o=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(t.host);var u="#document"===t.nodeName?null===(n=t.defaultView)||void 0===n?void 0:n.Document:null===(i=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===i?void 0:i.ShadowRoot,c=(null===u||void 0===u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null===u||void 0===u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&u&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null===(e=c.get)||void 0===e?void 0:e.call(this)},set:function(e){var t,n=null===(t=c.set)||void 0===t?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(r){}return n}}),S((function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):function(){}}function O(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.doc.defaultView;if(!i)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,f=e.fontCb,h=e.selectionCb,p=e.customElementCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),r.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),i.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),o.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),a.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),u.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),c.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),l.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),f.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),h.apply(void 0,arguments)},e.customElementCb=function(){t.customElement&&t.customElement.apply(t,arguments),p.apply(void 0,arguments)}}(e,n),e.recordDOM&&(t=C(e,e.doc));var o=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,a="number"===typeof n.mousemove?n.mousemove:50,s="number"===typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],d=(0,c.P2)(S((function(e){var n=Date.now()-o;t(u.map((function(e){return e.timeOffset-=n,e})),e),u=[],o=null})),s),f=S((0,c.P2)(S((function(e){var t=I(e),n=(0,c.xO)(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;o||(o=(0,c.zq)()),u.push({x:r,y:a,id:i.getId(t),timeOffset:(0,c.zq)()-o}),d("undefined"!==typeof DragEvent&&e instanceof DragEvent?l.yh.Drag:e instanceof MouseEvent?l.yh.MouseMove:l.yh.TouchMove)})),a,{trailing:!1})),h=[(0,c.on)("mousemove",f,r),(0,c.on)("touchmove",f,r),(0,c.on)("drag",f,r)];return S((function(){h.forEach((function(e){return e()}))}))}(e),d=T(e),f=M(e),h=function(e,t){var n=e.viewportResizeCb,r=t.win,i=-1,o=-1,a=S((0,c.P2)(S((function(){var e=(0,c.gp)(),t=(0,c.fM)();i===e&&o===t||(n({width:Number(t),height:Number(e)}),i=e,o=t)})),200));return(0,c.on)("resize",a,r)}(e,{win:i}),p=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.ignoreClass,l=e.ignoreSelector,d=e.maskInputOptions,f=e.maskInputFn,h=e.sampling,p=e.userTriggeredOnInput;function v(e){var t=I(e),r=e.isTrusted,u=t&&t.tagName;if(t&&"OPTION"===u&&(t=t.parentElement),t&&u&&!(N.indexOf(u)<0)&&!(0,c.IT)(t,i,o,!0)&&!(t.classList.contains(s)||l&&t.matches(l))){var h=t.value,v=!1,g=(0,a.kv)(t)||"";"radio"===g||"checkbox"===g?v=t.checked:(d[u.toLowerCase()]||d[g])&&(h=(0,a.wR)({element:t,maskInputOptions:d,tagName:u,type:g,value:h,maskInputFn:f})),m(t,p?{text:h,isChecked:v,userTriggered:r}:{text:h,isChecked:v});var y=t.name;"radio"===g&&y&&v&&n.querySelectorAll('input[type="radio"][name="'.concat(y,'"]')).forEach((function(e){if(e!==t){var n=e.value;m(e,p?{text:n,isChecked:!v,userTriggered:!1}:{text:n,isChecked:!v})}}))}}function m(e,n){var i=A.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){A.set(e,n);var o=r.getId(e);S(t)(Object.assign(Object.assign({},n),{id:o}))}}var g=("last"===h.input?["change"]:["input","change"]).map((function(e){return(0,c.on)(e,S(v),n)})),y=n.defaultView;if(!y)return function(){g.forEach((function(e){return e()}))};var b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,"value"),w=[[y.HTMLInputElement.prototype,"value"],[y.HTMLInputElement.prototype,"checked"],[y.HTMLSelectElement.prototype,"value"],[y.HTMLTextAreaElement.prototype,"value"],[y.HTMLSelectElement.prototype,"selectedIndex"],[y.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&g.push.apply(g,(0,u.Z)(w.map((function(e){return(0,c.yU)(e[0],e[1],{set:function(){S(v)({target:this,isTrusted:!1})}},!1,y)})))),S((function(){g.forEach((function(e){return e()}))}))}(e),v=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,a=e.doc,s=S((function(e){return(0,c.P2)(S((function(o){var a=I(o);if(a&&!(0,c.IT)(a,n,r,!0)){var s=a.currentTime,u=a.volume,l=a.muted,d=a.playbackRate,f=a.loop;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:l,playbackRate:d,loop:f})}})),o.media||500)})),u=[(0,c.on)("play",s(0),a),(0,c.on)("pause",s(1),a),(0,c.on)("seeked",s(2),a),(0,c.on)("volumechange",s(3),a),(0,c.on)("ratechange",s(4),a)];return S((function(){u.forEach((function(e){return e()}))}))}(e),m=function(){},g=function(){},y=function(){},b=function(){};e.recordDOM&&(m=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:S((function(e,t,o){var a=(0,s.Z)(o,2),u=a[0],c=a[1],l=R(t,r,i.styleMirror),d=l.id,f=l.styleId;return(d&&-1!==d||f&&-1!==f)&&n({id:d,styleId:f,adds:[{rule:u,index:c}]}),e.apply(t,o)}))});var c,l,d=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(d,{apply:S((function(e,t,o){var a=(0,s.Z)(o,1)[0],u=R(t,r,i.styleMirror),c=u.id,l=u.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,removes:[{index:a}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:S((function(e,t,o){var a=(0,s.Z)(o,1)[0],u=R(t,r,i.styleMirror),c=u.id,l=u.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,replace:a}),e.apply(t,o)}))})),o.CSSStyleSheet.prototype.replaceSync&&(l=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:S((function(e,t,o){var a=(0,s.Z)(o,1)[0],u=R(t,r,i.styleMirror),c=u.id,l=u.styleId;return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,replaceSync:a}),e.apply(t,o)}))}));var f={};Z("CSSGroupingRule")?f.CSSGroupingRule=o.CSSGroupingRule:(Z("CSSMediaRule")&&(f.CSSMediaRule=o.CSSMediaRule),Z("CSSConditionRule")&&(f.CSSConditionRule=o.CSSConditionRule),Z("CSSSupportsRule")&&(f.CSSSupportsRule=o.CSSSupportsRule));var h={};return Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),o=t[0],a=t[1];h[o]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(h[o].insertRule,{apply:S((function(e,t,o){var a=(0,s.Z)(o,2),c=a[0],l=a[1],d=R(t.parentStyleSheet,r,i.styleMirror),f=d.id,h=d.styleId;return(f&&-1!==f||h&&-1!==h)&&n({id:f,styleId:h,adds:[{rule:c,index:[].concat((0,u.Z)(_(t)),[l||0])}]}),e.apply(t,o)}))}),a.prototype.deleteRule=new Proxy(h[o].deleteRule,{apply:S((function(e,t,o){var a=(0,s.Z)(o,1)[0],c=R(t.parentStyleSheet,r,i.styleMirror),l=c.id,d=c.styleId;return(l&&-1!==l||d&&-1!==d)&&n({id:l,styleId:d,removes:[{index:[].concat((0,u.Z)(_(t)),[a])}]}),e.apply(t,o)}))})})),S((function(){o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=d,c&&(o.CSSStyleSheet.prototype.replace=c),l&&(o.CSSStyleSheet.prototype.replaceSync=l),Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),n=t[0],r=t[1];r.prototype.insertRule=h[n].insertRule,r.prototype.deleteRule=h[n].deleteRule}))}))}(e,{win:i}),g=D(e,e.doc),y=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,a=t.win,u=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(u,{apply:S((function(e,t,a){var c,l=(0,s.Z)(a,3),d=l[0],f=l[1],h=l[2];if(i.has(d))return u.apply(t,[d,f,h]);var p=R(null===(c=t.parentRule)||void 0===c?void 0:c.parentStyleSheet,r,o.styleMirror),v=p.id,m=p.styleId;return(v&&-1!==v||m&&-1!==m)&&n({id:v,styleId:m,set:{property:d,value:f,priority:h},index:_(t.parentRule)}),e.apply(t,a)}))});var c=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:S((function(e,t,a){var u,l=(0,s.Z)(a,1)[0];if(i.has(l))return c.apply(t,[l]);var d=R(null===(u=t.parentRule)||void 0===u?void 0:u.parentStyleSheet,r,o.styleMirror),f=d.id,h=d.styleId;return(f&&-1!==f||h&&-1!==h)&&n({id:f,styleId:h,remove:{property:l},index:_(t.parentRule)}),e.apply(t,a)}))}),S((function(){a.CSSStyleDeclaration.prototype.setProperty=u,a.CSSStyleDeclaration.prototype.removeProperty=c}))}(e,{win:i}),e.collectFonts&&(b=function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(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};var s=(0,c.r$)(n.fonts,"add",(function(e){return function(n){return setTimeout(S((function(){var e=o.get(n);e&&(t(e),o.delete(n))})),0),e.apply(this,[n])}}));return i.push((function(){r.FontFace=a})),i.push(s),S((function(){i.forEach((function(e){return e()}))}))}(e)));var w,k=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,a=!0,s=S((function(){var e=t.getSelection();if(!(!e||a&&(null===e||void 0===e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,l=0;l<u;l++){var d=e.getRangeAt(l),f=d.startContainer,h=d.startOffset,p=d.endContainer,v=d.endOffset;(0,c.IT)(f,r,i,!0)||(0,c.IT)(p,r,i,!0)||s.push({start:n.getId(f),startOffset:h,end:n.getId(p),endOffset:v})}o({ranges:s})}}));return s(),(0,c.on)("selectionchange",s)}(e),E=function(e){var t=e.doc,n=e.customElementCb,r=t.defaultView;return r&&r.customElements?(0,c.r$)(r.customElements,"define",(function(e){return function(t,r,i){try{n({define:{name:t}})}catch(o){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,r,i])}})):function(){}}(e),O=[],L=(0,r.Z)(e.plugins);try{for(L.s();!(w=L.n()).done;){var F=w.value;O.push(F.observer(F.callback,i,F.options))}}catch(P){L.e(P)}finally{L.f()}return S((function(){x.forEach((function(e){return e.reset()})),null===t||void 0===t||t.disconnect(),o(),d(),f(),h(),p(),v(),m(),g(),y(),b(),k(),E(),O.forEach((function(e){return e()}))}))}function L(e){return"undefined"!==typeof window[e]}function Z(e){return Boolean("undefined"!==typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var F=function(){function e(t){(0,o.Z)(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return(0,i.Z)(e,[{key:"getId",value:function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}},{key:"getIds",value:function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,r,i)}))}},{key:"getRemoteId",value:function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!==typeof t)return t;var i=r.get(t);return i||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,r)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),P=function(){function e(t){(0,o.Z)(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new F(a.Bu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new F(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return(0,i.Z)(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case l.tw.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:l.tw.IncrementalSnapshot,data:{source:l.yh.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case l.tw.Meta:case l.tw.Load:case l.tw.DomContentLoaded:return!1;case l.tw.Plugin:return t;case l.tw.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case l.tw.IncrementalSnapshot:switch(t.data.source){case l.yh.Mutation:return t.data.adds.forEach((function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((function(t){r.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){r.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.Drag:case l.yh.TouchMove:case l.yh.MouseMove:return t.data.positions.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.ViewportResize:return!1;case l.yh.MediaInteraction:case l.yh.MouseInteraction:case l.yh.Scroll:case l.yh.CanvasMutation:case l.yh.Input:return this.replaceIds(t.data,e,["id"]),t;case l.yh.StyleSheetRule:case l.yh.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case l.yh.Font:return t;case l.yh.Selection:return t.data.ranges.forEach((function(t){r.replaceIds(t,e,["start","end"])})),t;case l.yh.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((function(t){r.replaceStyleIds(t,e,["styleId"])})),t}}return!1}},{key:"replace",value:function(e,t,n,i){var o,a=(0,r.Z)(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;(Array.isArray(t[s])||"number"===typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]))}}catch(u){a.e(u)}finally{a.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===a.Jq.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((function(e){n.patchRootIdOnNode(e,t)}))}}]),e}(),B=function(){function e(t){(0,o.Z)(this,e),this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return(0,i.Z)(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if((0,a.DS)(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=C(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((function(){return r.disconnect()})),this.restoreHandlers.push(M(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),n.restoreHandlers.push(D({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))}),0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push((0,c.r$)(e.prototype,"attachShadow",(function(e){return function(r){var i=e.call(this,r);return this.shadowRoot&&(0,c._f)(this)&&n.addShadowRoot(this.shadowRoot,t),i}})))}},{key:"reset",value:function(){this.restoreHandlers.forEach((function(e){try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}(),V=n(4165),j=n(3246),H=n(3464),U=new Map;var W=function(e,t,n){if(e&&(z(e,t)||"object"===typeof e)){var r=function(e,t){var n=U.get(e);return n||(n=new Map,U.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function q(e,t,n){if(e instanceof Array)return e.map((function(e){return q(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:(0,H.c)(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[q(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[q(e.data,t,n),e.width,e.height]}:z(e,t)||"object"===typeof e?{rr_type:e.constructor.name,index:W(e,t,n)}:e}var G=function(e,t,n){return e.map((function(e){return q(e,t,n)}))},z=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"===typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function $(e,t,n,r){var i=[];try{var o=(0,c.r$)(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(!(0,c.IT)(this,t,n,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&"object"===typeof a[0]){var l=a[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i].concat(a))}}));i.push(o)}catch(Q){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){i.forEach((function(e){return e()}))}}function Y(e,t,n,i,o,a,s){var u,l=[],d=Object.getOwnPropertyNames(e),f=(0,r.Z)(d);try{var h=function(){var r=u.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(r))return 0;try{if("function"!==typeof e[r])return 0;var a=(0,c.r$)(e,r,(function(e){return function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var d=e.apply(this,u);if(W(d,s,this),"tagName"in this.canvas&&!(0,c.IT)(this.canvas,i,o,!0)){var f=G(u,s,this),h={type:t,property:r,args:f};n(this.canvas,h)}return d}}));l.push(a)}catch(Q){var d=(0,c.yU)(e,r,{set:function(e){n(this.canvas,{type:t,property:r,args:[e],setter:!0})}});l.push(d)}};for(f.s();!(u=f.n()).done;)h()}catch(p){f.e(p)}finally{f.f()}return l}var Q,X,K,J,ee=function(e,t){var n;return function(r){return n=n||function(e,t){var n=function(e,t){var n=void 0===t?null:t,r=e.toString().split("\n");r.pop(),r.shift();for(var i=r[0].search(/\S/),o=/(['"])__worker_loader_strict__(['"])/g,a=0,s=r.length;a<s;++a)r[a]=r[a].substring(i).replace(o,"$1use strict$2")+"\n";return n&&r.push("//# sourceMappingURL="+n+"\n"),r}(e,t),r=new Blob(n,{type:"application/javascript"});return URL.createObjectURL(r)}(e,t),new Worker(n,r)}}((function(){!function(){function e(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="undefined"===typeof Uint8Array?[]:new Uint8Array(256),r=0;r<64;r++)n[t.charCodeAt(r)]=r;var i=function(e){var n,r=new Uint8Array(e),i=r.length,o="";for(n=0;n<i;n+=3)o+=t[r[n]>>2],o+=t[(3&r[n])<<4|r[n+1]>>4],o+=t[(15&r[n+1])<<2|r[n+2]>>6],o+=t[63&r[n+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},o=new Map,a=new Map;function s(t,n,r){return e(this,void 0,void 0,(0,V.Z)().mark((function e(){var o,s,u,c,l;return(0,V.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o="".concat(t,"-").concat(n),!("OffscreenCanvas"in globalThis)){e.next=17;break}if(!a.has(o)){e.next=4;break}return e.abrupt("return",a.get(o));case 4:return(s=new OffscreenCanvas(t,n)).getContext("2d"),e.next=8,s.convertToBlob(r);case 8:return u=e.sent,e.next=11,u.arrayBuffer();case 11:return c=e.sent,l=i(c),a.set(o,l),e.abrupt("return",l);case 17:return e.abrupt("return","");case 18:case"end":return e.stop()}}),e)})))}var u=self;u.onmessage=function(t){return e(this,void 0,void 0,(0,V.Z)().mark((function e(){var n,r,a,c,l,d,f,h,p,v,m,g;return(0,V.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("OffscreenCanvas"in globalThis)){e.next=31;break}return n=t.data,r=n.id,a=n.bitmap,c=n.width,l=n.height,d=n.dataURLOptions,f=s(c,l,d),h=new OffscreenCanvas(c,l),h.getContext("2d").drawImage(a,0,0),a.close(),e.next=9,h.convertToBlob(d);case 9:return p=e.sent,v=p.type,e.next=13,p.arrayBuffer();case 13:if(m=e.sent,g=i(m),e.t0=!o.has(r),!e.t0){e.next=22;break}return e.next=19,f;case 19:e.t1=e.sent,e.t2=g,e.t0=e.t1===e.t2;case 22:if(!e.t0){e.next=25;break}return o.set(r,g),e.abrupt("return",u.postMessage({id:r}));case 25:if(o.get(r)!==g){e.next=27;break}return e.abrupt("return",u.postMessage({id:r}));case 27:u.postMessage({id:r,type:v,base64:g,width:c,height:l}),o.set(r,g),e.next=32;break;case 31:return e.abrupt("return",u.postMessage({id:t.data.id}));case 32:case"end":return e.stop()}}),e)})))}}()}),null),te=function(){function e(t){var n=this;(0,o.Z)(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId)&&n.rafStamps.invokeId||(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var r=t.sampling,i=void 0===r?"all":r,a=t.win,s=t.blockClass,u=t.blockSelector,c=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&"all"===i&&this.initCanvasMutationObserver(a,s,u),c&&"number"===typeof i&&this.initCanvasFPSObserver(i,a,s,u,{dataURLOptions:l})}return(0,i.Z)(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,r,i){var o=this,a=$(t,n,r,!0),s=new Map,u=new ee;u.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,a=n.width,u=n.height;o.mutationCb({id:t,type:l.FX["2D"],commands:[{property:"clearRect",args:[0,0,a,u]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var d,f=1e3/e,h=0;d=requestAnimationFrame((function e(a){h&&a-h<f||(h=a,function(){var e=[];return t.document.querySelectorAll("canvas").forEach((function(t){(0,c.IT)(t,n,r,!0)||e.push(t)})),e}().forEach((function(e){return(0,j.m)(o,void 0,void 0,(0,V.Z)().mark((function t(){var n,r,o,a;return(0,V.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.mirror.getId(e),!s.get(r)){t.next=3;break}return t.abrupt("return");case 3:if(0!==e.width&&0!==e.height){t.next=5;break}return t.abrupt("return");case 5:return s.set(r,!0),["webgl","webgl2"].includes(e.__context)&&(o=e.getContext(e.__context),!1===(null===(n=null===o||void 0===o?void 0:o.getContextAttributes())||void 0===n?void 0:n.preserveDrawingBuffer)&&o.clear(o.COLOR_BUFFER_BIT)),t.next=9,createImageBitmap(e);case 9:a=t.sent,u.postMessage({id:r,bitmap:a,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[a]);case 11:case"end":return t.stop()}}),t,this)})))}))),d=requestAnimationFrame(e)})),this.resetObservers=function(){a(),cancelAnimationFrame(d)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var i=$(e,t,n,!1),o=function(e,t,n,i){var o,a=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=(0,r.Z)(s);try{var d=function(){var r=o.value;try{if("function"!==typeof t.CanvasRenderingContext2D.prototype[r])return 1;var s=(0,c.r$)(t.CanvasRenderingContext2D.prototype,r,(function(o){return function(){for(var a=this,s=arguments.length,u=new Array(s),d=0;d<s;d++)u[d]=arguments[d];return(0,c.IT)(this.canvas,n,i,!0)||setTimeout((function(){var n=G(u,t,a);e(a.canvas,{type:l.FX["2D"],property:r,args:n})}),0),o.apply(this,u)}}));a.push(s)}catch(Q){var u=(0,c.yU)(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e(this.canvas,{type:l.FX["2D"],property:r,args:[t],setter:!0})}});a.push(u)}};for(u.s();!(o=u.n()).done;)d()}catch(f){u.e(f)}finally{u.f()}return function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),a=function(e,t,n,r,i){var o=[];return o.push.apply(o,(0,u.Z)(Y(t.WebGLRenderingContext.prototype,l.FX.WebGL,e,n,r,0,t))),"undefined"!==typeof t.WebGL2RenderingContext&&o.push.apply(o,(0,u.Z)(Y(t.WebGL2RenderingContext.prototype,l.FX.WebGL2,e,n,r,0,t))),function(){o.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){i(),o(),a()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){return(0,j._)(e,["type"])})),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),ne=function(){function e(t){(0,o.Z)(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new c.ug,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return(0,i.Z)(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,i={id:t,styleIds:[]},o=[],s=(0,r.Z)(e);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=void 0;this.styleMirror.has(u)?c=this.styleMirror.getId(u):(c=this.styleMirror.add(u),o.push({styleId:c,rules:Array.from(u.rules||CSSRule,(function(e,t){return{rule:(0,a.MK)(e),index:t}}))})),i.styleIds.push(c)}}catch(l){s.e(l)}finally{s.f()}o.length>0&&(i.styles=o),this.adoptedStyleSheetCb(i)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),re=function(){function e(){(0,o.Z)(this,e),this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}return(0,i.Z)(e,[{key:"periodicallyClear",value:function(){var e=this;requestAnimationFrame((function(){e.clear(),e.loop&&e.periodicallyClear()}))}},{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some((function(e){return e!==t}))}},{key:"add",value:function(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"clear",value:function(){this.nodeMap=new WeakMap}},{key:"destroy",value:function(){this.loop=!1}}]),e}(),ie=!1;try{if(2!==Array.from([1],(function(e){return 2*e}))[0]){var oe=document.createElement("iframe");document.body.appendChild(oe),Array.from=(null===(Q=oe.contentWindow)||void 0===Q?void 0:Q.Array.from)||Array.from,document.body.removeChild(oe)}}catch(pe){console.debug("Unable to override Array.from",pe)}var ae=(0,a.bZ)();function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,i=e.checkoutEveryNth,o=e.blockClass,s=void 0===o?"rr-block":o,u=e.blockSelector,d=void 0===u?null:u,f=e.ignoreClass,h=void 0===f?"rr-ignore":f,p=e.ignoreSelector,v=void 0===p?null:p,m=e.maskTextClass,g=void 0===m?"rr-mask":m,y=e.maskTextSelector,b=void 0===y?null:y,w=e.inlineStylesheet,I=void 0===w||w,C=e.maskAllInputs,T=e.maskInputOptions,M=e.slimDOMOptions,N=e.maskInputFn,A=e.maskTextFn,_=e.hooks,R=e.packFn,D=e.sampling,L=void 0===D?{}:D,Z=e.dataURLOptions,F=void 0===Z?{}:Z,V=e.mousemoveWait,j=e.recordDOM,H=void 0===j||j,U=e.recordCanvas,W=void 0!==U&&U,q=e.recordCrossOriginIframes,G=void 0!==q&&q,z=e.recordAfter,$=void 0===z?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":z,Y=e.userTriggeredOnInput,Q=void 0!==Y&&Y,ee=e.collectFonts,oe=void 0!==ee&&ee,se=e.inlineImages,ue=void 0!==se&&se,ce=e.plugins,le=e.keepIframeSrcFn,de=void 0===le?function(){return!1}:le,fe=e.ignoreCSSAttributes,he=void 0===fe?new Set([]):fe;k(e.errorHandler);var ve=!G||window.parent===window,me=!1;if(!ve)try{window.parent.document&&(me=!1)}catch(Le){me=!0}if(ve&&!t)throw new Error("emit function is required");void 0!==V&&void 0===L.mousemove&&(L.mousemove=V),ae.reset();var ge,ye=!0===C?{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!==T?T:{password:!0},be=!0===M||"all"===M?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===M,headMetaDescKeywords:"all"===M}:M||{};(0,c.OK)();var we=0,ke=function(e){var t,n=(0,r.Z)(ce||[]);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.eventProcessor&&(e=i.eventProcessor(e))}}catch(pe){n.e(pe)}finally{n.f()}return R&&!me&&(e=R(e)),e};X=function(e,r){var o,a=e;if(a.timestamp=(0,c.zq)(),!(null===(o=x[0])||void 0===o?void 0:o.isFrozen())||a.type===l.tw.FullSnapshot||a.type===l.tw.IncrementalSnapshot&&a.data.source===l.yh.Mutation||x.forEach((function(e){return e.unfreeze()})),ve)null===t||void 0===t||t(ke(a),r);else if(me){var s={type:"rrweb",event:ke(a),origin:window.location.origin,isCheckout:r};window.parent.postMessage(s,"*")}if(a.type===l.tw.FullSnapshot)ge=a,we=0;else if(a.type===l.tw.IncrementalSnapshot){if(a.data.source===l.yh.Mutation&&a.data.isAttachIframe)return;we++;var u=i&&we>=i,d=n&&a.timestamp-ge.timestamp>n;(u||d)&&K(!0)}};var Ee,Se=function(e){X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Mutation},e)})},xe=function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Scroll},e)})},Ie=function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.CanvasMutation},e)})},Ce=new ne({mutationCb:Se,adoptedStyleSheetCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.AdoptedStyleSheet},e)})}}),Te=new P({mirror:ae,mutationCb:Se,stylesheetManager:Ce,recordCrossOriginIframes:G,wrappedEmit:X}),Me=(0,r.Z)(ce||[]);try{for(Me.s();!(Ee=Me.n()).done;){var Ne=Ee.value;Ne.getMirror&&Ne.getMirror({nodeMirror:ae,crossOriginIframeMirror:Te.crossOriginIframeMirror,crossOriginIframeStyleMirror:Te.crossOriginIframeStyleMirror})}}catch(pe){Me.e(pe)}finally{Me.f()}var Ae=new re;J=new te({recordCanvas:W,mutationCb:Ie,win:window,blockClass:s,blockSelector:d,mirror:ae,sampling:L.canvas,dataURLOptions:F});var _e=new B({mutationCb:Se,scrollCb:xe,bypassOptions:{blockClass:s,blockSelector:d,maskTextClass:g,maskTextSelector:b,inlineStylesheet:I,maskInputOptions:ye,dataURLOptions:F,maskTextFn:A,maskInputFn:N,recordCanvas:W,inlineImages:ue,sampling:L,slimDOMOptions:be,iframeManager:Te,stylesheetManager:Ce,canvasManager:J,keepIframeSrcFn:de,processedNodeManager:Ae},mirror:ae});K=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(H){X({type:l.tw.Meta,data:{href:window.location.href,width:(0,c.fM)(),height:(0,c.gp)()}},e),Ce.reset(),_e.init(),x.forEach((function(e){return e.lock()}));var t=(0,a.CO)(document,{mirror:ae,blockClass:s,blockSelector:d,maskTextClass:g,maskTextSelector:b,inlineStylesheet:I,maskAllInputs:ye,maskTextFn:A,slimDOM:be,dataURLOptions:F,recordCanvas:W,inlineImages:ue,onSerialize:function(e){(0,c.Cj)(e,ae)&&Te.addIframe(e),(0,c.qs)(e,ae)&&Ce.trackLinkElement(e),(0,c.He)(e)&&_e.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){Te.attachIframe(e,t),_e.observeAttachShadow(e)},onStylesheetLoad:function(e,t){Ce.attachLinkElement(e,t)},keepIframeSrcFn:de});if(!t)return console.warn("Failed to snapshot the document");X({type:l.tw.FullSnapshot,data:{node:t,initialOffset:(0,c.$1)(window)}},e),x.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,ae.getId(document))}};try{var Re=[],De=function(e){var t;return S(O)({mutationCb:Se,mousemoveCb:function(e,t){return X({type:l.tw.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MouseInteraction},e)})},scrollCb:xe,viewportResizeCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.ViewportResize},e)})},inputCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Input},e)})},mediaInteractionCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MediaInteraction},e)})},styleSheetRuleCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleSheetRule},e)})},styleDeclarationCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleDeclaration},e)})},canvasMutationCb:Ie,fontCb:function(e){return X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Font},e)})},selectionCb:function(e){X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Selection},e)})},customElementCb:function(e){X({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.CustomElement},e)})},blockClass:s,ignoreClass:h,ignoreSelector:v,maskTextClass:g,maskTextSelector:b,maskInputOptions:ye,inlineStylesheet:I,sampling:L,recordDOM:H,recordCanvas:W,inlineImages:ue,userTriggeredOnInput:Q,collectFonts:oe,doc:e,maskInputFn:N,maskTextFn:A,keepIframeSrcFn:de,blockSelector:d,slimDOMOptions:be,dataURLOptions:F,mirror:ae,iframeManager:Te,stylesheetManager:Ce,shadowDomManager:_e,processedNodeManager:Ae,canvasManager:J,ignoreCSSAttributes:he,plugins:(null===(t=null===ce||void 0===ce?void 0:ce.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return X({type:l.tw.Plugin,data:{plugin:e.name,payload:t}})}}})))||[]},_)};Te.addLoadListener((function(e){try{Re.push(De(e.contentDocument))}catch(t){console.warn(t)}}));var Oe=function(){K(),Re.push(De(document)),ie=!0};return"interactive"===document.readyState||"complete"===document.readyState?Oe():(Re.push((0,c.on)("DOMContentLoaded",(function(){X({type:l.tw.DomContentLoaded,data:{}}),"DOMContentLoaded"===$&&Oe()}))),Re.push((0,c.on)("load",(function(){X({type:l.tw.Load,data:{}}),"load"===$&&Oe()}),window))),function(){Re.forEach((function(e){return e()})),Ae.destroy(),ie=!1,E()}}catch(Ze){console.warn(Ze)}}se.addCustomEvent=function(e,t){if(!ie)throw new Error("please add custom event after start recording");X({type:l.tw.Custom,data:{tag:e,payload:t}})},se.freezePage=function(){x.forEach((function(e){return e.freeze()}))},se.takeFullSnapshot=function(e){if(!ie)throw new Error("please take full snapshot after start recording");K(e)},se.mirror=ae;var ue=function(e){var t=function(t){try{if((i=t.target)&&(i instanceof HTMLInputElement&&/|text|email|number|password|search|tel|url/.test(i.type||"")||i instanceof HTMLTextAreaElement)&&!i.disabled&&!i.readOnly)return;n=function(e){return(e.ctrlKey?"ctrl ":"")+(e.altKey?"alt ":"")+(e.shiftKey?"shift ":"")+(e.metaKey?"meta ":"")+e.key}(t),r=t.target,e({key:n,eventTarget:r})}catch(o){}var n,r,i};window.addEventListener("keyup",(function(e){t(e)}))},ce=n(4228),le=n(458),de=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;(0,o.Z)(this,e),this.target=n,this.onEvent=r,this.observer=void 0,this.monitoredTextElements=[],this.inputEnabledSelectors=["[contenteditable=true]"].join(","),this.iframeObservers=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){var n;t.onEvent({text:null===(n=e.target)||void 0===n?void 0:n.innerText,eventTarget:e.target})}))}}return(0,i.Z)(e,[{key:"startObserver",value:function(){var e=this;this.startIframesObserver(),this.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.querySelector){var n=t.querySelector("iframe");n&&console.log("FFF",n)}if(t.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE){var r=t;r.matches(e.inputEnabledSelectors)||r.isContentEditable?e.monitorInputEnabledElement(r):Array.from((0,le.RA)("*",r)).filter((function(t){return t.matches&&t.matches(e.inputEnabledSelectors)||t.isContentEditable})).forEach(e.monitorInputEnabledElement)}}))}))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.startInputMonitoring()}},{key:"startIframesObserver",value:function(){var t=this;setInterval((function(){(0,le.RA)("iframe",t.target).forEach((function(n){if(!t.iframeObservers.find((function(e){return e.iframe===n}))){var r=new e(n.contentWindow.document,t.onEvent);t.iframeObservers.push({iframe:n,observer:r}),r.startObserver()}}))}),500)}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=(0,le.RA)(this.inputEnabledSelectors,this.target),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}}]),e}(),fe=function(){function e(t){var n=this;(0,o.Z)(this,e),this.onEvent=t,this.currentURL=void 0,this.onURLChange=function(){setTimeout((function(){var e=window.location.href;if(e!==n.currentURL){n.currentURL=e;try{n.onEvent({url:e})}catch(t){}}}))}}return(0,i.Z)(e,[{key:"start",value:function(){var e=this;window.addEventListener("popstate",(function(t){e.onURLChange()})),window.addEventListener("locationchange",(function(t){e.onURLChange()})),window.addEventListener("hashchange",(function(t){e.onURLChange()}));var t=window.history.pushState;window.history.pushState=function(){e.onURLChange();for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.apply(window.history,r)};var n=window.history.replaceState;window.history.replaceState=function(){e.onURLChange();for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return n.apply(window.history,r)}}}]),e}(),he=(0,i.Z)((function e(t){var n=this;(0,o.Z)(this,e),this.contentEditableObserver=void 0,this.urlObserver=void 0,this.logNativeMutationObserver=!1,this.stopRRWebRecording=function(){},this.eventHandler=void 0,this.currentURL=void 0,this.start=function(){n.stopRRWebRecording=se({emit:n.eventHandler,sampling:{mousemove:!1},userTriggeredOnInput:!0}),n.logNativeMutationObserver&&n.selfObserve(),n.startURLObserver(),n.startKeyboardObserver(),n.startContentEditableObserver()},this.stop=function(){n.stopRRWebRecording()},this.startURLObserver=function(){n.urlObserver=new fe((function(e){var t={url:e.url};n.addCustomEvent(ce.N.URLChange,t)})),n.urlObserver.start()},this.startContentEditableObserver=function(){n.contentEditableObserver=new de(document,(function(e){var t,r=e.text,i=e.eventTarget,o={text:r,id:null===(t=n.tryGetMetaFromEventTarget(i))||void 0===t?void 0:t.id};n.addCustomEvent(ce.N.ContentEditableInput,o)})),n.contentEditableObserver.startObserver()},this.startKeyboardObserver=function(){ue((function(e){var t,r=e.key,i=e.eventTarget,o={key:r,id:null===(t=n.tryGetMetaFromEventTarget(i))||void 0===t?void 0:t.id};n.addCustomEvent(ce.N.KeyStroke,o)}))},this.addCustomEvent=function(e,t){se.addCustomEvent(e,t)},this.tryGetMetaFromEventTarget=function(e){try{return n.getMeta(e)}catch(t){}},this.selfObserve=function(){var e=document.getElementsByTagName("body");new MutationObserver((function(e,t){var n,i=(0,r.Z)(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;"childList"===o.type?console.log("A child node has been added or removed.",o):"attributes"===o.type&&console.log("The ".concat(o.attributeName," attribute was modified."),o)}}catch(pe){i.e(pe)}finally{i.f()}})).observe(e[0],{attributes:!0,childList:!0,subtree:!0})},this.getNodeById=function(e){return se.mirror.getNode(e)},this.getMeta=function(e){return se.mirror.getMeta(e)},this.eventHandler=t,this.currentURL=window.location.href}))},4228:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});var r=function(e){return e.KeyStroke="key-stroke",e.ContentEditableInput="contenteditable-input",e.URLChange="url-change",e}({})},6301:function(e){e.exports=function(e){return new Promise((function(t){return setTimeout(t,e)}))}},763:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,d=128,f=256,h=1/0,p=9007199254740991,v=NaN,m=4294967295,g=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",f]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",k="[object Date]",E="[object Error]",S="[object Function]",x="[object GeneratorFunction]",I="[object Map]",C="[object Number]",T="[object Object]",M="[object Promise]",N="[object RegExp]",A="[object Set]",_="[object String]",R="[object Symbol]",D="[object WeakMap]",O="[object ArrayBuffer]",L="[object DataView]",Z="[object Float32Array]",F="[object Float64Array]",P="[object Int8Array]",B="[object Int16Array]",V="[object Int32Array]",j="[object Uint8Array]",H="[object Uint8ClampedArray]",U="[object Uint16Array]",W="[object Uint32Array]",q=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,Q=RegExp($.source),X=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,ke=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ee=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",Ie="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Te="a-z\\xdf-\\xf6\\xf8-\\xff",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",Ne="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_e="['\u2019]",Re="["+xe+"]",De="["+Ae+"]",Oe="["+Ie+"]",Le="\\d+",Ze="["+Ce+"]",Fe="["+Te+"]",Pe="[^"+xe+Ae+Le+Ce+Te+Me+"]",Be="\\ud83c[\\udffb-\\udfff]",Ve="[^"+xe+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Me+"]",We="\\u200d",qe="(?:"+Fe+"|"+Pe+")",Ge="(?:"+Ue+"|"+Pe+")",ze="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",$e="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Oe+"|"+Be+")"+"?",Qe="["+Ne+"]?",Xe=Qe+Ye+("(?:"+We+"(?:"+[Ve,je,He].join("|")+")"+Qe+Ye+")*"),Ke="(?:"+[Ze,je,He].join("|")+")"+Xe,Je="(?:"+[Ve+Oe+"?",Oe,je,He,Re].join("|")+")",et=RegExp(_e,"g"),tt=RegExp(Oe,"g"),nt=RegExp(Be+"(?="+Be+")|"+Je+Xe,"g"),rt=RegExp([Ue+"?"+Fe+"+"+ze+"(?="+[De,Ue,"$"].join("|")+")",Ge+"+"+$e+"(?="+[De,Ue+qe,"$"].join("|")+")",Ue+"?"+qe+"+"+ze,Ue+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ke].join("|"),"g"),it=RegExp("["+We+xe+Ie+Ne+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,ut={};ut[Z]=ut[F]=ut[P]=ut[B]=ut[V]=ut[j]=ut[H]=ut[U]=ut[W]=!0,ut[y]=ut[b]=ut[O]=ut[w]=ut[L]=ut[k]=ut[E]=ut[S]=ut[I]=ut[C]=ut[T]=ut[N]=ut[A]=ut[_]=ut[D]=!1;var ct={};ct[y]=ct[b]=ct[O]=ct[L]=ct[w]=ct[k]=ct[Z]=ct[F]=ct[P]=ct[B]=ct[V]=ct[I]=ct[C]=ct[T]=ct[N]=ct[A]=ct[_]=ct[R]=ct[j]=ct[H]=ct[U]=ct[W]=!0,ct[E]=ct[S]=ct[D]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,vt=ht||pt||Function("return this")(),mt=t&&!t.nodeType&&t,gt=mt&&e&&!e.nodeType&&e,yt=gt&&gt.exports===mt,bt=yt&&ht.process,wt=function(){try{var e=gt&&gt.require&&gt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),kt=wt&&wt.isArrayBuffer,Et=wt&&wt.isDate,St=wt&&wt.isMap,xt=wt&&wt.isRegExp,It=wt&&wt.isSet,Ct=wt&&wt.isTypedArray;function Tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Mt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Nt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Dt(e,t){return!!(null==e?0:e.length)&&Ut(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Lt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Zt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Pt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Vt=zt("length");function jt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ht(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ut(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ht(e,qt,n)}function Wt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function qt(e){return e!==e}function Gt(e,t){var n=null==e?0:e.length;return n?Qt(e,t)/n:v}function zt(e){return function(t){return null==t?i:t[e]}}function $t(e){return function(t){return null==e?i:e[t]}}function Yt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Qt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Kt(e){return e?e.slice(0,mn(e)+1).replace(ae,""):e}function Jt(e){return function(t){return e(t)}}function en(e,t){return Lt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Ut(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var on=$t({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=$t({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+lt[e]}function un(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return un(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):Vt(e)}function vn(e){return un(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function mn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var gn=$t({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yn=function e(t){var n=(t=null==t?vt:yn.defaults(vt.Object(),t,yn.pick(vt,at))).Array,r=t.Date,se=t.Error,xe=t.Function,Ie=t.Math,Ce=t.Object,Te=t.RegExp,Me=t.String,Ne=t.TypeError,Ae=n.prototype,_e=xe.prototype,Re=Ce.prototype,De=t["__core-js_shared__"],Oe=_e.toString,Le=Re.hasOwnProperty,Ze=0,Fe=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pe=Re.toString,Be=Oe.call(Ce),Ve=vt._,je=Te("^"+Oe.call(Le).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=yt?t.Buffer:i,Ue=t.Symbol,We=t.Uint8Array,qe=He?He.allocUnsafe:i,Ge=ln(Ce.getPrototypeOf,Ce),ze=Ce.create,$e=Re.propertyIsEnumerable,Ye=Ae.splice,Qe=Ue?Ue.isConcatSpreadable:i,Xe=Ue?Ue.iterator:i,Ke=Ue?Ue.toStringTag:i,Je=function(){try{var e=fo(Ce,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,it=r&&r.now!==vt.Date.now&&r.now,lt=t.setTimeout!==vt.setTimeout&&t.setTimeout,ht=Ie.ceil,pt=Ie.floor,mt=Ce.getOwnPropertySymbols,gt=He?He.isBuffer:i,bt=t.isFinite,wt=Ae.join,Vt=ln(Ce.keys,Ce),$t=Ie.max,bn=Ie.min,wn=r.now,kn=t.parseInt,En=Ie.random,Sn=Ae.reverse,xn=fo(t,"DataView"),In=fo(t,"Map"),Cn=fo(t,"Promise"),Tn=fo(t,"Set"),Mn=fo(t,"WeakMap"),Nn=fo(Ce,"create"),An=Mn&&new Mn,_n={},Rn=Po(xn),Dn=Po(In),On=Po(Cn),Ln=Po(Tn),Zn=Po(Mn),Fn=Ue?Ue.prototype:i,Pn=Fn?Fn.valueOf:i,Bn=Fn?Fn.toString:i;function Vn(e){if(ts(e)&&!Wa(e)&&!(e instanceof Wn)){if(e instanceof Un)return e;if(Le.call(e,"__wrapped__"))return Bo(e)}return new Un(e)}var jn=function(){function e(){}return function(t){if(!es(t))return{};if(ze)return ze(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Hn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new zn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Qn(e,t){var n=Wa(e),r=!n&&Ua(e),i=!n&&!r&&$a(e),o=!n&&!r&&!i&&cs(e),a=n||r||i||o,s=a?Xt(e.length,Me):[],u=s.length;for(var c in e)!t&&!Le.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||s.push(c);return s}function Xn(e){var t=e.length;return t?e[$r(0,t-1)]:i}function Kn(e,t){return Lo(Ni(e),sr(t,0,e.length))}function Jn(e){return Lo(Ni(e))}function er(e,t,n){(n!==i&&!Va(e[t],n)||n===i&&!(t in e))&&or(e,t,n)}function tr(e,t,n){var r=e[t];Le.call(e,t)&&Va(r,n)&&(n!==i||t in e)||or(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(Va(e[n][0],t))return n;return-1}function rr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ir(e,t){return e&&Ai(t,_s(t),e)}function or(e,t,n){"__proto__"==t&&Je?Je(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:Cs(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ur(e,t,n,r,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!es(e))return e;var d=Wa(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Le.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Ni(e,s)}else{var f=vo(e),h=f==S||f==x;if($a(e))return Si(e,u);if(f==T||f==y||h&&!o){if(s=c||h?{}:go(e),!u)return c?function(e,t){return Ai(e,po(e),t)}(e,function(e,t){return e&&Ai(t,Rs(t),e)}(s,e)):function(e,t){return Ai(e,ho(e),t)}(e,ir(s,e))}else{if(!ct[f])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case O:return xi(e);case w:case k:return new r(+e);case L:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case Z:case F:case P:case B:case V:case j:case H:case U:case W:return Ii(e,n);case I:return new r;case C:case _:return new r(e);case N:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new r;case R:return i=e,Pn?Ce(Pn.call(i)):{}}var i}(e,f,u)}}a||(a=new Yn);var p=a.get(e);if(p)return p;a.set(e,s),as(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):ns(e)&&e.forEach((function(r,i){s.set(i,ur(r,t,n,i,e,a))}));var v=d?i:(l?c?io:ro:c?Rs:_s)(e);return Nt(v||e,(function(r,i){v&&(r=e[i=r]),tr(s,i,ur(r,t,n,i,e,a))})),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Ne(o);return _o((function(){e.apply(i,n)}),t)}function dr(e,t,n,r){var i=-1,o=Dt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Lt(t,Jt(n))),r?(o=Ot,a=!1):t.length>=200&&(o=tn,a=!1,t=new $n(t));e:for(;++i<s;){var l=e[i],d=null==n?l:n(l);if(l=r||0!==l?l:0,a&&d===d){for(var f=c;f--;)if(t[f]===d)continue e;u.push(l)}else o(t,d,r)||u.push(l)}return u}Vn.templateSettings={escape:K,evaluate:J,interpolate:ee,variable:"",imports:{_:Vn}},Vn.prototype=Hn.prototype,Vn.prototype.constructor=Vn,Un.prototype=jn(Hn.prototype),Un.prototype.constructor=Un,Wn.prototype=jn(Hn.prototype),Wn.prototype.constructor=Wn,qn.prototype.clear=function(){this.__data__=Nn?Nn(null):{},this.size=0},qn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qn.prototype.get=function(e){var t=this.__data__;if(Nn){var n=t[e];return n===a?i:n}return Le.call(t,e)?t[e]:i},qn.prototype.has=function(e){var t=this.__data__;return Nn?t[e]!==i:Le.call(t,e)},qn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Nn&&t===i?a:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ye.call(t,n,1),--this.size,!0)},Gn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?i:t[n][1]},Gn.prototype.has=function(e){return nr(this.__data__,e)>-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(In||Gn),string:new qn}},zn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},zn.prototype.get=function(e){return co(this,e).get(e)},zn.prototype.has=function(e){return co(this,e).has(e)},zn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},$n.prototype.add=$n.prototype.push=function(e){return this.__data__.set(e,a),this},$n.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!In||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(e,t),this.size=n.size,this};var fr=Di(wr),hr=Di(kr,!0);function pr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function vr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s===s&&!us(s):n(s,u)))var u=s,c=a}return c}function mr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function gr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?gr(s,t-1,n,r,i):Zt(i,s):r||(i[i.length]=s)}return i}var yr=Oi(),br=Oi(!0);function wr(e,t){return e&&yr(e,t,_s)}function kr(e,t){return e&&br(e,t,_s)}function Er(e,t){return Rt(t,(function(t){return Xa(e[t])}))}function Sr(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&n<r;)e=e[Fo(t[n++])];return n&&n==r?e:i}function xr(e,t,n){var r=t(e);return Wa(e)?r:Zt(r,n(e))}function Ir(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ke&&Ke in Ce(e)?function(e){var t=Le.call(e,Ke),n=e[Ke];try{e[Ke]=i;var r=!0}catch(a){}var o=Pe.call(e);r&&(t?e[Ke]=n:delete e[Ke]);return o}(e):function(e){return Pe.call(e)}(e)}function Cr(e,t){return e>t}function Tr(e,t){return null!=e&&Le.call(e,t)}function Mr(e,t){return null!=e&&t in Ce(e)}function Nr(e,t,r){for(var o=r?Ot:Dt,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,d=[];u--;){var f=e[u];u&&t&&(f=Lt(f,Jt(t))),l=bn(f.length,l),c[u]=!r&&(t||a>=120&&f.length>=120)?new $n(u&&f):i}f=e[0];var h=-1,p=c[0];e:for(;++h<a&&d.length<l;){var v=f[h],m=t?t(v):v;if(v=r||0!==v?v:0,!(p?tn(p,m):o(d,m,r))){for(u=s;--u;){var g=c[u];if(!(g?tn(g,m):o(e[u],m,r)))continue e}p&&p.push(m),d.push(v)}}return d}function Ar(e,t,n){var r=null==(e=Mo(e,t=bi(t,e)))?e:e[Fo(Qo(t))];return null==r?i:Tt(r,e,n)}function _r(e){return ts(e)&&Ir(e)==y}function Rr(e,t,n,r,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var s=Wa(e),u=Wa(t),c=s?b:vo(e),l=u?b:vo(t),d=(c=c==y?T:c)==T,f=(l=l==y?T:l)==T,h=c==l;if(h&&$a(e)){if(!$a(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new Yn),s||cs(e)?to(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!o(new We(e),new We(t)));case w:case k:case C:return Va(+e,+t);case E:return e.name==t.name&&e.message==t.message;case N:case _:return e==t+"";case I:var s=cn;case A:var u=1&r;if(s||(s=fn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=to(s(e),s(t),r,i,o,a);return a.delete(e),l;case R:if(Pn)return Pn.call(e)==Pn.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var p=d&&Le.call(e,"__wrapped__"),v=f&&Le.call(t,"__wrapped__");if(p||v){var m=p?e.value():e,g=v?t.value():t;return a||(a=new Yn),o(m,g,n,r,a)}}if(!h)return!1;return a||(a=new Yn),function(e,t,n,r,o,a){var s=1&n,u=ro(e),c=u.length,l=ro(t),d=l.length;if(c!=d&&!s)return!1;var f=c;for(;f--;){var h=u[f];if(!(s?h in t:Le.call(t,h)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);var g=s;for(;++f<c;){var y=e[h=u[f]],b=t[h];if(r)var w=s?r(b,y,h,t,e,a):r(y,b,h,e,t,a);if(!(w===i?y===b||o(y,b,n,r,a):w)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var k=e.constructor,E=t.constructor;k==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof k&&k instanceof k&&"function"==typeof E&&E instanceof E||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,r,o,a)}(e,t,n,r,Rr,o))}function Dr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=Ce(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],d=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var f=new Yn;if(r)var h=r(l,d,c,e,t,f);if(!(h===i?Rr(d,l,3,r,f):h))return!1}}return!0}function Or(e){return!(!es(e)||(t=e,Fe&&Fe in t))&&(Xa(e)?je:ye).test(Po(e));var t}function Lr(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Wa(e)?jr(e[0],e[1]):Vr(e):fu(e)}function Zr(e){if(!xo(e))return Vt(e);var t=[];for(var n in Ce(e))Le.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=xo(e),n=[];for(var r in e)("constructor"!=r||!t&&Le.call(e,r))&&n.push(r);return n}function Pr(e,t){return e<t}function Br(e,t){var r=-1,i=Ga(e)?n(e.length):[];return fr(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Vr(e){var t=lo(e);return 1==t.length&&t[0][2]?Co(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function jr(e,t){return ko(e)&&Io(t)?Co(Fo(e),t):function(n){var r=Cs(n,e);return r===i&&r===t?Ts(n,e):Rr(t,r,3)}}function Hr(e,t,n,r,o){e!==t&&yr(t,(function(a,s){if(o||(o=new Yn),es(a))!function(e,t,n,r,o,a,s){var u=No(e,n),c=No(t,n),l=s.get(c);if(l)return void er(e,n,l);var d=a?a(u,c,n+"",e,t,s):i,f=d===i;if(f){var h=Wa(c),p=!h&&$a(c),v=!h&&!p&&cs(c);d=c,h||p||v?Wa(u)?d=u:za(u)?d=Ni(u):p?(f=!1,d=Si(c,!0)):v?(f=!1,d=Ii(c,!0)):d=[]:is(c)||Ua(c)?(d=u,Ua(u)?d=gs(u):es(u)&&!Xa(u)||(d=go(c))):f=!1}f&&(s.set(c,d),o(d,c,r,a,s),s.delete(c));er(e,n,d)}(e,t,s,n,Hr,r,o);else{var u=r?r(No(e,s),a,s+"",e,t,o):i;u===i&&(u=a),er(e,s,u)}}),Rs)}function Ur(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:i}function Wr(e,t,n){t=t.length?Lt(t,(function(e){return Wa(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[ru];var r=-1;t=Lt(t,Jt(uo()));var i=Br(e,(function(e,n,i){var o=Lt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ci(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function qr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Sr(e,a);n(s,a)&&Jr(o,bi(a,e),s)}return o}function Gr(e,t,n,r){var i=r?Wt:Ut,o=-1,a=t.length,s=e;for(e===t&&(t=Ni(t)),n&&(s=Lt(e,Jt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Ye.call(s,u,1),Ye.call(e,u,1);return e}function zr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Ye.call(e,i,1):di(e,i)}}return e}function $r(e,t){return e+pt(En()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Qr(e,t){return Ro(To(e,t,ru),e+"")}function Xr(e){return Xn(Vs(e))}function Kr(e,t){var n=Vs(e);return Lo(n,sr(t,0,n.length))}function Jr(e,t,n,r){if(!es(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Fo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var d=u[c];(l=r?r(d,c,u):i)===i&&(l=es(d)?d:bo(t[o+1])?[]:{})}tr(u,c,l),u=u[c]}return e}var ei=An?function(e,t){return An.set(e,t),e}:ru,ti=Je?function(e,t){return Je(e,"toString",{configurable:!0,enumerable:!1,value:eu(t),writable:!0})}:ru;function ni(e){return Lo(Vs(e))}function ri(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function ii(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!us(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ai(e,t,ru,n)}function ai(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,u=null===t,c=us(t),l=t===i;o<a;){var d=pt((o+a)/2),f=n(e[d]),h=f!==i,p=null===f,v=f===f,m=us(f);if(s)var g=r||v;else g=l?v&&(r||h):u?v&&h&&(r||!p):c?v&&h&&!p&&(r||!m):!p&&!m&&(r?f<=t:f<t);g?o=d+1:a=d}return bn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Va(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ui(e){return"number"==typeof e?e:us(e)?v:+e}function ci(e){if("string"==typeof e)return e;if(Wa(e))return Lt(e,ci)+"";if(us(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function li(e,t,n){var r=-1,i=Dt,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Ot;else if(o>=200){var c=t?null:Yi(e);if(c)return fn(c);a=!1,i=tn,u=new $n}else u=t?[]:s;e:for(;++r<o;){var l=e[r],d=t?t(l):l;if(l=n||0!==l?l:0,a&&d===d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(l)}else i(u,d,n)||(u!==s&&u.push(d),s.push(l))}return s}function di(e,t){return null==(e=Mo(e,t=bi(t,e)))||delete e[Fo(Qo(t))]}function fi(e,t,n,r){return Jr(e,t,n(Sr(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Wn&&(n=n.value()),Ft(t,(function(e,t){return t.func.apply(t.thisArg,Zt([e],t.args))}),n)}function vi(e,t,r){var i=e.length;if(i<2)return i?li(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=dr(a[o]||s,e[u],t,r));return li(gr(a,1),t,r)}function mi(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function gi(e){return za(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function bi(e,t){return Wa(e)?e:ko(e,t)?[e]:Zo(ys(e))}var wi=Qr;function ki(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ri(e,t,n)}var Ei=nt||function(e){return vt.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=qe?qe(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function Ii(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ci(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=us(e),s=t!==i,u=null===t,c=t===t,l=us(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ti(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=$t(a-s,0),d=n(c+l),f=!i;++u<c;)d[u]=t[u];for(;++o<s;)(f||o<a)&&(d[r[o]]=e[o]);for(;l--;)d[u++]=e[o++];return d}function Mi(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,d=$t(a-u,0),f=n(d+l),h=!i;++o<d;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++s<u;)(h||o<a)&&(f[p+r[s]]=e[o++]);return f}function Ni(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?or(n,u,c):tr(n,u,c)}return n}function _i(e,t){return function(n,r){var i=Wa(n)?Mt:rr,o=t?t():{};return i(n,e,uo(r,2),o)}}function Ri(e){return Qr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&wo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=Ce(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Di(e,t){return function(n,r){if(null==n)return n;if(!Ga(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ce(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Oi(e){return function(t,n,r){for(var i=-1,o=Ce(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Li(e){return function(t){var n=un(t=ys(t))?vn(t):i,r=n?n[0]:t.charAt(0),o=n?ki(n,1).join(""):t.slice(1);return r[e]()+o}}function Zi(e){return function(t){return Ft(Xs(Us(t).replace(et,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=jn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Pi(e){return function(t,n,r){var o=Ce(t);if(!Ga(t)){var a=uo(n,3);t=_s(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function Bi(e){return no((function(t){var n=t.length,r=n,a=Un.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ne(o);if(a&&!u&&"wrapper"==ao(s))var u=new Un([],!0)}for(r=u?r:n;++r<n;){var c=ao(s=t[r]),l="wrapper"==c?oo(s):i;u=l&&Eo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[ao(l[0])].apply(u,l[3]):1==s.length&&Eo(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Wa(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Vi(e,t,r,o,a,s,u,c,l,f){var h=t&d,p=1&t,v=2&t,m=24&t,g=512&t,y=v?i:Fi(e);return function d(){for(var b=arguments.length,w=n(b),k=b;k--;)w[k]=arguments[k];if(m)var E=so(d),S=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,E);if(o&&(w=Ti(w,o,a,m)),s&&(w=Mi(w,s,u,m)),b-=S,m&&b<f){var x=dn(w,E);return zi(e,t,Vi,d.placeholder,r,w,x,c,l,f-b)}var I=p?r:this,C=v?I[e]:e;return b=w.length,c?w=function(e,t){var n=e.length,r=bn(t.length,n),o=Ni(e);for(;r--;){var a=t[r];e[r]=bo(a,n)?o[a]:i}return e}(w,c):g&&b>1&&w.reverse(),h&&l<b&&(w.length=l),this&&this!==vt&&this instanceof d&&(C=y||Fi(C)),C.apply(I,w)}}function ji(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Hi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=ui(n),r=ui(r)),o=e(n,r)}return o}}function Ui(e){return no((function(t){return t=Lt(t,Jt(uo())),Qr((function(n){var r=this;return e(t,(function(e){return Tt(e,r,n)}))}))}))}function Wi(e,t){var n=(t=t===i?" ":ci(t)).length;if(n<2)return n?Yr(t,e):t;var r=Yr(t,ht(e/pn(t)));return un(t)?ki(vn(r),0,e).join(""):r.slice(0,e)}function qi(e){return function(t,r,o){return o&&"number"!=typeof o&&wo(t,r,o)&&(r=o=i),t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r,i){for(var o=-1,a=$t(ht((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:hs(o),e)}}function Gi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function zi(e,t,n,r,o,a,s,u,d,f){var h=8&t;t|=h?c:l,4&(t&=~(h?l:c))||(t&=-4);var p=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,u,d,f],v=n.apply(i,p);return Eo(e)&&Ao(v,p),v.placeholder=r,Do(v,e,t)}function $i(e){var t=Ie[e];return function(e,n){if(e=ms(e),(n=null==n?0:bn(ps(n),292))&&bt(e)){var r=(ys(e)+"e").split("e");return+((r=(ys(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yi=Tn&&1/fn(new Tn([,-0]))[1]==h?function(e){return new Tn(e)}:uu;function Qi(e){return function(t){var n=vo(t);return n==I?cn(t):n==A?hn(t):function(e,t){return Lt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,r,a,h,p,v,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Ne(o);var y=a?a.length:0;if(y||(t&=-97,a=h=i),v=v===i?v:$t(ps(v),0),m=m===i?m:ps(m),y-=h?h.length:0,t&l){var b=a,w=h;a=h=i}var k=g?i:oo(e),E=[e,t,r,a,h,b,w,p,v,m];if(k&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==d&&8==n||r==d&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ti(c,u,t[4]):u,e[4]=c?dn(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Mi(c,u,t[6]):u,e[6]=c?dn(e[5],s):t[6]);(u=t[7])&&(e[7]=u);r&d&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(E,k),e=E[0],t=E[1],r=E[2],a=E[3],h=E[4],!(m=E[9]=E[9]===i?g?0:e.length:$t(E[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||t==u?function(e,t,r){var o=Fi(e);return function a(){for(var s=arguments.length,u=n(s),c=s,l=so(a);c--;)u[c]=arguments[c];var d=s<3&&u[0]!==l&&u[s-1]!==l?[]:dn(u,l);return(s-=d.length)<r?zi(e,t,Vi,a.placeholder,i,u,d,i,i,r-s):Tt(this&&this!==vt&&this instanceof a?o:e,this,u)}}(e,t,m):t!=c&&33!=t||h.length?Vi.apply(i,E):function(e,t,r,i){var o=1&t,a=Fi(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,d=n(l+u),f=this&&this!==vt&&this instanceof t?a:e;++c<l;)d[c]=i[c];for(;u--;)d[c++]=arguments[++s];return Tt(f,o?r:this,d)}}(e,t,r,a);else var S=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==vt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return Do((k?ei:Ao)(S,E),e,t)}function Ki(e,t,n,r){return e===i||Va(e,Re[n])&&!Le.call(r,n)?t:e}function Ji(e,t,n,r,o,a){return es(e)&&es(t)&&(a.set(t,e),Hr(e,t,i,Ji,a),a.delete(t)),e}function eo(e){return is(e)?i:e}function to(e,t,n,r,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var f=-1,h=!0,p=2&n?new $n:i;for(a.set(e,t),a.set(t,e);++f<u;){var v=e[f],m=t[f];if(r)var g=s?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(g!==i){if(g)continue;h=!1;break}if(p){if(!Bt(t,(function(e,t){if(!tn(p,t)&&(v===e||o(v,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(v!==m&&!o(v,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function no(e){return Ro(To(e,i,qo),e+"")}function ro(e){return xr(e,_s,ho)}function io(e){return xr(e,Rs,po)}var oo=An?function(e){return An.get(e)}:uu;function ao(e){for(var t=e.name+"",n=_n[t],r=Le.call(_n,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Le.call(Vn,"placeholder")?Vn:e).placeholder}function uo(){var e=Vn.iteratee||iu;return e=e===iu?Lr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function lo(e){for(var t=_s(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Io(i)]}return t}function fo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Or(n)?n:i}var ho=mt?function(e){return null==e?[]:(e=Ce(e),Rt(mt(e),(function(t){return $e.call(e,t)})))}:vu,po=mt?function(e){for(var t=[];e;)Zt(t,ho(e)),e=Ge(e);return t}:vu,vo=Ir;function mo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Fo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&bo(a,i)&&(Wa(e)||Ua(e))}function go(e){return"function"!=typeof e.constructor||xo(e)?{}:jn(Ge(e))}function yo(e){return Wa(e)||Ua(e)||!!(Qe&&e&&e[Qe])}function bo(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?Ga(n)&&bo(t,n.length):"string"==r&&t in n)&&Va(n[t],e)}function ko(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!us(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ce(t))}function Eo(e){var t=ao(e),n=Vn[t];if("function"!=typeof n||!(t in Wn.prototype))return!1;if(e===n)return!0;var r=oo(n);return!!r&&e===r[0]}(xn&&vo(new xn(new ArrayBuffer(1)))!=L||In&&vo(new In)!=I||Cn&&vo(Cn.resolve())!=M||Tn&&vo(new Tn)!=A||Mn&&vo(new Mn)!=D)&&(vo=function(e){var t=Ir(e),n=t==T?e.constructor:i,r=n?Po(n):"";if(r)switch(r){case Rn:return L;case Dn:return I;case On:return M;case Ln:return A;case Zn:return D}return t});var So=De?Xa:mu;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Io(e){return e===e&&!es(e)}function Co(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Ce(n)))}}function To(e,t,r){return t=$t(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=$t(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),Tt(e,this,u)}}function Mo(e,t){return t.length<2?e:Sr(e,ri(t,0,-1))}function No(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Ao=Oo(ei),_o=lt||function(e,t){return vt.setTimeout(e,t)},Ro=Oo(ti);function Do(e,t,n){var r=t+"";return Ro(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Nt(g,(function(n){var r="_."+n[0];t&n[1]&&!Dt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(r),n)))}function Oo(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Lo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=$r(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Zo=function(e){var t=Oa(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function Fo(e){if("string"==typeof e||us(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Po(e){if(null!=e){try{return Oe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Bo(e){if(e instanceof Wn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ni(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vo=Qr((function(e,t){return za(e)?dr(e,gr(t,1,za,!0)):[]})),jo=Qr((function(e,t){var n=Qo(t);return za(n)&&(n=i),za(e)?dr(e,gr(t,1,za,!0),uo(n,2)):[]})),Ho=Qr((function(e,t){var n=Qo(t);return za(n)&&(n=i),za(e)?dr(e,gr(t,1,za,!0),i,n):[]}));function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=$t(r+i,0)),Ht(e,uo(t,3),i)}function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ps(n),o=n<0?$t(r+o,0):bn(o,r-1)),Ht(e,uo(t,3),o,!0)}function qo(e){return(null==e?0:e.length)?gr(e,1):[]}function Go(e){return e&&e.length?e[0]:i}var zo=Qr((function(e){var t=Lt(e,gi);return t.length&&t[0]===e[0]?Nr(t):[]})),$o=Qr((function(e){var t=Qo(e),n=Lt(e,gi);return t===Qo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Nr(n,uo(t,2)):[]})),Yo=Qr((function(e){var t=Qo(e),n=Lt(e,gi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Nr(n,i,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Qr(Ko);function Ko(e,t){return e&&e.length&&t&&t.length?Gr(e,t):e}var Jo=no((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return zr(e,Lt(t,(function(e){return bo(e,n)?+e:e})).sort(Ci)),r}));function ea(e){return null==e?e:Sn.call(e)}var ta=Qr((function(e){return li(gr(e,1,za,!0))})),na=Qr((function(e){var t=Qo(e);return za(t)&&(t=i),li(gr(e,1,za,!0),uo(t,2))})),ra=Qr((function(e){var t=Qo(e);return t="function"==typeof t?t:i,li(gr(e,1,za,!0),i,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(za(e))return t=$t(e.length,t),!0})),Xt(t,(function(t){return Lt(e,zt(t))}))}function oa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Lt(n,(function(e){return Tt(t,i,e)}))}var aa=Qr((function(e,t){return za(e)?dr(e,t):[]})),sa=Qr((function(e){return vi(Rt(e,za))})),ua=Qr((function(e){var t=Qo(e);return za(t)&&(t=i),vi(Rt(e,za),uo(t,2))})),ca=Qr((function(e){var t=Qo(e);return t="function"==typeof t?t:i,vi(Rt(e,za),i,t)})),la=Qr(ia);var da=Qr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,oa(e,n)}));function fa(e){var t=Vn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var pa=no((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Wn&&bo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Un(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var va=_i((function(e,t,n){Le.call(e,n)?++e[n]:or(e,n,1)}));var ma=Pi(Uo),ga=Pi(Wo);function ya(e,t){return(Wa(e)?Nt:fr)(e,uo(t,3))}function ba(e,t){return(Wa(e)?At:hr)(e,uo(t,3))}var wa=_i((function(e,t,n){Le.call(e,n)?e[n].push(t):or(e,n,[t])}));var ka=Qr((function(e,t,r){var i=-1,o="function"==typeof t,a=Ga(e)?n(e.length):[];return fr(e,(function(e){a[++i]=o?Tt(t,e,r):Ar(e,t,r)})),a})),Ea=_i((function(e,t,n){or(e,n,t)}));function Sa(e,t){return(Wa(e)?Lt:Br)(e,uo(t,3))}var xa=_i((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ia=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,gr(t,1),[])})),Ca=it||function(){return vt.Date.now()};function Ta(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,d,i,i,i,i,t)}function Ma(e,t){var n;if("function"!=typeof t)throw new Ne(o);return e=ps(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Na=Qr((function(e,t,n){var r=1;if(n.length){var i=dn(n,so(Na));r|=c}return Xi(e,r,t,n,i)})),Aa=Qr((function(e,t,n){var r=3;if(n.length){var i=dn(n,so(Aa));r|=c}return Xi(t,r,e,n,i)}));function _a(e,t,n){var r,a,s,u,c,l,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ne(o);function v(t){var n=r,o=a;return r=a=i,d=t,u=e.apply(o,n)}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-d>=s}function g(){var e=Ca();if(m(e))return y(e);c=_o(g,function(e){var n=t-(e-l);return h?bn(n,s-(e-d)):n}(e))}function y(e){return c=i,p&&r?v(e):(r=a=i,u)}function b(){var e=Ca(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===i)return function(e){return d=e,c=_o(g,t),f?v(e):u}(l);if(h)return Ei(c),c=_o(g,t),v(l)}return c===i&&(c=_o(g,t)),u}return t=ms(t)||0,es(n)&&(f=!!n.leading,s=(h="maxWait"in n)?$t(ms(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==i&&Ei(c),d=0,r=l=a=c=i},b.flush=function(){return c===i?u:y(Ca())},b}var Ra=Qr((function(e,t){return lr(e,1,t)})),Da=Qr((function(e,t,n){return lr(e,ms(t)||0,n)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ne(o);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Oa.Cache||zn),n}function La(e){if("function"!=typeof e)throw new Ne(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=zn;var Za=wi((function(e,t){var n=(t=1==t.length&&Wa(t[0])?Lt(t[0],Jt(uo())):Lt(gr(t,1),Jt(uo()))).length;return Qr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Tt(e,this,r)}))})),Fa=Qr((function(e,t){var n=dn(t,so(Fa));return Xi(e,c,i,t,n)})),Pa=Qr((function(e,t){var n=dn(t,so(Pa));return Xi(e,l,i,t,n)})),Ba=no((function(e,t){return Xi(e,f,i,i,i,t)}));function Va(e,t){return e===t||e!==e&&t!==t}var ja=Gi(Cr),Ha=Gi((function(e,t){return e>=t})),Ua=_r(function(){return arguments}())?_r:function(e){return ts(e)&&Le.call(e,"callee")&&!$e.call(e,"callee")},Wa=n.isArray,qa=kt?Jt(kt):function(e){return ts(e)&&Ir(e)==O};function Ga(e){return null!=e&&Ja(e.length)&&!Xa(e)}function za(e){return ts(e)&&Ga(e)}var $a=gt||mu,Ya=Et?Jt(Et):function(e){return ts(e)&&Ir(e)==k};function Qa(e){if(!ts(e))return!1;var t=Ir(e);return t==E||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Xa(e){if(!es(e))return!1;var t=Ir(e);return t==S||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ka(e){return"number"==typeof e&&e==ps(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=St?Jt(St):function(e){return ts(e)&&vo(e)==I};function rs(e){return"number"==typeof e||ts(e)&&Ir(e)==C}function is(e){if(!ts(e)||Ir(e)!=T)return!1;var t=Ge(e);if(null===t)return!0;var n=Le.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Be}var os=xt?Jt(xt):function(e){return ts(e)&&Ir(e)==N};var as=It?Jt(It):function(e){return ts(e)&&vo(e)==A};function ss(e){return"string"==typeof e||!Wa(e)&&ts(e)&&Ir(e)==_}function us(e){return"symbol"==typeof e||ts(e)&&Ir(e)==R}var cs=Ct?Jt(Ct):function(e){return ts(e)&&Ja(e.length)&&!!ut[Ir(e)]};var ls=Gi(Pr),ds=Gi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Ga(e))return ss(e)?vn(e):Ni(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=vo(e);return(t==I?cn:t==A?fn:Vs)(e)}function hs(e){return e?(e=ms(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ps(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function vs(e){return e?sr(ps(e),0,m):0}function ms(e){if("number"==typeof e)return e;if(us(e))return v;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=ge.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):me.test(e)?v:+e}function gs(e){return Ai(e,Rs(e))}function ys(e){return null==e?"":ci(e)}var bs=Ri((function(e,t){if(xo(t)||Ga(t))Ai(t,_s(t),e);else for(var n in t)Le.call(t,n)&&tr(e,n,t[n])})),ws=Ri((function(e,t){Ai(t,Rs(t),e)})),ks=Ri((function(e,t,n,r){Ai(t,Rs(t),e,r)})),Es=Ri((function(e,t,n,r){Ai(t,_s(t),e,r)})),Ss=no(ar);var xs=Qr((function(e,t){e=Ce(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&wo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Rs(a),u=-1,c=s.length;++u<c;){var l=s[u],d=e[l];(d===i||Va(d,Re[l])&&!Le.call(e,l))&&(e[l]=a[l])}return e})),Is=Qr((function(e){return e.push(i,Ji),Tt(Os,i,e)}));function Cs(e,t,n){var r=null==e?i:Sr(e,t);return r===i?n:r}function Ts(e,t){return null!=e&&mo(e,t,Mr)}var Ms=ji((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),e[t]=n}),eu(ru)),Ns=ji((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),Le.call(e,t)?e[t].push(n):e[t]=[n]}),uo),As=Qr(Ar);function _s(e){return Ga(e)?Qn(e):Zr(e)}function Rs(e){return Ga(e)?Qn(e,!0):Fr(e)}var Ds=Ri((function(e,t,n){Hr(e,t,n)})),Os=Ri((function(e,t,n,r){Hr(e,t,n,r)})),Ls=no((function(e,t){var n={};if(null==e)return n;var r=!1;t=Lt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ai(e,io(e),n),r&&(n=ur(n,7,eo));for(var i=t.length;i--;)di(n,t[i]);return n}));var Zs=no((function(e,t){return null==e?{}:function(e,t){return qr(e,t,(function(t,n){return Ts(e,n)}))}(e,t)}));function Fs(e,t){if(null==e)return{};var n=Lt(io(e),(function(e){return[e]}));return t=uo(t),qr(e,n,(function(e,n){return t(e,n[0])}))}var Ps=Qi(_s),Bs=Qi(Rs);function Vs(e){return null==e?[]:en(e,_s(e))}var js=Zi((function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)}));function Hs(e){return Qs(ys(e).toLowerCase())}function Us(e){return(e=ys(e))&&e.replace(ke,on).replace(tt,"")}var Ws=Zi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),qs=Zi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Gs=Li("toLowerCase");var zs=Zi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var $s=Zi((function(e,t,n){return e+(n?" ":"")+Qs(t)}));var Ys=Zi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qs=Li("toUpperCase");function Xs(e,t,n){return e=ys(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Ks=Qr((function(e,t){try{return Tt(e,i,t)}catch(n){return Qa(n)?n:new se(n)}})),Js=no((function(e,t){return Nt(t,(function(t){t=Fo(t),or(e,t,Na(e[t],e))})),e}));function eu(e){return function(){return e}}var tu=Bi(),nu=Bi(!0);function ru(e){return e}function iu(e){return Lr("function"==typeof e?e:ur(e,1))}var ou=Qr((function(e,t){return function(n){return Ar(n,e,t)}})),au=Qr((function(e,t){return function(n){return Ar(e,n,t)}}));function su(e,t,n){var r=_s(t),i=Er(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Er(t,_s(t)));var o=!(es(n)&&"chain"in n)||!!n.chain,a=Xa(e);return Nt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ni(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Zt([this.value()],arguments))})})),e}function uu(){}var cu=Ui(Lt),lu=Ui(_t),du=Ui(Bt);function fu(e){return ko(e)?zt(Fo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var hu=qi(),pu=qi(!0);function vu(){return[]}function mu(){return!1}var gu=Hi((function(e,t){return e+t}),0),yu=$i("ceil"),bu=Hi((function(e,t){return e/t}),1),wu=$i("floor");var ku=Hi((function(e,t){return e*t}),1),Eu=$i("round"),Su=Hi((function(e,t){return e-t}),0);return Vn.after=function(e,t){if("function"!=typeof t)throw new Ne(o);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Vn.ary=Ta,Vn.assign=bs,Vn.assignIn=ws,Vn.assignInWith=ks,Vn.assignWith=Es,Vn.at=Ss,Vn.before=Ma,Vn.bind=Na,Vn.bindAll=Js,Vn.bindKey=Aa,Vn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Vn.chain=fa,Vn.chunk=function(e,t,r){t=(r?wo(e,t,r):t===i)?1:$t(ps(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=n(ht(o/t));a<o;)u[s++]=ri(e,a,a+=t);return u},Vn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Vn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Zt(Wa(r)?Ni(r):[r],gr(t,1))},Vn.cond=function(e){var t=null==e?0:e.length,n=uo();return e=t?Lt(e,(function(e){if("function"!=typeof e[1])throw new Ne(o);return[n(e[0]),e[1]]})):[],Qr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Tt(i[0],this,n))return Tt(i[1],this,n)}}))},Vn.conforms=function(e){return function(e){var t=_s(e);return function(n){return cr(n,e,t)}}(ur(e,1))},Vn.constant=eu,Vn.countBy=va,Vn.create=function(e,t){var n=jn(e);return null==t?n:ir(n,t)},Vn.curry=function e(t,n,r){var o=Xi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Vn.curryRight=function e(t,n,r){var o=Xi(t,u,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Vn.debounce=_a,Vn.defaults=xs,Vn.defaultsDeep=Is,Vn.defer=Ra,Vn.delay=Da,Vn.difference=Vo,Vn.differenceBy=jo,Vn.differenceWith=Ho,Vn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=n||t===i?1:ps(t))<0?0:t,r):[]},Vn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,0,(t=r-(t=n||t===i?1:ps(t)))<0?0:t):[]},Vn.dropRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0,!0):[]},Vn.dropWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0):[]},Vn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ps(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ps(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Vn.filter=function(e,t){return(Wa(e)?Rt:mr)(e,uo(t,3))},Vn.flatMap=function(e,t){return gr(Sa(e,t),1)},Vn.flatMapDeep=function(e,t){return gr(Sa(e,t),h)},Vn.flatMapDepth=function(e,t,n){return n=n===i?1:ps(n),gr(Sa(e,t),n)},Vn.flatten=qo,Vn.flattenDeep=function(e){return(null==e?0:e.length)?gr(e,h):[]},Vn.flattenDepth=function(e,t){return(null==e?0:e.length)?gr(e,t=t===i?1:ps(t)):[]},Vn.flip=function(e){return Xi(e,512)},Vn.flow=tu,Vn.flowRight=nu,Vn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Vn.functions=function(e){return null==e?[]:Er(e,_s(e))},Vn.functionsIn=function(e){return null==e?[]:Er(e,Rs(e))},Vn.groupBy=wa,Vn.initial=function(e){return(null==e?0:e.length)?ri(e,0,-1):[]},Vn.intersection=zo,Vn.intersectionBy=$o,Vn.intersectionWith=Yo,Vn.invert=Ms,Vn.invertBy=Ns,Vn.invokeMap=ka,Vn.iteratee=iu,Vn.keyBy=Ea,Vn.keys=_s,Vn.keysIn=Rs,Vn.map=Sa,Vn.mapKeys=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,t(e,r,i),e)})),n},Vn.mapValues=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,r,t(e,r,i))})),n},Vn.matches=function(e){return Vr(ur(e,1))},Vn.matchesProperty=function(e,t){return jr(e,ur(t,1))},Vn.memoize=Oa,Vn.merge=Ds,Vn.mergeWith=Os,Vn.method=ou,Vn.methodOf=au,Vn.mixin=su,Vn.negate=La,Vn.nthArg=function(e){return e=ps(e),Qr((function(t){return Ur(t,e)}))},Vn.omit=Ls,Vn.omitBy=function(e,t){return Fs(e,La(uo(t)))},Vn.once=function(e){return Ma(2,e)},Vn.orderBy=function(e,t,n,r){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(n=r?i:n)||(n=null==n?[]:[n]),Wr(e,t,n))},Vn.over=cu,Vn.overArgs=Za,Vn.overEvery=lu,Vn.overSome=du,Vn.partial=Fa,Vn.partialRight=Pa,Vn.partition=xa,Vn.pick=Zs,Vn.pickBy=Fs,Vn.property=fu,Vn.propertyOf=function(e){return function(t){return null==e?i:Sr(e,t)}},Vn.pull=Xo,Vn.pullAll=Ko,Vn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gr(e,t,uo(n,2)):e},Vn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gr(e,t,i,n):e},Vn.pullAt=Jo,Vn.range=hu,Vn.rangeRight=pu,Vn.rearg=Ba,Vn.reject=function(e,t){return(Wa(e)?Rt:mr)(e,La(uo(t,3)))},Vn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=uo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return zr(e,i),n},Vn.rest=function(e,t){if("function"!=typeof e)throw new Ne(o);return Qr(e,t=t===i?t:ps(t))},Vn.reverse=ea,Vn.sampleSize=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),(Wa(e)?Kn:Kr)(e,t)},Vn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},Vn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Jr(e,t,n,r)},Vn.shuffle=function(e){return(Wa(e)?Jn:ni)(e)},Vn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&wo(e,t,n)?(t=0,n=r):(t=null==t?0:ps(t),n=n===i?r:ps(n)),ri(e,t,n)):[]},Vn.sortBy=Ia,Vn.sortedUniq=function(e){return e&&e.length?si(e):[]},Vn.sortedUniqBy=function(e,t){return e&&e.length?si(e,uo(t,2)):[]},Vn.split=function(e,t,n){return n&&"number"!=typeof n&&wo(e,t,n)&&(t=n=i),(n=n===i?m:n>>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ci(t))&&un(e)?ki(vn(e),0,n):e.split(t,n):[]},Vn.spread=function(e,t){if("function"!=typeof e)throw new Ne(o);return t=null==t?0:$t(ps(t),0),Qr((function(n){var r=n[t],i=ki(n,0,t);return r&&Zt(i,r),Tt(e,this,i)}))},Vn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Vn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:ps(t))<0?0:t):[]},Vn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:ps(t)))<0?0:t,r):[]},Vn.takeRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!1,!0):[]},Vn.takeWhile=function(e,t){return e&&e.length?hi(e,uo(t,3)):[]},Vn.tap=function(e,t){return t(e),e},Vn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ne(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_a(e,t,{leading:r,maxWait:t,trailing:i})},Vn.thru=ha,Vn.toArray=fs,Vn.toPairs=Ps,Vn.toPairsIn=Bs,Vn.toPath=function(e){return Wa(e)?Lt(e,Fo):us(e)?[e]:Ni(Zo(ys(e)))},Vn.toPlainObject=gs,Vn.transform=function(e,t,n){var r=Wa(e),i=r||$a(e)||cs(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Xa(o)?jn(Ge(e)):{}}return(i?Nt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Vn.unary=function(e){return Ta(e,1)},Vn.union=ta,Vn.unionBy=na,Vn.unionWith=ra,Vn.uniq=function(e){return e&&e.length?li(e):[]},Vn.uniqBy=function(e,t){return e&&e.length?li(e,uo(t,2)):[]},Vn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?li(e,i,t):[]},Vn.unset=function(e,t){return null==e||di(e,t)},Vn.unzip=ia,Vn.unzipWith=oa,Vn.update=function(e,t,n){return null==e?e:fi(e,t,yi(n))},Vn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:fi(e,t,yi(n),r)},Vn.values=Vs,Vn.valuesIn=function(e){return null==e?[]:en(e,Rs(e))},Vn.without=aa,Vn.words=Xs,Vn.wrap=function(e,t){return Fa(yi(t),e)},Vn.xor=sa,Vn.xorBy=ua,Vn.xorWith=ca,Vn.zip=la,Vn.zipObject=function(e,t){return mi(e||[],t||[],tr)},Vn.zipObjectDeep=function(e,t){return mi(e||[],t||[],Jr)},Vn.zipWith=da,Vn.entries=Ps,Vn.entriesIn=Bs,Vn.extend=ws,Vn.extendWith=ks,su(Vn,Vn),Vn.add=gu,Vn.attempt=Ks,Vn.camelCase=js,Vn.capitalize=Hs,Vn.ceil=yu,Vn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ms(n))===n?n:0),t!==i&&(t=(t=ms(t))===t?t:0),sr(ms(e),t,n)},Vn.clone=function(e){return ur(e,4)},Vn.cloneDeep=function(e){return ur(e,5)},Vn.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:i)},Vn.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:i)},Vn.conformsTo=function(e,t){return null==t||cr(e,t,_s(t))},Vn.deburr=Us,Vn.defaultTo=function(e,t){return null==e||e!==e?t:e},Vn.divide=bu,Vn.endsWith=function(e,t,n){e=ys(e),t=ci(t);var r=e.length,o=n=n===i?r:sr(ps(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Vn.eq=Va,Vn.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(Y,an):e},Vn.escapeRegExp=function(e){return(e=ys(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Vn.every=function(e,t,n){var r=Wa(e)?_t:pr;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Vn.find=ma,Vn.findIndex=Uo,Vn.findKey=function(e,t){return jt(e,uo(t,3),wr)},Vn.findLast=ga,Vn.findLastIndex=Wo,Vn.findLastKey=function(e,t){return jt(e,uo(t,3),kr)},Vn.floor=wu,Vn.forEach=ya,Vn.forEachRight=ba,Vn.forIn=function(e,t){return null==e?e:yr(e,uo(t,3),Rs)},Vn.forInRight=function(e,t){return null==e?e:br(e,uo(t,3),Rs)},Vn.forOwn=function(e,t){return e&&wr(e,uo(t,3))},Vn.forOwnRight=function(e,t){return e&&kr(e,uo(t,3))},Vn.get=Cs,Vn.gt=ja,Vn.gte=Ha,Vn.has=function(e,t){return null!=e&&mo(e,t,Tr)},Vn.hasIn=Ts,Vn.head=Go,Vn.identity=ru,Vn.includes=function(e,t,n,r){e=Ga(e)?e:Vs(e),n=n&&!r?ps(n):0;var i=e.length;return n<0&&(n=$t(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Vn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=$t(r+i,0)),Ut(e,t,i)},Vn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e<$t(t,n)}(e=ms(e),t,n)},Vn.invoke=As,Vn.isArguments=Ua,Vn.isArray=Wa,Vn.isArrayBuffer=qa,Vn.isArrayLike=Ga,Vn.isArrayLikeObject=za,Vn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Ir(e)==w},Vn.isBuffer=$a,Vn.isDate=Ya,Vn.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},Vn.isEmpty=function(e){if(null==e)return!0;if(Ga(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||$a(e)||cs(e)||Ua(e)))return!e.length;var t=vo(e);if(t==I||t==A)return!e.size;if(xo(e))return!Zr(e).length;for(var n in e)if(Le.call(e,n))return!1;return!0},Vn.isEqual=function(e,t){return Rr(e,t)},Vn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Rr(e,t,i,n):!!r},Vn.isError=Qa,Vn.isFinite=function(e){return"number"==typeof e&&bt(e)},Vn.isFunction=Xa,Vn.isInteger=Ka,Vn.isLength=Ja,Vn.isMap=ns,Vn.isMatch=function(e,t){return e===t||Dr(e,t,lo(t))},Vn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Dr(e,t,lo(t),n)},Vn.isNaN=function(e){return rs(e)&&e!=+e},Vn.isNative=function(e){if(So(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(e)},Vn.isNil=function(e){return null==e},Vn.isNull=function(e){return null===e},Vn.isNumber=rs,Vn.isObject=es,Vn.isObjectLike=ts,Vn.isPlainObject=is,Vn.isRegExp=os,Vn.isSafeInteger=function(e){return Ka(e)&&e>=-9007199254740991&&e<=p},Vn.isSet=as,Vn.isString=ss,Vn.isSymbol=us,Vn.isTypedArray=cs,Vn.isUndefined=function(e){return e===i},Vn.isWeakMap=function(e){return ts(e)&&vo(e)==D},Vn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Ir(e)},Vn.join=function(e,t){return null==e?"":wt.call(e,t)},Vn.kebabCase=Ws,Vn.last=Qo,Vn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ps(n))<0?$t(r+o,0):bn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ht(e,qt,o,!0)},Vn.lowerCase=qs,Vn.lowerFirst=Gs,Vn.lt=ls,Vn.lte=ds,Vn.max=function(e){return e&&e.length?vr(e,ru,Cr):i},Vn.maxBy=function(e,t){return e&&e.length?vr(e,uo(t,2),Cr):i},Vn.mean=function(e){return Gt(e,ru)},Vn.meanBy=function(e,t){return Gt(e,uo(t,2))},Vn.min=function(e){return e&&e.length?vr(e,ru,Pr):i},Vn.minBy=function(e,t){return e&&e.length?vr(e,uo(t,2),Pr):i},Vn.stubArray=vu,Vn.stubFalse=mu,Vn.stubObject=function(){return{}},Vn.stubString=function(){return""},Vn.stubTrue=function(){return!0},Vn.multiply=ku,Vn.nth=function(e,t){return e&&e.length?Ur(e,ps(t)):i},Vn.noConflict=function(){return vt._===this&&(vt._=Ve),this},Vn.noop=uu,Vn.now=Ca,Vn.pad=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Wi(pt(i),n)+e+Wi(ht(i),n)},Vn.padEnd=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?e+Wi(t-r,n):e},Vn.padStart=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?Wi(t-r,n)+e:e},Vn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),kn(ys(e).replace(ae,""),t||0)},Vn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&wo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=En();return bn(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return $r(e,t)},Vn.reduce=function(e,t,n){var r=Wa(e)?Ft:Yt,i=arguments.length<3;return r(e,uo(t,4),n,i,fr)},Vn.reduceRight=function(e,t,n){var r=Wa(e)?Pt:Yt,i=arguments.length<3;return r(e,uo(t,4),n,i,hr)},Vn.repeat=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),Yr(ys(e),t)},Vn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Vn.result=function(e,t,n){var r=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Fo(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Vn.round=Eu,Vn.runInContext=e,Vn.sample=function(e){return(Wa(e)?Xn:Xr)(e)},Vn.size=function(e){if(null==e)return 0;if(Ga(e))return ss(e)?pn(e):e.length;var t=vo(e);return t==I||t==A?e.size:Zr(e).length},Vn.snakeCase=zs,Vn.some=function(e,t,n){var r=Wa(e)?Bt:ii;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Vn.sortedIndex=function(e,t){return oi(e,t)},Vn.sortedIndexBy=function(e,t,n){return ai(e,t,uo(n,2))},Vn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Va(e[r],t))return r}return-1},Vn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Vn.sortedLastIndexBy=function(e,t,n){return ai(e,t,uo(n,2),!0)},Vn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Va(e[n],t))return n}return-1},Vn.startCase=$s,Vn.startsWith=function(e,t,n){return e=ys(e),n=null==n?0:sr(ps(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Vn.subtract=Su,Vn.sum=function(e){return e&&e.length?Qt(e,ru):0},Vn.sumBy=function(e,t){return e&&e.length?Qt(e,uo(t,2)):0},Vn.template=function(e,t,n){var r=Vn.templateSettings;n&&wo(e,t,n)&&(t=i),e=ys(e),t=ks({},t,r,Ki);var o,a,s=ks({},t.imports,r.imports,Ki),u=_s(s),c=en(s,u),l=0,d=t.interpolate||Ee,f="__p += '",h=Te((t.escape||Ee).source+"|"+d.source+"|"+(d===ee?pe:Ee).source+"|"+(t.evaluate||Ee).source+"|$","g"),p="//# sourceURL="+(Le.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(h,(function(t,n,r,i,s,u){return r||(r=i),f+=e.slice(l,u).replace(Se,sn),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),f+="';\n";var v=Le.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(q,""):f).replace(G,"$1").replace(z,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ks((function(){return xe(u,p+"return "+f).apply(i,c)}));if(m.source=f,Qa(m))throw m;return m},Vn.times=function(e,t){if((e=ps(e))<1||e>p)return[];var n=m,r=bn(e,m);t=uo(t),e-=m;for(var i=Xt(r,t);++n<e;)t(n);return i},Vn.toFinite=hs,Vn.toInteger=ps,Vn.toLength=vs,Vn.toLower=function(e){return ys(e).toLowerCase()},Vn.toNumber=ms,Vn.toSafeInteger=function(e){return e?sr(ps(e),-9007199254740991,p):0===e?e:0},Vn.toString=ys,Vn.toUpper=function(e){return ys(e).toUpperCase()},Vn.trim=function(e,t,n){if((e=ys(e))&&(n||t===i))return Kt(e);if(!e||!(t=ci(t)))return e;var r=vn(e),o=vn(t);return ki(r,nn(r,o),rn(r,o)+1).join("")},Vn.trimEnd=function(e,t,n){if((e=ys(e))&&(n||t===i))return e.slice(0,mn(e)+1);if(!e||!(t=ci(t)))return e;var r=vn(e);return ki(r,0,rn(r,vn(t))+1).join("")},Vn.trimStart=function(e,t,n){if((e=ys(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=ci(t)))return e;var r=vn(e);return ki(r,nn(r,vn(t))).join("")},Vn.truncate=function(e,t){var n=30,r="...";if(es(t)){var o="separator"in t?t.separator:o;n="length"in t?ps(t.length):n,r="omission"in t?ci(t.omission):r}var a=(e=ys(e)).length;if(un(e)){var s=vn(e);a=s.length}if(n>=a)return e;var u=n-pn(r);if(u<1)return r;var c=s?ki(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),os(o)){if(e.slice(u).search(o)){var l,d=c;for(o.global||(o=Te(o.source,ys(ve.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(e.indexOf(ci(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Vn.unescape=function(e){return(e=ys(e))&&Q.test(e)?e.replace($,gn):e},Vn.uniqueId=function(e){var t=++Ze;return ys(e)+t},Vn.upperCase=Ys,Vn.upperFirst=Qs,Vn.each=ya,Vn.eachRight=ba,Vn.first=Go,su(Vn,function(){var e={};return wr(Vn,(function(t,n){Le.call(Vn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Vn.VERSION="4.17.21",Nt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Vn[e].placeholder=Vn})),Nt(["drop","take"],(function(e,t){Wn.prototype[e]=function(n){n=n===i?1:$t(ps(n),0);var r=this.__filtered__&&!t?new Wn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Nt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Nt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}})),Nt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}})),Wn.prototype.compact=function(){return this.filter(ru)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new Wn(this):this.map((function(n){return Ar(n,e,t)}))})),Wn.prototype.reject=function(e){return this.filter(La(uo(e)))},Wn.prototype.slice=function(e,t){e=ps(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Wn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ps(t))<0?n.dropRight(-t):n.take(t-e)),n)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(m)},wr(Wn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Vn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Vn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Wn,c=s[0],l=u||Wa(t),d=function(e){var t=o.apply(Vn,Zt([e],s));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,v=u&&!h;if(!a&&l){t=v?t:new Wn(this);var m=e.apply(t,s);return m.__actions__.push({func:ha,args:[d],thisArg:i}),new Un(m,f)}return p&&v?e.apply(this,s):(m=this.thru(d),p?r?m.value()[0]:m.value():m)})})),Nt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ae[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Vn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wa(i)?i:[],e)}return this[n]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),wr(Wn.prototype,(function(e,t){var n=Vn[t];if(n){var r=n.name+"";Le.call(_n,r)||(_n[r]=[]),_n[r].push({name:t,func:n})}})),_n[Vi(i,2).name]=[{name:"wrapper",func:i}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Ni(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ni(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ni(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=$t(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,d=l.length,f=0,h=bn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return pi(e,this.__actions__);var p=[];e:for(;u--&&f<h;){for(var v=-1,m=e[c+=t];++v<d;){var g=l[v],y=g.iteratee,b=g.type,w=y(m);if(2==b)m=w;else if(!w){if(1==b)continue e;break e}}p[f++]=m}return p},Vn.prototype.at=pa,Vn.prototype.chain=function(){return fa(this)},Vn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},Vn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Vn.prototype.plant=function(e){for(var t,n=this;n instanceof Hn;){var r=Bo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Vn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Un(t,this.__chain__)}return this.thru(ea)},Vn.prototype.toJSON=Vn.prototype.valueOf=Vn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Vn.prototype.first=Vn.prototype.head,Xe&&(Vn.prototype[Xe]=function(){return this}),Vn}();vt._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2352:function(e){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return x})),n.d(t,"b",(function(){return I})),n.d(t,"c",(function(){return C}));var r=n(1),i=n.n(r),o=n(14),a=n.n(o),s=n(2),u=n.n(s),c=n(15),l=n.n(c);function d(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}var f=Array.isArray,h=Object.keys;function p(e){return"function"==typeof e}function v(e){return e instanceof HTMLElement||e instanceof Text}function m(e){return"object"===u()(e)&&!f(e)}function g(e){if(!e||"string"==typeof e)return e;var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete t.children,t}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!(!f(e)||!f(t))&&(n?e.length===t.length&&!e.find((function(e){return!t.includes(e)})):e.some((function(e){return t.includes(e)})))}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];if(!h(e).length)return!0;if(null===t||!h(t).length)return!1;if(n)return l()(e,t);var i=h(e).filter((function(e){return h(t).includes(e)}));return i.forEach((function(n){m(e[n])&&m(t[n])&&(r=r.concat(b(e[n],t[n]))),(e[n]===t[n]||y(e[n],t[n]))&&r.push(t)})),r.length>0&&r.filter((function(e){return e})).length===i.length}function w(e){var t,n={children:[]};if(!e)return n;n.name=p(t=e.type)?t.displayName||t.name:t,n.props=g(e.memoizedProps),n.state=function(e){if(e)return e.baseState||e}(e.memoizedState);var r=e.child;if(r)for(n.children.push(r);r.sibling;)n.children.push(r.sibling),r=r.sibling;return n.children=n.children.map((function(e){return w(e)})),p(e.type)&&function(e){return e.children.length>1}(n)?(n.node=function(e){return e.children.map((function(e){return e.node})).filter((function(e){return!!e}))}(n),n.isFragment=!0):n.node=function(e){return v(e.stateNode)?e.stateNode:e.child&&v(e.child.stateNode)?e.child.stateNode:null}(e),n}function k(e){for(;e.length;){var t=e.shift();if(t.node)return t.node;t.children&&Array.isArray(t.children)&&e.push.apply(e,i()(t.children))}}function E(e,t){for(var n=[];e.length;){var r=e.shift().children;r&&Array.isArray(r)&&r.forEach((function(r){t(r)&&(!r.node&&Array.isArray(r.children)&&(r.node=k(r.children.concat([]))),n.push(r)),e.push(r)}))}return n}function S(e,t){var n=function(e){if(e){var t=e.split("(");return 1===t.length?e:t.find((function(e){return e.includes(")")})).replace(/\)*/g,"")}}(t);return new RegExp("^"+e.split("*").map((function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")})).join(".+")+"$").test(n)}function x(e,t){var n=arguments.length>3?arguments[3]:void 0;return e.reduce((function(e,t){return e.concat(E(e,n&&"function"==typeof n?n:function(e){return"string"==typeof e.name?S(t,e.name):null!==e.name&&"object"===u()(e.name)&&S(t,e.name.displayName)}))}),[t])}function I(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return p(n)?(console.warn("Functions are not supported as filter matchers"),[]):e.filter((function(e){return m(n)&&b(n,e[t],r)||f(n)&&y(n,e[t],r)||e[t]===n}))}function C(e){if(e.hasOwnProperty("_reactRootContainer"))return e._reactRootContainer._internalRoot.current;var t=Object.keys(e).find((function(e){return e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber")||e.startsWith("__reactContainer")}));return t?e[t]:void 0}},function(e,t,n){var r=n(17),i=n(18),o=n(19),a=n(20);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(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.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(3),i=n(6),o=n(22),a=n(23);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(0);function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,n=arguments.length>1?arguments[1]:void 0;if(e.isReactLoaded)return Promise.resolve("React already loaded");var i=function(){var e=document.createTreeWalker(document);if(n)return document.querySelector(n);for(;e.nextNode();)if(e.currentNode.hasOwnProperty("_reactRootContainer"))return e.currentNode};return new Promise((function(n,o){var a=!1,s=null;!function t(){var o=i();if(o&&(e.isReactLoaded=!0,e.rootReactElement=Object(r.c)(o),e.rootReactElement))return clearTimeout(s),n();a||setTimeout(t,200)}(),s=setTimeout((function(){a=!0,o("Timed out")}),t)}))}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(1),i=n.n(r),o=n(4),a=n.n(o),s=n(5),u=n.n(s),c=n(7),l=n.n(c),d=n(13),f=n.n(d),h=n(3),p=n.n(h),v=n(8),m=n.n(v),g=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var b=function(e){l()(n,e);var t=y(n);function n(e){return a()(this,n),e||(e=[]),t.call.apply(t,[this].concat(i()(e)))}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"props",e,t))}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"state",e,t))}}]),n}(m()(Array)),w=function(e){l()(n,e);var t=y(n);function n(e,r){var i;for(var o in a()(this,n),(i=t.call(this,e))._nodes=r,e)i[o]=e[o];return i}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"props",e,t)[0],this._nodes)}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"state",e,t)[0],this._nodes)}}]),n}(m()(Object)),k=function(){function e(t,n){a()(this,e),this.selectors=t.split(" ").filter((function(e){return!!e})).map((function(e){return e.trim()})),this.rootComponent=n,this.tree=Object(g.a)(this.rootComponent)}return u()(e,[{key:"find",value:function(){return this.nodes=new b(Object(g.d)(this.selectors,this.tree,!0)),new w(this.nodes[0],this.nodes)}},{key:"findAll",value:function(){return new b(Object(g.d)(this.selectors,this.tree))}}]),e}()},function(e,t,n){var r=n(2).default,i=n(21);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var a,s,u,c=r(t),l=r(n);if(c&&l){if((s=t.length)!=n.length)return!1;for(a=s;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(c!=l)return!1;var d=t instanceof Date,f=n instanceof Date;if(d!=f)return!1;if(d&&f)return t.getTime()==n.getTime();var h=t instanceof RegExp,p=n instanceof RegExp;if(h!=p)return!1;if(h&&p)return t.toString()==n.toString();var v=i(t);if((s=v.length)!==i(n).length)return!1;for(a=s;0!=a--;)if(!o.call(n,v[a]))return!1;for(a=s;0!=a--;)if(!e(t[u=v[a]],n[u]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"resq$",(function(){return s})),n.d(t,"resq$$",(function(){return u}));var r=n(12),i=n(11);n.d(t,"waitToLoadReact",(function(){return i.a}));var o=n(0);function a(t,n,i){if(!i&&!e.isReactLoaded)throw new Error("Could not find the root element of your application");var a=e.rootReactElement;if(i instanceof HTMLElement&&(a=Object(o.c)(i)),!a)throw new Error("Could not find instance of React in given element");return new r.a(t,a)[n]()}function s(e,t){return a(e,"find",t)}function u(e,t){return a(e,"findAll",t)}}.call(this,n(9))},function(e,t,n){var r=n(10);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(10);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6),i=n(24);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0}])},573:function(e,t,n){var r=n(763);function i(e){return e.reduce((function(e,t,n,r){return e+t}))}function o(e){if(r.isArray(e))return e;if("string"===typeof e)return e.split("");throw Error("Parameter must be a string or array.")}t.$m=function(e,t){return e=o(e),t=o(t),r.intersection(e,t).length/r.union(e,t).length}},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},7326:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},5861:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}n.d(t,{Z:function(){return i}})},5671:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},5647:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9611),i=n(8814);function o(e,t,n){return o=(0,i.Z)()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&(0,r.Z)(o,n.prototype),o},o.apply(null,arguments)}},3144:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9142);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},7762:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,r.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},7277:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(1120),i=n(8814),o=n(1002),a=n(7326);function s(e){var t=(0,i.Z)();return function(){var n,i=(0,r.Z)(e);if(t){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===(0,o.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.Z)(e)}(this,n)}}},4942:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9142);function i(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},1752:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1120);function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,r.Z)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},i.apply(this,arguments)}},1120:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},136:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9611);function i(e,t){if("function"!==typeof t&&null!==t)throw new 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&&(0,r.Z)(e,t)}},8814:function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return r}})},1413:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4942);function i(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},4925:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:function(){return r}})},4165:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(){i=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new R(r||[]);return a(o,"_invoke",{value:M(e,n,s)}),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function b(){}function w(){}function k(){}var E={};d(E,u,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(D([])));x&&x!==n&&o.call(x,u)&&(E=x);var I=k.prototype=b.prototype=Object.create(E);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==(0,r.Z)(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function M(t,n,r){var i=p;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=N(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var c=h(t,n,r);if("normal"===c.type){if(i=r.done?g:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function N(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,N(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function A(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 _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError((0,r.Z)(t)+" is not iterable")}return w.prototype=k,a(I,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:w,configurable:!0}),w.displayName=d(k,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,d(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},C(T.prototype),d(T.prototype,c,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new T(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(I),d(I,l,"Generator"),d(I,u,(function(){return this})),d(I,"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=D,R.prototype={constructor:R,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(_),!t)for(var n in this)"t"===n.charAt(0)&&o.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 r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;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,y):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),y},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),_(n),y}},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 i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}},9611:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},885:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2982:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(907);var i=n(181);function o(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},1002:function(e,t,n){"use strict";function r(e){return r="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},r(e)}n.d(t,{Z:function(){return r}})},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(907);function i(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},8664:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(1120),i=n(9611);var o=n(5647);function a(e){var t="function"===typeof Map?new Map:void 0;return a=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 new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return(0,o.Z)(e,arguments,(0,r.Z)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(n,e)},a(e)}},3464:function(e,t,n){"use strict";n.d(t,{J:function(){return s},c:function(){return a}});for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"===typeof Uint8Array?[]:new Uint8Array(256),o=0;o<64;o++)i[r.charCodeAt(o)]=o;var a=function(e){var t,n=new Uint8Array(e),i=n.length,o="";for(t=0;t<i;t+=3)o+=r[n[t]>>2],o+=r[(3&n[t])<<4|n[t+1]>>4],o+=r[(15&n[t+1])<<2|n[t+2]>>6],o+=r[63&n[t+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(e){var t,n,r,o,a,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),d=new Uint8Array(l);for(t=0;t<u;t+=4)n=i[e.charCodeAt(t)],r=i[e.charCodeAt(t+1)],o=i[e.charCodeAt(t+2)],a=i[e.charCodeAt(t+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|o>>2,d[c++]=(3&o)<<6|63&a;return l}},3246:function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}n.d(t,{_:function(){return r},m:function(){return i}})},5512:function(e,t,n){"use strict";n.d(t,{Bu:function(){return C},CO:function(){return q},DS:function(){return d},Df:function(){return re},GQ:function(){return oe},IG:function(){return j},Jq:function(){return r},MK:function(){return h},P8:function(){return B},UR:function(){return g},VU:function(){return ae},We:function(){return P},Zq:function(){return l},bZ:function(){return v},eD:function(){return W},kv:function(){return b},pe:function(){return V},wR:function(){return m},zi:function(){return I}});var r,i=n(136),o=n(7277),a=n(7762),s=n(5671),u=n(3144);function c(e){return e.nodeType===e.ELEMENT_NODE}function l(e){var t=null===e||void 0===e?void 0:e.host;return Boolean((null===t||void 0===t?void 0:t.shadowRoot)===e)}function d(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function f(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t,h).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n):null}catch(r){return null}var n}function h(e){var t;if(function(e){return"styleSheet"in e}(e))try{t=f(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function(e){var t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(e.cssText);return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(r||(r={}));var p=function(){function e(){(0,s.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,u.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function v(){return new p}function m(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.value,a=e.maskInputFn,s=o||"",u=i&&g(i);return(n[r.toLowerCase()]||u&&n[u])&&(s=a?a(s,t):"*".repeat(s.length)),s}function g(e){return e.toLowerCase()}var y="__rrweb_original__";function b(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?g(t):null}function w(e,t){var n,r;try{r=new URL(e,null!==t&&void 0!==t?t:window.location.href)}catch(o){return null}var i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null===i||void 0===i?void 0:i[1])&&void 0!==n?n:null}var k,E,S=1,x=new RegExp("[^a-z0-9-_:]"),I=-2;function C(){return S++}var T=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,M=/^(?:[a-z+]+:)?\/\//i,N=/^www\..*/i,A=/^(data:)([^,]*),(.*)/i;function _(e,t){return(e||"").replace(T,(function(e,n,r,i,o,s){var u,c=r||o||s,l=n||i||"";if(!c)return e;if(M.test(c)||N.test(c))return"url(".concat(l).concat(c).concat(l,")");if(A.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((u=t,(u.indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+c)).concat(l,")");var d=t.split("/"),f=c.split("/");d.pop();var h,p=(0,a.Z)(f);try{for(p.s();!(h=p.n()).done;){var v=h.value;"."!==v&&(".."===v?d.pop():d.push(v))}}catch(m){p.e(m)}finally{p.f()}return"url(".concat(l).concat(d.join("/")).concat(l,")")}))}var R=/^[^ \t\n\r\u000c]+/,D=/^[, \t\n\r\u000c]+/;var O=new WeakMap;function L(e,t){return t&&""!==t.trim()?F(e,t):t}function Z(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function F(e,t){var n=O.get(e);if(n||(n=e.createElement("a"),O.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function P(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?L(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(D),!(n>=t.length);){var o=r(R);if(","===o.slice(-1))o=L(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=L(e,o);for(var s=!1;;){var u=t.charAt(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n?_(r,F(e)):"object"===t&&"data"===n?L(e,r):r:L(e,r):r}function B(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function V(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&V(e.parentNode,t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&V(e.parentNode,t,n)}function j(e,t,n,r){try{var i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("string"===typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(V(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(o){}return!1}function H(e,t){var n=t.doc,i=t.mirror,o=t.blockClass,a=t.blockSelector,s=t.needsMask,u=t.inlineStylesheet,c=t.maskInputOptions,l=void 0===c?{}:c,d=t.maskTextFn,h=t.maskInputFn,p=t.dataURLOptions,v=void 0===p?{}:p,w=t.inlineImages,S=t.recordCanvas,I=t.keepIframeSrcFn,C=t.newlyAddedElement,T=void 0!==C&&C,M=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,i);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:r.Document,childNodes:[],compatMode:e.compatMode}:{type:r.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:r.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:M};case e.ELEMENT_NODE:return function(e,t){for(var n,i=t.doc,o=t.blockClass,a=t.blockSelector,s=t.inlineStylesheet,u=t.maskInputOptions,c=void 0===u?{}:u,l=t.maskInputFn,d=t.dataURLOptions,h=void 0===d?{}:d,p=t.inlineImages,v=t.recordCanvas,w=t.keepIframeSrcFn,S=t.newlyAddedElement,I=void 0!==S&&S,C=t.rootId,T=function(e,t,n){try{if("string"===typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(o){}return!1}(e,o,a),M=function(e){if(e instanceof HTMLFormElement)return"form";var t=g(e.tagName);return x.test(t)?"div":t}(e),N={},A=e.attributes.length,R=0;R<A;R++){var D=e.attributes[R];B(M,D.name,D.value)||(N[D.name]=P(i,M,g(D.name),D.value))}if("link"===M&&s){var O=Array.from(i.styleSheets).find((function(t){return t.href===e.href})),L=null;O&&(L=f(O)),L&&(delete N.rel,delete N.href,N._cssText=_(L,O.href))}if("style"===M&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var V=f(e.sheet);V&&(N._cssText=_(V,F(i)))}if("input"===M||"textarea"===M||"select"===M){var j=e.value,H=e.checked;"radio"!==N.type&&"checkbox"!==N.type&&"submit"!==N.type&&"button"!==N.type&&j?N.value=m({element:e,type:b(e),tagName:M,value:j,maskInputOptions:c,maskInputFn:l}):H&&(N.checked=H)}"option"===M&&(e.selected&&!c.select?N.selected=!0:delete N.selected);if("canvas"===M&&v)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=y in i?i[y]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(N.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){var U=e.toDataURL(h.type,h.quality),W=document.createElement("canvas");W.width=e.width,W.height=e.height,U!==W.toDataURL(h.type,h.quality)&&(N.rr_dataURL=U)}if("img"===M&&p){k||(k=i.createElement("canvas"),E=k.getContext("2d"));var q=e,G=q.crossOrigin;q.crossOrigin="anonymous";var z=function e(){q.removeEventListener("load",e);try{k.width=q.naturalWidth,k.height=q.naturalHeight,E.drawImage(q,0,0),N.rr_dataURL=k.toDataURL(h.type,h.quality)}catch(t){console.warn("Cannot inline img src=".concat(q.currentSrc,"! Error: ").concat(t))}G?N.crossOrigin=G:q.removeAttribute("crossorigin")};q.complete&&0!==q.naturalWidth?z():q.addEventListener("load",z)}if("audio"===M||"video"===M){var $=N;$.rr_mediaState=e.paused?"paused":"played",$.rr_mediaCurrentTime=e.currentTime,$.rr_mediaPlaybackRate=e.playbackRate,$.rr_mediaMuted=e.muted,$.rr_mediaLoop=e.loop,$.rr_mediaVolume=e.volume}I||(e.scrollLeft&&(N.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(N.rr_scrollTop=e.scrollTop));if(T){var Y=e.getBoundingClientRect(),Q=Y.width,X=Y.height;N={class:N.class,rr_width:"".concat(Q,"px"),rr_height:"".concat(X,"px")}}"iframe"!==M||w(N.src)||(e.contentDocument||(N.rr_src=N.src),delete N.src);try{customElements.get(M)&&(n=!0)}catch(K){}return{type:r.Element,tagName:M,attributes:N,childNodes:[],isSVG:Z(e)||void 0,needBlock:T,rootId:C,isCustom:n}}(e,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:u,maskInputOptions:l,maskInputFn:h,dataURLOptions:v,inlineImages:w,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:T,rootId:M});case e.TEXT_NODE:return function(e,t){var n,i=t.needsMask,o=t.maskTextFn,a=t.rootId,s=e.parentNode&&e.parentNode.tagName,u=e.textContent,c="STYLE"===s||void 0,l="SCRIPT"===s||void 0;if(c&&u){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(u=f(e.parentNode.sheet))}catch(d){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(d),e)}u=_(u,F(t.doc))}l&&(u="SCRIPT_PLACEHOLDER");!c&&!l&&u&&i&&(u=o?o(u,e.parentElement):u.replace(/[\S]/g,"*"));return{type:r.Text,textContent:u||"",isStyle:c,rootId:a}}(e,{doc:n,needsMask:s,maskTextFn:d,rootId:M});case e.CDATA_SECTION_NODE:return{type:r.CDATA,textContent:"",rootId:M};case e.COMMENT_NODE:return{type:r.Comment,textContent:e.textContent||"",rootId:M};default:return!1}}function U(e){return void 0===e||null===e?"":e.toLowerCase()}function W(e,t){var n=t.doc,i=t.mirror,o=t.blockClass,a=t.blockSelector,s=t.maskTextClass,u=t.maskTextSelector,f=t.skipChild,h=void 0!==f&&f,p=t.inlineStylesheet,v=void 0===p||p,m=t.maskInputOptions,g=void 0===m?{}:m,y=t.maskTextFn,b=t.maskInputFn,k=t.slimDOMOptions,E=t.dataURLOptions,S=void 0===E?{}:E,x=t.inlineImages,T=void 0!==x&&x,M=t.recordCanvas,N=void 0!==M&&M,A=t.onSerialize,_=t.onIframeLoad,R=t.iframeLoadTimeout,D=void 0===R?5e3:R,O=t.onStylesheetLoad,L=t.stylesheetLoadTimeout,Z=void 0===L?5e3:L,F=t.keepIframeSrcFn,P=void 0===F?function(){return!1}:F,B=t.newlyAddedElement,V=void 0!==B&&B,q=t.needsMask,G=t.preserveWhiteSpace,z=void 0===G||G;!q&&e.childNodes&&(q=j(e,s,u,void 0===q));var $,Y=H(e,{doc:n,mirror:i,blockClass:o,blockSelector:a,needsMask:q,inlineStylesheet:v,maskInputOptions:g,maskTextFn:y,maskInputFn:b,dataURLOptions:S,inlineImages:T,recordCanvas:N,keepIframeSrcFn:P,newlyAddedElement:V});if(!Y)return console.warn(e,"not serialized"),null;$=i.hasNode(e)?i.getId(e):!function(e,t){if(t.comment&&e.type===r.Comment)return!0;if(e.type===r.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&"js"===w(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(U(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===U(e.attributes.name)||"icon"===U(e.attributes.rel)||"apple-touch-icon"===U(e.attributes.rel)||"shortcut icon"===U(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&U(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(U(e.attributes.property).match(/^(og|twitter|fb):/)||U(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===U(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===U(e.attributes.name)||"googlebot"===U(e.attributes.name)||"bingbot"===U(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===U(e.attributes.name)||"generator"===U(e.attributes.name)||"framework"===U(e.attributes.name)||"publisher"===U(e.attributes.name)||"progid"===U(e.attributes.name)||U(e.attributes.property).match(/^article:/)||U(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===U(e.attributes.name)||"yandex-verification"===U(e.attributes.name)||"csrf-token"===U(e.attributes.name)||"p:domain_verify"===U(e.attributes.name)||"verify-v1"===U(e.attributes.name)||"verification"===U(e.attributes.name)||"shopify-checkout-api-token"===U(e.attributes.name)))return!0}}return!1}(Y,k)&&(z||Y.type!==r.Text||Y.isStyle||Y.textContent.replace(/^\s+|\s+$/gm,"").length)?C():I;var Q=Object.assign(Y,{id:$});if(i.add(e,Q),$===I)return null;A&&A(e);var X=!h;if(Q.type===r.Element){X=X&&!Q.needBlock,delete Q.needBlock;var K=e.shadowRoot;K&&d(K)&&(Q.isShadowHost=!0)}if((Q.type===r.Document||Q.type===r.Element)&&X){k.headWhitespace&&Q.type===r.Element&&"head"===Q.tagName&&(z=!1);var J={doc:n,mirror:i,blockClass:o,blockSelector:a,needsMask:q,maskTextClass:s,maskTextSelector:u,skipChild:h,inlineStylesheet:v,maskInputOptions:g,maskTextFn:y,maskInputFn:b,slimDOMOptions:k,dataURLOptions:S,inlineImages:T,recordCanvas:N,preserveWhiteSpace:z,onSerialize:A,onIframeLoad:_,iframeLoadTimeout:D,onStylesheetLoad:O,stylesheetLoadTimeout:Z,keepIframeSrcFn:P};if(Q.type===r.Element&&"textarea"===Q.tagName&&void 0!==Q.attributes.value);else for(var ee=0,te=Array.from(e.childNodes);ee<te.length;ee++){var ne=W(te[ee],J);ne&&Q.childNodes.push(ne)}if(c(e)&&e.shadowRoot)for(var re=0,ie=Array.from(e.shadowRoot.childNodes);re<ie.length;re++){var oe=W(ie[re],J);oe&&(d(e.shadowRoot)&&(oe.isShadow=!0),Q.childNodes.push(oe))}}return e.parentNode&&l(e.parentNode)&&d(e.parentNode)&&(Q.isShadow=!0),Q.type===r.Element&&"iframe"===Q.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(u){return}if("complete"===i){var 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)}else{var s=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&_){var n=W(t,{doc:t,mirror:i,blockClass:o,blockSelector:a,needsMask:q,maskTextClass:s,maskTextSelector:u,skipChild:!1,inlineStylesheet:v,maskInputOptions:g,maskTextFn:y,maskInputFn:b,slimDOMOptions:k,dataURLOptions:S,inlineImages:T,recordCanvas:N,preserveWhiteSpace:z,onSerialize:A,onIframeLoad:_,iframeLoadTimeout:D,onStylesheetLoad:O,stylesheetLoadTimeout:Z,keepIframeSrcFn:P});n&&_(e,n)}}),D),Q.type===r.Element&&"link"===Q.tagName&&"string"===typeof Q.attributes.rel&&("stylesheet"===Q.attributes.rel||"preload"===Q.attributes.rel&&"string"===typeof Q.attributes.href&&"css"===w(Q.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(a){return}if(!r){var o=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(o),i=!0,t()}))}}(e,(function(){if(O){var t=W(e,{doc:n,mirror:i,blockClass:o,blockSelector:a,needsMask:q,maskTextClass:s,maskTextSelector:u,skipChild:!1,inlineStylesheet:v,maskInputOptions:g,maskTextFn:y,maskInputFn:b,slimDOMOptions:k,dataURLOptions:S,inlineImages:T,recordCanvas:N,preserveWhiteSpace:z,onSerialize:A,onIframeLoad:_,iframeLoadTimeout:D,onStylesheetLoad:O,stylesheetLoadTimeout:Z,keepIframeSrcFn:P});t&&O(e,t)}}),Z),Q}function q(e,t){var n=t||{},r=n.mirror,i=void 0===r?new p:r,o=n.blockClass,a=void 0===o?"rr-block":o,s=n.blockSelector,u=void 0===s?null:s,c=n.maskTextClass,l=void 0===c?"rr-mask":c,d=n.maskTextSelector,f=void 0===d?null:d,h=n.inlineStylesheet,v=void 0===h||h,m=n.inlineImages,g=void 0!==m&&m,y=n.recordCanvas,b=void 0!==y&&y,w=n.maskAllInputs,k=void 0!==w&&w,E=n.maskTextFn,S=n.maskInputFn,x=n.slimDOM,I=void 0!==x&&x,C=n.dataURLOptions,T=n.preserveWhiteSpace,M=n.onSerialize,N=n.onIframeLoad,A=n.iframeLoadTimeout,_=n.onStylesheetLoad,R=n.stylesheetLoadTimeout,D=n.keepIframeSrcFn;return W(e,{doc:e,mirror:i,blockClass:a,blockSelector:u,maskTextClass:l,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===k?{password:!0}:k,maskTextFn:E,maskInputFn:S,slimDOMOptions:!0===I||"all"===I?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===I,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===I?{}:I,dataURLOptions:C,inlineImages:g,recordCanvas:b,preserveWhiteSpace:T,onSerialize:M,onIframeLoad:N,iframeLoadTimeout:A,onStylesheetLoad:_,stylesheetLoadTimeout:R,keepIframeSrcFn:void 0===D?function(){return!1}:D,newlyAddedElement:!1})}var G=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function o(){var e={line:n,column:r};return function(t){return t.position=new c(e),m(),t}}var c=(0,u.Z)((function e(i){(0,s.Z)(this,e),this.start=i,this.end={line:n,column:r},this.source=t.source}));c.prototype.content=e;var l=[];function d(i){var o=new Error("".concat(t.source||"",":").concat(n,":").concat(r,": ").concat(i));if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;l.push(o)}function f(){return v(/^{\s*/)}function h(){return v(/^}/)}function p(){var t,n=[];for(m(),g(n);e.length&&"}"!==e.charAt(0)&&(t=T()||M());)t&&(n.push(t),g(n));return n}function v(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function m(){v(/^\s*/)}function g(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e=y();)e&&t.push(e),e=y();return t}function y(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return d("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function b(){for(m();"}"==e[0];)d("extra closing bracket"),e=e.slice(1),m();var t=v(/^(((?<!\\)"(?:\\"|[^"])*"|(?<!\\)'(?:\\'|[^'])*'|[^{])+)/);if(t){var n=t[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"\u200c")}));return function(e){var t,n=[],r="",i=0,o=0,s=null,u=(0,a.Z)(e);try{for(u.s();!(t=u.n()).done;){var c=t.value,l=r.endsWith("\\");s?s!==c||l||(s=null):"("===c?i++:")"===c?i--:"["===c?o++:"]"===c?o--:"'\"".includes(c)&&(s=c),","===c&&0===i&&0===o?(n.push(r),r=""):r+=c}}catch(d){u.e(d)}finally{u.f()}r&&n.push(r);return n}(n).map((function(e){return e.replace(/\u200C/g,",").trim()}))}}function w(){var e=o(),t=v(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=$(t[0]);if(!v(/^:\s*/))return d("property missing ':'");var r=v(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(G,""),value:r?$(r[0]).replace(G,""):""});return v(/^[;\s]*/),i}}function k(){var e,t=[];if(!f())return d("missing '{'");for(g(t);e=w();)!1!==e&&(t.push(e),g(t)),e=w();return h()?t:d("missing '}'")}function E(){for(var e,t=[],n=o();e=v(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),v(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:k()})}var S=C("import"),x=C("charset"),I=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*((?:"+['(?<!\\\\)"(?:\\\\"|[^"])*"',"(?<!\\\\)'(?:\\\\'|[^'])*'","[^;]"].join("|")+")+);");return function(){var n=o(),r=v(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function T(){if("@"===e[0])return function(){var e=o(),t=v(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=v(/^([-\w]+)\s*/)))return d("@keyframes missing name");var r,i=t[1];if(!f())return d("@keyframes missing '{'");for(var a=g();r=E();)a.push(r),a=a.concat(g());return h()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):d("@keyframes missing '}'")}}()||function(){var e=o(),t=v(/^@media *([^{]+)/);if(t){var n=$(t[1]);if(!f())return d("@media missing '{'");var r=g().concat(p());return h()?e({type:"media",media:n,rules:r}):d("@media missing '}'")}}()||function(){var e=o(),t=v(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:$(t[1]),media:$(t[2])})}()||function(){var e=o(),t=v(/^@supports *([^{]+)/);if(t){var n=$(t[1]);if(!f())return d("@supports missing '{'");var r=g().concat(p());return h()?e({type:"supports",supports:n,rules:r}):d("@supports missing '}'")}}()||S()||x()||I()||function(){var e=o(),t=v(/^@([-\w]+)?document *([^{]+)/);if(t){var n=$(t[1]),r=$(t[2]);if(!f())return d("@document missing '{'");var i=g().concat(p());return h()?e({type:"document",document:r,vendor:n,rules:i}):d("@document missing '}'")}}()||function(){var e=o();if(v(/^@page */)){var t=b()||[];if(!f())return d("@page missing '{'");for(var n,r=g();n=w();)r.push(n),r=r.concat(g());return h()?e({type:"page",selectors:t,declarations:r}):d("@page missing '}'")}}()||function(){var e=o();if(v(/^@host\s*/)){if(!f())return d("@host missing '{'");var t=g().concat(p());return h()?e({type:"host",rules:t}):d("@host missing '}'")}}()||function(){var e=o();if(v(/^@font-face\s*/)){if(!f())return d("@font-face missing '{'");for(var t,n=g();t=w();)n.push(t),n=n.concat(g());return h()?e({type:"font-face",declarations:n}):d("@font-face missing '}'")}}()}function M(){var e=o(),t=b();return t?(g(),e({type:"rule",selectors:t,declarations:k()})):d("selector missing")}return Y(function(){var e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:l}}}())}function $(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Y(e,t){for(var n=e&&"string"===typeof e.type,r=n?e:t,i=0,o=Object.keys(e);i<o.length;i++){var a=e[o[i]];Array.isArray(a)?a.forEach((function(e){Y(e,r)})):a&&"object"===typeof a&&Y(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Q={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function X(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var K=/(max|min)-device-(width|height)/,J=new RegExp(K.source,"g"),ee=/([^\\]):hover/,te=new RegExp(ee.source,"g");function ne(e,t){var n=null===t||void 0===t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var r=z(e,{silent:!0});if(!r.stylesheet)return e;var i=[],o=[];!function e(t){"selectors"in t&&t.selectors&&t.selectors.forEach((function(e){ee.test(e)&&i.push(e)})),"media"in t&&t.media&&K.test(t.media)&&o.push(t.media),"rules"in t&&t.rules&&t.rules.forEach(e)}(r.stylesheet);var a=e;if(i.length>0){var s=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return X(e)})).join("|"),"g");a=a.replace(s,(function(e){var t=e.replace(te,"$1.\\:hover");return"".concat(e,", ").concat(t)}))}if(o.length>0){var u=new RegExp(o.filter((function(e,t){return o.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return X(e)})).join("|"),"g");a=a.replace(u,(function(e){return e.replace(J,"$1-$2")}))}return null===t||void 0===t||t.stylesWithHoverClass.set(e,a),a}function re(){return{stylesWithHoverClass:new Map}}function ie(e,t){var n,a=t.doc,c=t.hackCss,l=t.cache;switch(e.type){case r.Document:return a.implementation.createDocument(null,"",null);case r.DocumentType:return a.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case r.Element:var d,f=function(e){var t=Q[e.tagName]?Q[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);e.isSVG?d=a.createElementNS("http://www.w3.org/2000/svg",f):(e.isCustom&&(null===(n=a.defaultView)||void 0===n?void 0:n.customElements)&&!a.defaultView.customElements.get(e.tagName)&&a.defaultView.customElements.define(e.tagName,function(e){(0,i.Z)(n,e);var t=(0,o.Z)(n);function n(){return(0,s.Z)(this,n),t.apply(this,arguments)}return(0,u.Z)(n)}(a.defaultView.HTMLElement)),d=a.createElement(f));var h={};for(var p in e.attributes)if(Object.prototype.hasOwnProperty.call(e.attributes,p)){var v=e.attributes[p];if(("option"!==f||"selected"!==p||!1!==v)&&null!==v)if(!0===v&&(v=""),p.startsWith("rr_"))h[p]=v;else{var m="textarea"===f&&"value"===p,g="style"===f&&"_cssText"===p;if(g&&c&&"string"===typeof v&&(v=ne(v,l)),!m&&!g||"string"!==typeof v)try{if(e.isSVG&&"xlink:href"===p)d.setAttributeNS("http://www.w3.org/1999/xlink",p,v.toString());else if("onload"===p||"onclick"===p||"onmouse"===p.substring(0,7))d.setAttribute("_"+p,v.toString());else{if("meta"===f&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===p){d.setAttribute("csp-content",v.toString());continue}("link"!==f||"preload"!==e.attributes.rel&&"modulepreload"!==e.attributes.rel||"script"!==e.attributes.as)&&("link"===f&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===f&&e.attributes.srcset&&e.attributes.rr_dataURL?d.setAttribute("rrweb-original-srcset",e.attributes.srcset):d.setAttribute(p,v.toString())))}}catch(w){}else d.appendChild(a.createTextNode(v)),e.childNodes=[]}}var y=function(){var t=h[b];if("canvas"===f&&"rr_dataURL"===b){var n=document.createElement("img");n.onload=function(){var e=d.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=t.toString(),d.RRNodeType&&(d.rr_dataURL=t.toString())}else if("img"===f&&"rr_dataURL"===b){var r=d;r.currentSrc.startsWith("data:")||(r.setAttribute("rrweb-original-src",e.attributes.src),r.src=t.toString())}if("rr_width"===b)d.style.width=t.toString();else if("rr_height"===b)d.style.height=t.toString();else if("rr_mediaCurrentTime"===b&&"number"===typeof t)d.currentTime=t;else if("rr_mediaState"===b)switch(t){case"played":d.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":d.pause()}else"rr_mediaPlaybackRate"===b&&"number"===typeof t?d.playbackRate=t:"rr_mediaMuted"===b&&"boolean"===typeof t?d.muted=t:"rr_mediaLoop"===b&&"boolean"===typeof t?d.loop=t:"rr_mediaVolume"===b&&"number"===typeof t&&(d.volume=t)};for(var b in h)y();if(e.isShadowHost)if(d.shadowRoot)for(;d.shadowRoot.firstChild;)d.shadowRoot.removeChild(d.shadowRoot.firstChild);else d.attachShadow({mode:"open"});return d;case r.Text:return a.createTextNode(e.isStyle&&c?ne(e.textContent,l):e.textContent);case r.CDATA:return a.createCDATASection(e.textContent);case r.Comment:return a.createComment(e.textContent);default:return null}}function oe(e,t){var n,i,o=t.doc,s=t.mirror,u=t.skipChild,l=void 0!==u&&u,d=t.hackCss,f=void 0===d||d,h=t.afterAppend,p=t.cache;if(s.has(e.id)){var v=s.getNode(e.id),m=s.getMeta(v);if(i=e,(n=m)&&i&&n.type===i.type&&(n.type===r.Document?n.compatMode===i.compatMode:n.type===r.DocumentType?n.name===i.name&&n.publicId===i.publicId&&n.systemId===i.systemId:n.type===r.Comment||n.type===r.Text||n.type===r.CDATA?n.textContent===i.textContent:n.type===r.Element&&n.tagName===i.tagName&&JSON.stringify(n.attributes)===JSON.stringify(i.attributes)&&n.isSVG===i.isSVG&&n.needBlock===i.needBlock))return s.getNode(e.id)}var g=ie(e,{doc:o,hackCss:f,cache:p});if(!g)return null;if(e.rootId&&s.getNode(e.rootId)!==o&&s.replace(e.rootId,o),e.type===r.Document&&(o.close(),o.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==r.DocumentType&&(e.childNodes[0].type===r.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?o.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):o.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),g=o),s.add(g,e),(e.type===r.Document||e.type===r.Element)&&!l){var y,b=(0,a.Z)(e.childNodes);try{var w=function(){var t=y.value,n=oe(t,{doc:o,mirror:s,skipChild:!1,hackCss:f,afterAppend:h,cache:p});if(!n)return console.warn("Failed to rebuild",t),1;if(t.isShadow&&c(g)&&g.shadowRoot)g.shadowRoot.appendChild(n);else if(e.type===r.Document&&t.type==r.Element){var i=n,a=null;i.childNodes.forEach((function(e){"BODY"===e.nodeName&&(a=e)})),a?(i.removeChild(a),g.appendChild(n),i.appendChild(a)):g.appendChild(n)}else g.appendChild(n);h&&h(n,t.id)};for(b.s();!(y=b.n()).done;)w()}catch(k){b.e(k)}finally{b.f()}}return g}function ae(e,t){var n=t.doc,i=t.onVisit,o=t.hackCss,s=void 0===o||o,u=t.afterAppend,c=t.cache,l=t.mirror,d=void 0===l?new p:l,f=oe(e,{doc:n,mirror:d,skipChild:!1,hackCss:s,afterAppend:u,cache:c});return function(e,t){var n,r=(0,a.Z)(e.getIds());try{for(r.s();!(n=r.n()).done;){var i=n.value;e.has(i)&&t(e.getNode(i))}}catch(o){r.e(o)}finally{r.f()}}(d,(function(e){i&&i(e),function(e,t){var n=t.getMeta(e);if((null===n||void 0===n?void 0:n.type)===r.Element){var i=e;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var a=n.attributes[o];"rr_scrollLeft"===o&&(i.scrollLeft=a),"rr_scrollTop"===o&&(i.scrollTop=a)}}}(e,d)})),f}},1737:function(e,t,n){"use strict";n.d(t,{$1:function(){return v},Cj:function(){return T},E2:function(){return D},Fn:function(){return C},He:function(){return A},IT:function(){return b},OK:function(){return x},P2:function(){return d},WU:function(){return k},_X:function(){return R},_f:function(){return F},fM:function(){return g},gp:function(){return m},jB:function(){return L},md:function(){return _},nF:function(){return w},on:function(){return u},qs:function(){return M},r$:function(){return h},rU:function(){return y},s6:function(){return I},ug:function(){return O},vD:function(){return N},xO:function(){return S},y5:function(){return E},yU:function(){return f},zq:function(){return p}});var r=n(5671),i=n(3144),o=n(2982),a=n(7762),s=n(5512);function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var c="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.",l={map:{},getId:function(){return console.error(c),-1},getNode:function(){return console.error(c),null},removeNodeFromMap:function(){console.error(c)},has:function(){return console.error(c),!1},reset:function(){console.error(c)}};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==n.leading||(i=u);var c=t-(u-i),l=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(l,a)):r||!1===n.trailing||(r=setTimeout((function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(l,a)}),c))}}function f(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),o&&o.set&&o.set.call(this,e)}}),function(){return f(e,t,o||{},!0)}}function h(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"===typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(o){return function(){}}}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(l=new Proxy(l,{get:function(e,t,n){return"map"===t&&console.error(c),Reflect.get(e,t,n)}}));var p=Date.now;function v(e){var t,n,r,i,o,a,s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null===s||void 0===s?void 0:s.documentElement.scrollLeft)||(null===(n=null===(t=null===s||void 0===s?void 0:s.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null===s||void 0===s?void 0:s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null===s||void 0===s?void 0:s.documentElement.scrollTop)||(null===(o=null===(i=null===s||void 0===s?void 0:s.body)||void 0===i?void 0:i.parentElement)||void 0===o?void 0:o.scrollTop)||(null===(a=null===s||void 0===s?void 0:s.body)||void 0===a?void 0:a.scrollTop)||0}}function m(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function g(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function y(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function b(e,t,n,r){if(!e)return!1;var i=y(e);if(!i)return!1;try{if("string"===typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if((0,s.pe)(i,t,r))return!0}catch(o){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function w(e,t){return-1!==t.getId(e)}function k(e,t){return t.getId(e)===s.zi}function E(e,t){if((0,s.Zq)(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||E(e.parentNode,t))}function S(e){return Boolean(e.changedTouches)}function x(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===i)return!0}while(i=i&&i.parentNode);return!1})}function I(e){var t,n={},r=function(e,t){var r={value:e,parent:t,children:[]};return n[e.node.id]=r,r},i=[],o=(0,a.Z)(e);try{for(o.s();!(t=o.n()).done;){var s=t.value,u=s.nextId,c=s.parentId;if(u&&u in n){var l=n[u];if(l.parent){var d=l.parent.children.indexOf(l);l.parent.children.splice(d,0,r(s,l.parent))}else{var f=i.indexOf(l);i.splice(f,0,r(s,null))}}else if(c in n){var h=n[c];h.children.push(r(s,h))}else i.push(r(s,null))}}catch(p){o.e(p)}finally{o.f()}return i}function C(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)C(e.children[n],t)}function T(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function M(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function N(e,t){var n,r,i=null===(r=null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),a=N(i,t),s=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function A(e){return Boolean(null===e||void 0===e?void 0:e.shadowRoot)}function _(e,t){var n=e[t[0]];return 1===t.length?n:_(n.cssRules[t[1]].cssRules,t.slice(2))}function R(e){var t=(0,o.Z)(e),n=t.pop();return{positions:t,index:n}}function D(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}/[1-9][0-9]{12}/.test(Date.now().toString())||(p=function(){return(new Date).getTime()});var O=function(){function e(){(0,r.Z)(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return(0,i.Z)(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){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);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}();function L(e){var t,n,r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function Z(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=L(n);)n=t;return n}(e);return t.contains(n)}function F(e){var t=e.ownerDocument;return!!t&&(t.contains(e)||Z(e))}},1414:function(e,t,n){"use strict";n.d(t,{Et:function(){return a},FX:function(){return s},SA:function(){return u},Y2:function(){return o},tw:function(){return r},yh:function(){return i}});var r=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(r||{}),i=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(i||{}),o=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(o||{}),a=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(a||{}),s=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(s||{}),u=function(e){return e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e}(u||{})}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+"."+{542:"044e26d9",736:"3b0c3434"}[e]+".chunk.js"},n.miniCssF=function(e){return"static/css/"+e+".32598d7d.chunk.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={};n.l=function(t,r,i,o){if(e[t])e[t].push(r);else{var a,s;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var l=u[c];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")=="fe:"+i){a=l;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack","fe:"+i),a.src=t),e[t]=[r];var d=function(n,r){a.onerror=a.onload=null,clearTimeout(f);var i=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((function(e){return e(r)})),n)return n(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n.p="/",function(){if("undefined"!==typeof document){var e=function(e){return new Promise((function(t,r){var i=n.miniCssF(e),o=n.p+i;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var i=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var o=document.getElementsByTagName("style");for(r=0;r<o.length;r++){var a;if((i=(a=o[r]).getAttribute("data-href"))===e||i===t)return a}}(i,o))return t();!function(e,t,n,r,i){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(n){if(o.onerror=o.onload=null,"load"===n.type)r();else{var a=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=a,u.request=s,o.parentNode&&o.parentNode.removeChild(o),i(u)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)}(e,o,null,t,r)}))},t={179:0};n.f.miniCss=function(n,r){t[n]?r.push(t[n]):0!==t[n]&&{736:1}[n]&&r.push(t[n]=e(n).then((function(){t[n]=0}),(function(e){throw delete t[n],e})))}}}(),function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var i,o,a=r[0],s=r[1],u=r[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(u)u(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkfe=self.webpackChunkfe||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e={};n.r(e),n.d(e,{default:function(){return mt}});var t=n(4165),r=n(5861),i=n(603),o=n(9478),a=n(5671),s=n(3144),u=function(){function e(t){if((0,a.Z)(this,e),this.structuralVicinity=void 0,this.visualVicinity=void 0,this.serializedElement=void 0,this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.innerFeatures=void 0,this.staticCandidates=void 0,this.positioning=void 0,this.svgs=void 0,"object"===typeof t)for(var n in t)this[n]=t[n];else if("string"===typeof t){var r=JSON.parse(t);for(var i in r)this[i]=r[i]}}return(0,s.Z)(e,[{key:"serialize",value:function(){return JSON.stringify(this)}}]),e}(),c={attributesToExtract:["class","src","placeholder","href","checked","disabled","contenteditable","draggable","hidden","inputmode","role","title","name","type","readonly","size","required","multiple","min","max","step","maxlength","alt","loop","controls","poster"],structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}},l=n(1413),d=n(7873),f=n(4942),h={rect:["width","height"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],line:["x1","y1","x2","y2"],polygon:["points"],polyline:["points"],path:["d"],text:["x","y"]},p=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.limit=5,this.extractSVG=function(e){return Array.from(e.children).map((function(e){var t=h[e.tagName.toLowerCase()];if(!t)return null;var n=t.reduce((function(t,n){var r=e.getAttribute(n);return(0,l.Z)((0,l.Z)({},t),{},(0,f.Z)({},n,r))}),{});return{tagName:e.tagName.toLowerCase(),attributes:n}})).filter((function(e){return!!e}))}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.matches("svg")?[e]:e.querySelectorAll("svg");if(t.length&&!(t.length>this.limit))return Array.from(t).map(this.extractSVG)}}]),e}(),v=n(458),m=function(e){return(0,v.GF)(e,{useCache:!0}).isHidden},g=function(e,t){var n=e.tagName.toLowerCase();switch(n){case"img":case"video":case"audio":return{type:d.EI.Media,tag:n,src:e.getAttribute("src"),size:{width:e.clientWidth,height:e.clientHeight},screenSize:{width:window.innerWidth,height:window.innerHeight},isRoot:t,isHidden:m(e)};case"svg":return{type:d.EI.SVG,tag:n,components:new p(document).extract(e)[0],isRoot:t,isHidden:m(e)};case"a":return{type:d.EI.Anchor,tag:n,href:e.getAttribute("href"),text:e.innerText,isRoot:t,isHidden:m(e)};case"button":return{type:d.EI.Button,tag:n,text:e.innerText,buttonType:e.getAttribute("type")||"button",isRoot:t,isHidden:m(e)};case"input":return{type:d.EI.Input,tag:n,inputType:e.getAttribute("type"),placeholder:e.getAttribute("placeholder"),isRoot:t,isHidden:m(e)};case"table":case"form":case"textarea":case"iframe":case"select":return{type:d.EI.NoData,tag:n,isRoot:t,isHidden:m(e)}}if(e.innerHTML.trim()===e.innerText&&e.innerHTML.length)return{type:d.EI.Text,tag:n,text:y(e.innerHTML),isRoot:t,isHidden:m(e)}},y=function(e){return e.length>256?e.substring(0,256)+"...":e},b=function(e){return Object.keys(e||{}).reduce((function(t,n){var r=e[n];return r&&(t[n]=r),t}),{})},w=function(e){var t=b(e);return!(!t||!Object.keys(t).length)},k=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord;return i?void 0!==o&&o?e===t||e.startsWith(t)||e.includes(" ".concat(t," "))||e.endsWith(t):e.includes(t):e===t},E=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.elementsByQueryCache={}}return(0,s.Z)(e,[{key:"getElementsByQuery",value:function(e){return this.elementsByQueryCache[e]||(this.elementsByQueryCache[e]=(0,v.RA)(e,this.document)),this.elementsByQueryCache[e]}},{key:"extract",value:function(e){for(var t=this,n=e.element,r=e.setClass,i=e.setAttribute,o=e.getElementsInStructuralVicinity,a=e.getElementsInVisualVicinity,s=function(){var e=n.attributes[u],s=e.name,l=e.value;return c.attributesToExtract.includes(s)?"string"!==typeof l?0:"class"===s?(l.split(" ").forEach((function(e){e.length&&r(e,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,e,{contains:!0,matchWholeWord:!0}))})),0):void i(s,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,l)):0},u=0;u<n.attributes.length;++u)s()}},{key:"processAttribute",value:function(e,t,n){var r=e.element,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=this.getElementsByQuery("*"),u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord,a=void 0!==o&&o;return t=t.replaceAll("\n","\\A ").replaceAll('"','\\"'),i?a?"[".concat(e,'="').concat(t,'"],[').concat(e,'*="').concat(t,' "],[').concat(e,'*=" ').concat(t,' "],[').concat(e,'*=" ').concat(t,'"]'):"[".concat(e,'*="').concat(t,'"]'):"[".concat(e,'="').concat(t,'"]')}(t,n,a),c=this.getElementsByQuery(u),l=this.getElementsByQuery("".concat(r.tagName.toLowerCase())),d=c.filter((function(e){return e.tagName===r.tagName})),f=i?i():[],h=f.filter((function(e){return e.element.attributes[t]&&k(e.element.attributes[t].value,n,a)})),p=o?o():[],v=p.filter((function(e){return e.element.attributes[t]&&k(e.element.attributes[t].value,n,a)}));return{value:n,globalUniqueness:1-c.length/s.length,tagUniqueness:1-d.length/l.length,structuralVicinityUniqueness:i?1-h.length/f.length:void 0,visualVicinityUniqueness:o?1-v.length/p.length:void 0}}}]),e}(),S=function(){function e(t){var n=this;(0,a.Z)(this,e),this.el=null,this.structuralVicinityData=void 0,this.visualVicinityData=void 0,this.serializedElement="",this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.react=void 0,this.innerFeatures=void 0,this.positioning=void 0,this.svgs=void 0,this.attributesExtractor=void 0,this.getElementsInStructuralVicinity=function(){return n.structuralVicinityData.elementsInStructuralVicinity},this.setElementStructuralVicinityData=function(e){n.structuralVicinityData=e},this.setElementVisualVicinityData=function(e){n.visualVicinityData=e},this.getElementsInVisualVicinity=function(){return n.visualVicinityData},this.setSerializedElement=function(e){n.serializedElement=e},this.setAttribute=function(e,t){n.attributes[e]=t},this.setClass=function(e,t){n.classes[e]=t},this.setInnerText=function(e){n.innerText=e},this.setStyle=function(e){n.style=e},this.setTag=function(e){n.tag=e},this.setReact=function(e){n.react=e},this.setInnerFeatures=function(e){n.innerFeatures=e},this.setPositioning=function(e){n.positioning=e},this.setSVGs=function(e){n.svgs=e},this.el=t,this.attributesExtractor=new E(this.el.ownerDocument)}return(0,s.Z)(e,[{key:"serialize",value:function(){}},{key:"getSerializedElement",value:function(){return this.serializedElement}},{key:"element",get:function(){return this.el}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getClasses",value:function(){return this.classes}},{key:"getStyle",value:function(){return this.style}},{key:"getInlineStyle",value:function(){return this.style.inline}},{key:"getComputedStyle",value:function(){return this.style.computed}},{key:"getTag",value:function(){return this.tag}},{key:"getInnerFeatures",value:function(){return this.innerFeatures}},{key:"getInnerText",value:function(){return this.innerText}},{key:"getSVGs",value:function(){return this.svgs}},{key:"toMetadata",value:function(){return{structuralVicinity:this.makeStructuralVicinityMetadata(),visualVicinity:this.makeVisualVicinityMetadata(),serializedElement:this.getSerializedElement(),attributes:this.getAttributes(),classes:this.getClasses(),innerText:this.getInnerText(),tag:this.getTag(),style:this.getStyle(),innerFeatures:this.getInnerFeatures(),staticCandidates:this.extractStaticCandidates(),positioning:this.positioning,svgs:this.getSVGs()}}},{key:"extractStaticCandidates",value:function(){return b({text:this.extractStaticTextCandidate(),labeled:this.extractLabeled(),labeling:this.extractLabeling(),svgTitle:this.extractSVGTitle()})}},{key:"makeVicinityMetadata",value:function(e,t){var n=this;return e.reduce((function(e,r){var i=n.isVicinityQualifiedElement(r.element),o=i.qualified,a=i.feature;if(!o)return e;var s={},u={};n.attributesExtractor.extract({element:r.element,setClass:function(e,t){return s[e]=t},setAttribute:function(e,t){return u[e]=t}});var c=(0,l.Z)({tag:r.element.tagName.toLowerCase(),classes:s,attributes:u,text:n.extractTextForMetadata(r.element),feature:a,relativePosition:n.element.compareDocumentPosition(r.element)},t(r));return e.push(c),e}),[])}},{key:"makeStructuralVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInStructuralVicinity(),(function(e){return{position:e.position}}))}},{key:"makeVisualVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInVisualVicinity(),(function(e){return{position:[e.position],distance:e.distance}}))}},{key:"isVicinityQualifiedElement",value:function(e){if(e===this.element)return{qualified:!1};if(!c.vicinityFeatureElementsOnly)return{qualified:!0};var t=g(e);return{qualified:!!t,feature:t}}},{key:"extractTextForMetadata",value:function(e){if(e.innerHTML===e.innerText){var t=e.innerHTML;return t.length>256?t.substring(0,256)+"...":t}}},{key:"extractStaticTextCandidate",value:function(){var e,t,n;switch(this.tag){case"input":case"textarea":return null===(e=this.attributes)||void 0===e||null===(t=e.placeholder)||void 0===t?void 0:t.value;default:return null===(n=this.innerText)||void 0===n?void 0:n.content}}},{key:"extractLabeling",value:function(){if("label"===this.element.tagName.toLowerCase())return(0,v.C0)(this.element);var e=(0,v.Du)(this.element,"label");if(e&&this.attributeExists(e.getAttribute("for")))return(0,v.C0)(e);try{if(this.element.id&&this.element.id.length)if((0,v.RA)('[aria-labelledby="'.concat(this.element.id,'"]')).length)return(0,v.C0)(this.element)}catch(Et){console.error("extractLabeling error",Et)}}},{key:"extractLabeled",value:function(){var e=this.element.getAttribute("aria-label");if(this.attributeExists(e))return e;var t=(0,v.Du)(this.element,"label");if(t&&!this.attributeExists(t.getAttribute("for")))return(0,v.C0)(t);if(this.element.id&&this.element.id.length)try{var n=(0,v.RA)("label[for=".concat(this.element.id,"]"));if(n.length)return(0,v.C0)(n[0])}catch(Et){return}var r=this.element.getAttribute("aria-labelledby");if(this.attributeExists(r)){var i=(0,v.RA)(r.split(" ").map((function(e){return"#".concat(e)})).join(","));if(i.length)return(0,v.C0)(i[0])}}},{key:"extractSVGTitle",value:function(){try{if("svg"!==this.element.tagName.toLowerCase())return;var e=this.element.querySelector("title");if(!e)return;return(0,v.C0)(e)}catch(Et){console.error("extractSVGTitle error",Et)}}},{key:"attributeExists",value:function(e){return e&&e.length>0}}]),e}(),x=n(2982),I=function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.structuralVicinityData={elementsInStructuralVicinity:[],html:""},this.element=t,this.config=n}return(0,s.Z)(e,[{key:"getInitialLimit",value:function(){switch(this.config.type){case"ratio":return document.querySelectorAll("*").length*this.config.value;case"fixed":return this.config.value}}},{key:"calculate",value:function(){var e=Date.now().toString();return this.structuralVicinityData.html=this.populateStructuralVicinity(this.element,[d.i7.Element],{runId:e,step:0,limit:this.getInitialLimit()}),this.structuralVicinityData.elementsInStructuralVicinity.forEach((function(t){return t.element.attributes.removeNamedItem("checksum-radial-traverse-".concat(e))})),this.structuralVicinityData}},{key:"populateStructuralVicinity",value:function(e,t,n){var r=this,i=n.runId,o=n.step,a=n.limit;if(!e||o>a)return"";if(void 0!==e.attributes["checksum-radial-traverse-".concat(i)])return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute("checksum-radial-traverse-".concat(i),o.toString());var s={runId:i,step:o+1,limit:this.config.useDecayingLimit?a-1:a},u=this.populateStructuralVicinity((0,v.nq)(e),[].concat((0,x.Z)(t),[d.i7.Parent]),s),c=this.populateStructuralVicinity(e.previousElementSibling,[].concat((0,x.Z)(t),[d.i7.LeftSibling]),s),l=this.populateStructuralVicinity(e.nextElementSibling,[].concat((0,x.Z)(t),[d.i7.RightSibling]),s),f=[];(0,v.ZH)(e).map((function(e,n){return f.push(r.populateStructuralVicinity(e,[].concat((0,x.Z)(t),[d.i7.Child]),s))}));var h=c+e.outerHTML.replace(e.innerHTML,f.join(""))+l;return u&&!u.includes(e.outerHTML)?u.replace("></",">".concat(h,"</")):u?u.replace(e.outerHTML,h):h}}]),e}(),C=function(e){return e[e.New=0]="New",e[e.Covered=1]="Covered",e[e.ElementTooBig=2]="ElementTooBig",e[e.Self=3]="Self",e}(C||{}),T=function(){function e(t,n){var r;(0,a.Z)(this,e),this.document=t,this.config=n,this.debug=!1,this.sampleBoxColors=(r={},(0,f.Z)(r,C.New,"green"),(0,f.Z)(r,C.Covered,"orange"),(0,f.Z)(r,C.ElementTooBig,"red"),(0,f.Z)(r,C.Self,"blue"),r)}return(0,s.Z)(e,[{key:"calculate",value:function(e){for(var t=this,n=[],r=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect(),a=o.left-r;a<o.left+o.width+r;a+=i)for(var s=function(){var e=a+i/2,s=u+i/2;if(t.doesRectContain(o,{left:a,top:u,right:a+i,bottom:u+i}))return t.addTrace(e,s,i,C.Self),0;var c=t.document.elementFromPoint(e,s);if(!c)return 0;var l=c.getBoundingClientRect();if(l.width>2*r&&l.height>2*r||t.doesRectContain(l,o))return t.addTrace(e,s,i,C.ElementTooBig),0;if(!!n.find((function(e){return e.element===c})))return t.addTrace(e,s,i,C.Covered),0;var d=t.getPosition(o,l),f=d.position,h=d.distance;n.push({element:c,position:f,distance:h}),t.addTrace(e,s,i,C.New)},u=o.top-r;u<o.top+o.height+r;u+=i)s();return n}},{key:"getPosition",value:function(e,t){var n=this.getCenter(t),r=n.x,i=n.y,o=this.getCenter(e),a=o.x,s=o.y;return{distance:Number(Math.sqrt(Math.pow(a-r,2)+Math.pow(s-i,2)).toFixed(2)),position:function(){var e=r-a,t=i-s;return e<0&&t<0?d.BM.TopLeft:e>0&&t<0?d.BM.TopRight:e<0&&t>0?d.BM.BottomLeft:e>0&&t>0?d.BM.BottomRight:0===e&&t<0?d.BM.Top:0===e&&t>0?d.BM.Bottom:e<0&&0===t?d.BM.Left:e>0&&0===t?d.BM.Right:d.BM.Center}()}}},{key:"getCenter",value:function(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}},{key:"addTrace",value:function(e,t,n,r){if(this.debug){var i=this.document.createElement("xdiv");i.setAttribute("style","position: absolute; width: ".concat(n,"px; height: ").concat(n,"px; top: ").concat(t,"px; left: ").concat(e,"px; background: ").concat(this.sampleBoxColors[r],"; z-index: 999999999999;opacity:0.4")),this.document.getElementsByTagName("body")[0].prepend(i)}}},{key:"doesRectContain",value:function(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}},{key:"doRectsOverlap",value:function(e,t){var n=e.right<t.left,r=e.left>t.right,i=e.top>t.bottom,o=e.top<t.top;return!(n||r||i||o)}}]),e}();window.vve=new T({radius:50,scanStep:10});var M=n(2352);window.resq$=M.resq$,window.resq$$=M.resq$$;var N=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=this.findParentComponent(e,{ignoreBaseElement:!0});return{component:t,parentComponent:this.findParentComponent(t.node)}}},{key:"findParentComponent",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.ignoreBaseElement,i=void 0!==r&&r,o=n.baseElement,a=void 0===o?void 0:o,s=(0,M.resq$$)("*",e.parentElement).find((function(t){return 1===t.children.length&&t.children[0].node===e}));return a=null!==(t=a)&&void 0!==t?t:e,s&&(i||s.node!==a)?this.parseRESQresult(s):this.findParentComponent(e.parentElement,{baseElement:a,ignoreBaseElement:i})}},{key:"parseRESQresult",value:function(e){if(e){return{name:e.name,node:e.node,isFragment:e.isFragment,stateTokens:function e(t){switch(typeof t){case"string":return[t];case"object":return Array.isArray(t)?t.map(e):Object.keys(t)}}(e.state),propsNames:Object.keys(e.props),hasChildren:!!e.children.length}}}}]),e}(),A=new N,_=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){return{component:void 0,parentComponent:void 0}}}]),e}(),R=(new _,function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.provider=A,this.element=t,this.config=n}return(0,s.Z)(e,[{key:"extract",value:function(){return this.provider.extract(this.element)}}]),e}()),D=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.tagBaseComputedStyle={}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.element,n=e.setStyle,r=t.tagName.toLowerCase();if(!this.tagBaseComputedStyle[r]){var i=this.document.createElement(r);this.document.getElementsByTagName("body")[0].prepend(i),this.tagBaseComputedStyle[r]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}n({inline:this.sanitzieStyle(t.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[r],this.sanitzieStyle(window.getComputedStyle(t)))})}},{key:"diffComputedStyle",value:function(e,t){var n,r;return n=e,r=t,Object.keys(r).reduce((function(e,t){return n[t]===r[t]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},t,r[t]))}),{})}},{key:"sanitzieStyle",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).acceptEmptyValue,n=void 0===t||t;return Object.keys(e).reduce((function(t,r){if(!isNaN(r))return t;var i=e[r];return n||i?(t[r]=i,t):t}),{})}}]),e}(),O=n(1209),L=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.cache=void 0,this.makeFeatureNode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:n?e.tagName.toLowerCase():void 0,feature:n?g(e,t):void 0,children:[],isRoot:t}},this.includeRootElements=!0,this.rootElementsTypeExceptions=[d.EI.Text],this.cache=O.J.getInstance("innerFeaturesExtractor",{log:!1})}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=[],n=this.makeFeatureNode(e,!0);return this.walk(e,n,t),t}},{key:"getMapFromCache",value:function(){var e=this.cache.get();return e||(e=new Map,this.cache.set(e)),e}},{key:"getFeatureNodeFromCache",value:function(e){var t=this.getMapFromCache();return t.has(e)?t.get(e):void 0}},{key:"addFeatureNodeToCache",value:function(e,t){var n=this.getMapFromCache();n.set(e,t),this.cache.set(n)}},{key:"walk",value:function(e,t,n){var r=this,i=!1;(0,v.mn)(e).forEach((function(e){var o,a=null!==(o=r.getFeatureNodeFromCache(e))&&void 0!==o?o:r.makeFeatureNode(e),s=r.walk(e,a,n);s&&t.children.push(a),i||(i=s)}));var o=!!t.feature;return!o||t.isRoot&&!this.shouldIncludeRootNode(t)||n.push(t.feature),this.addFeatureNodeToCache(e,t),o||i}},{key:"shouldIncludeRootNode",value:function(e){return!!this.includeRootElements&&!this.rootElementsTypeExceptions.includes(e.type)}}]),e}();window.inner_features_extractor=new L;var Z=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t;return{content:null!==(t=(0,v.C0)(e))&&void 0!==t?t:void 0}}}]),e}(),F=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.bottom,i=t.left,o=t.right,a=document.documentElement.scrollHeight,s=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(n,window.innerHeight),bottom:this.normalize(r,window.innerHeight),left:this.normalize(i,window.innerWidth),right:this.normalize(o,window.innerWidth)}},document:{size:{height:a,width:s},element:{top:this.normalize(n+window.scrollY,a),bottom:this.normalize(r+window.scrollY,a),left:this.normalize(i+window.scrollX,s),right:this.normalize(o+window.scrollX,s)}}}}},{key:"normalize",value:function(e,t){return e/t}}]),e}(),P=n(5034),B=function(){function e(t,n){(0,a.Z)(this,e),this.xmlSerializer=void 0,this.document=void 0,this.config=void 0,this.visualVicinityExtractor=void 0,this.styleExtractor=void 0,this.innerFeaturesExtractor=void 0,this.innerTextExtractor=void 0,this.positioningExtractor=void 0,this.stats={serializeElement:0,populateElementsInStructuralVicinity:0,populateElementsInVisualVicinity:0,extractAttributes:0,extractInnerText:0,extractStyle:0,extractTag:0,extractInnerFeatures:0,extractPositioning:0,extractSVGComponents:0,final:0},this.xmlSerializer=new XMLSerializer,this.document=t,this.config=null!==n&&void 0!==n?n:c,this.visualVicinityExtractor=new T(this.document,this.config.visualVicinity),this.styleExtractor=new D(this.document),this.innerFeaturesExtractor=new L(this.document),this.innerTextExtractor=new Z(this.document),this.positioningExtractor=new F(this.document)}return(0,s.Z)(e,[{key:"isSameDocument",value:function(e){return this.document===e}},{key:"extract",value:function(e){var t=new P.t(e).scrollIntoView(),n=Date.now(),r=new S(e);return this.serializeElement(r),this.stats.serializeElement+=Date.now()-n,n=Date.now(),this.populateElementsInStructuralVicinity(r),this.stats.populateElementsInStructuralVicinity+=Date.now()-n,n=Date.now(),this.populateElementsInVisualVicinity(r),this.stats.populateElementsInVisualVicinity+=Date.now()-n,n=Date.now(),this.extractAttributes(r),this.stats.extractAttributes+=Date.now()-n,n=Date.now(),this.extractInnerText(r),this.stats.extractInnerText+=Date.now()-n,n=Date.now(),this.extractStyle(r),this.stats.extractStyle+=Date.now()-n,n=Date.now(),this.extractTag(r),this.stats.extractTag+=Date.now()-n,n=Date.now(),this.extractInnerFeatures(r),this.stats.extractInnerFeatures+=Date.now()-n,n=Date.now(),this.extractPositioning(r),this.stats.extractPositioning+=Date.now()-n,n=Date.now(),this.extractSVGComponents(r),this.stats.extractSVGComponents+=Date.now()-n,n=Date.now(),t.restore(),this.stats.final+=Date.now()-n,r}},{key:"extractReact",value:function(e){var t=e.element;(0,e.setReact)(new R(t,this.config.react).extract())}},{key:"extractTag",value:function(e){var t=e.element;(0,e.setTag)(t.tagName.toLowerCase())}},{key:"extractPositioning",value:function(e){var t=e.element;(0,e.setPositioning)(this.positioningExtractor.extract(t))}},{key:"extractSVGComponents",value:function(e){var t=e.element;(0,e.setSVGs)(new p(this.document).extract(t))}},{key:"serializeElement",value:function(e){e.element,e.setSerializedElement}},{key:"extractAttributes",value:function(e){var t=e.element,n=e.setClass,r=e.setAttribute,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity;return new E(this.document).extract({element:t,setClass:n,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}},{key:"populateElementsInStructuralVicinity",value:function(e){var t=e.element;(0,e.setElementStructuralVicinityData)(new I(t,this.config.structuralVicinity).calculate())}},{key:"populateElementsInVisualVicinity",value:function(e){var t=e.element;(0,e.setElementVisualVicinityData)(this.visualVicinityExtractor.calculate(t))}},{key:"extractInnerText",value:function(e){var t=e.element;(0,e.setInnerText)(this.innerTextExtractor.extract(t))}},{key:"extractStyle",value:function(e){var t=e.element,n=e.setStyle;return this.styleExtractor.extract({element:t,setStyle:n})}},{key:"extractInnerFeatures",value:function(e){var t=e.element;(0,e.setInnerFeatures)(this.innerFeaturesExtractor.extract(t))}}]),e}(),V=n(136),j=n(7277),H=n(8664),U=n(7762),W=n(7750),q=function(){function e(t,n){var r=this;(0,a.Z)(this,e),this.POSITIONING_SATISFACTORY_SCORE=1,this.processStartTime=void 0,this.targetElementESRAMetadata=void 0,this.targetElementStaticData={},this.esraMetadataExtractor=void 0,this.elementsFiltering=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.qualifiedInnerFeatures=void 0,this.qualifiedInnerText=void 0,this.candidateQueries=[],this.candidates=[],this.uniqueCandidates=[],this.queryCandidates=[],this.interactableCandidates=[],this.rankedCandidates=[],this.filteredAndSortedRankedCandidates=[],this.finalCandidates=[],this.removedCandidates=void 0,this.similarity=void 0,this.weightsSum=0,this.config={innerText:{dropIfMoreThanNCandidates:5},innerFeatures:{mandatoryPercentage:.6,mandatoryMax:6},results:{scorePercentile:.75,epsilon:.01}},this.getSelectionResultForCandidate=function(e){var t=O.J.getInstance("getElementSelectionResult",{log:!1}),n=t.get();if(n||(n=new Map,t.set(n)),n.has(e))return n.get(e);r.checkTimeout();var i=r.extractMetadata(e),o=r.similarity.rank(i),a={score:o.score,candidate:e,scores:o.scores,esraMetadata:i};return n.set(e,a),t.set(n),a},this.targetElementESRAMetadata=t,this.targetElementStaticData=n||t.staticMetadata,this.similarity=new W.k(this.targetElementESRAMetadata),this.esraMetadataExtractor=new B(document)}return(0,s.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"getWeight",value:function(e){return e/this.weightsSum}},{key:"extractMetadata",value:function(e){return new u(this.esraMetadataExtractor.extract(e).toMetadata())}},{key:"getLastSelectionLogs",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;if(null===(e=this.candidates)||void 0===e||!e.length)return{};var n=new XMLSerializer,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return e.slice(0,t).map((function(e){return{score:e.score,metadata:e.metadata,element:n.serializeToString(e.candidate).substring(0,200)}}))},i=this.rankedCandidates[Math.min(this.rankedCandidates.length-1,t)].score,o=function(e){return r(e,t).filter((function(e){return e.score>=i}))};return{candidatesQuery:this.candidateQueries.filter((function(e){return!!e.length})).join(","),totalUniqueCandidates:this.uniqueCandidates.length,topRankingCandidates:r(this.rankedCandidates,t),topRemovedCandidates:{hidden:o(this.removedCandidates.hidden),staticData:o(this.removedCandidates.static)}}}},{key:"selectByPositioning",value:function(){var e=this.targetElementESRAMetadata.positioning;if(window.innerWidth===e.viewport.size.width&&window.innerHeight===e.viewport.size.height){var t=document.elementFromPoint(e.viewport.element.left,e.viewport.element.top),n=this.extractMetadata(t),r=this.similarity.rank(n).score;return r>=this.POSITIONING_SATISFACTORY_SCORE?{candidate:t,score:r,esraMetadata:n}:void 0}}},{key:"collectCandidates",value:function(){this.setQualifiedAttributesQueries(),this.setQualifiedClassesQueries(),this.setInnerFeaturesQueries(),this.candidates=[];var e=this.candidateQueries.filter((function(e){return!!e.length})).join(",");this.queryCandidates=[],e.length&&(this.queryCandidates=(0,v.RA)(e)),this.interactableCandidates=[],this.elementsFiltering!==d.Qy.Query&&(this.interactableCandidates=(0,v.w1)())}},{key:"select",value:function(){var t,n,r=this;console.log("selecting elements, filtering: ",this.elementsFiltering);for(var i,o=function(e){switch(e){case d.Qy.Query:return r.queryCandidates;case d.Qy.Intersection:return r.intersectElements(r.queryCandidates,r.interactableCandidates);case d.Qy.Interactables:return r.interactableCandidates;case d.Qy.All:return r.queryCandidates.concat(r.interactableCandidates)}};this.candidates=o(this.elementsFiltering),!this.candidates.length&&this.elementsFiltering!==d.Qy.All;)console.log("no candidates found, expanding selection to ".concat(d.Qy[this.elementsFiltering+1])),this.elementsFiltering++;(console.log("# of query/interactable/total candidates:",this.queryCandidates.length,this.interactableCandidates.length,this.candidates.length),(t=this.candidates).push.apply(t,(0,x.Z)(this.getInnerTextCandidates())),this.candidates.length)||(i=this.candidates).push.apply(i,(0,x.Z)(this.getTagCandidates()));this.uniqueCandidates=this.candidates.filter((function(e,t,n){return n.indexOf(e)===t}));var a=e.limitChildren;null!==(n=a)&&void 0!==n&&n.length&&(a=a.map((function(e){return(0,l.Z)((0,l.Z)({},e),{},{parent:document.querySelector(e.selector)})})),this.uniqueCandidates=this.uniqueCandidates.filter((function(e){var t,n=(0,U.Z)(a);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.parent&&r.isDescendant(i.parent,e)&&i.limit--<=0)return!1}}catch(o){n.e(o)}finally{n.f()}return!0}))),this.checkTimeout(),this.rankedCandidates=this.uniqueCandidates.filter((function(e){return e instanceof(0,v.GU)(e).HTMLElement})).map(this.getSelectionResultForCandidate).sort((function(e,t){return t.score-e.score})),this.removedCandidates={hidden:[],static:[]},this.filteredAndSortedRankedCandidates=this.rankedCandidates.filter((function(e){var t=r.isHidden(e.candidate),n=t.isHidden,i=t.clickOffset;return!0===n?(r.removedCandidates.hidden.push(e),!1):(i&&(e.clickOffset=i),!(w(r.targetElementStaticData)&&!function(e,t){var n=b(e),r=b(t),i=function(e){return!e||0===Object.keys(e).length};if(i(n)&&i(r))return!0;if(i(n)||i(r))return!1;var o=Object.keys(n).sort(),a=Object.keys(r).sort();if(o.length!==a.length)return!1;if(!o.every((function(e,t){return e===a[t]})))return!1;for(var s in n)if(n[s]!==r[s])return!1;return!0}(r.formatStaticCandidates(e.esraMetadata.staticCandidates),r.targetElementStaticData))||(e.metadata=JSON.stringify(e.esraMetadata.staticCandidates),r.removedCandidates.static.push(e),!1))})),this.checkTimeout(),this.removedCandidates.hidden.slice().reverse().forEach((function(e,t,n){"INPUT"===e.candidate.tagName&&r.filteredAndSortedRankedCandidates.find((function(t){return t.score>.1&&t.candidate.contains(e.candidate)}))&&(r.removedCandidates.hidden.splice(n.length-1-t,1),r.filteredAndSortedRankedCandidates.push(e))})),this.filteredAndSortedRankedCandidates=this.filteredAndSortedRankedCandidates.sort((function(e,t){return t.score-e.score}));var s=this.filteredAndSortedRankedCandidates.length*(1-this.config.results.scorePercentile);this.finalCandidates=[];for(var u=null,c=0;c<this.filteredAndSortedRankedCandidates.length;++c){var f=this.filteredAndSortedRankedCandidates[c];if(c>=s&&(!u||u.score-f.score>this.config.results.epsilon))break;u=f,this.finalCandidates.push(f)}return this.finalCandidates}},{key:"intersectElements",value:function(e,t){var n=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).useElementSize,n=void 0!==t&&t,r=new Set;return e.forEach((function(e){for(var t=2,i=e;i&&t-- >0&&(r.add(i),!(n&&Math.abs(i.parentElement.clientWidth-i.clientWidth)>.3*i.clientWidth&&Math.abs(i.parentElement.clientHeight-i.clientHeight)>.3*i.clientHeight));)i=i.parentElement})),r},r=n(e),i=n(t),o=new Set;return r.forEach((function(e){i.has(e)&&o.add(e)})),Array.from(o)}},{key:"checkTimeout",value:function(){if(e.timeout&&Date.now()-this.processStartTime>e.timeout)throw new $}},{key:"selectOne",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.elementsFiltering,n=void 0===t?d.Qy.Intersection:t,r=e.minSelectionScore,i=void 0===r?.3:r;try{if(this.elementsFiltering=n,this.processStartTime=Date.now(),"html"===this.targetElementESRAMetadata.tag){var o=document.querySelector("html");return{candidate:o,score:1,esraMetadata:this.extractMetadata(o)}}var a=this.selectByPositioning();if(a)return a;for(this.collectCandidates();;){var s=this.select();if(!s.length)break;var u=s[0].score;if(!(u<i&&this.elementsFiltering!==d.Qy.All))return s[0];this.elementsFiltering++,console.log("Best matching element is below threshold (".concat(u,"/").concat(i,"), expanding selection to ").concat(d.Qy[this.elementsFiltering]))}}catch(Et){Et instanceof $?console.error("ESRA selection timeout"):console.error("ESRA selection error",Et)}return{candidate:void 0,score:0,esraMetadata:void 0}}},{key:"getFinalCandidates",value:function(){return this.finalCandidates}},{key:"setQualifiedAttributesQueries",value:function(){var e=this;this.candidateQueries.push(this.similarity.getQualifiedAttributes().map((function(t){return"[".concat(t,'="').concat(e.targetElementESRAMetadata.attributes[t].value,'"]')})).join(","))}},{key:"setQualifiedClassesQueries",value:function(){this.candidateQueries.push(this.similarity.getQualifiedClasses().map((function(e){return".".concat(e)})).join(","))}},{key:"setInnerFeaturesQueries",value:function(){var e=this,t=this.targetElementESRAMetadata.innerFeatures.filter((function(e){return!e.isRoot}));t.length>10&&(t=Object.values(t.reduce((function(e,t){var n="".concat(t.type,"_").concat(t.tag);return e[n]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},n,t))}),{})));var n,r=Math.min(Math.ceil(t.length*this.config.innerFeatures.mandatoryPercentage),this.config.innerFeatures.mandatoryMax),i=(n=t,n.reduce((function(e,t){var n=e.map((function(e){return[].concat((0,x.Z)(e),[t])})).filter((function(e){return e.length<=r}));return e.concat(n)}),[[]])).filter((function(e){return e.length===r}));i.forEach((function(t){var n=[];t.forEach((function(t){return n.push(e.getFeatureSelector(t))})),e.cartesian(n).forEach((function(t){return e.candidateQueries.push("*"+t.map((function(e){return":has(".concat(e,")")})).join(""))}))}))}},{key:"cartesian",value:function(e){if(!e.length)return[];var t=[],n=e.length-1;return function r(i,o){for(var a=0,s=e[o].length;a<s;a++){var u=i.slice(0);u.push(e[o][a]),o===n?t.push(u):r(u,o+1)}}([],0),t}},{key:"getFeatureSelector",value:function(e){var t=[e.tag];switch(e.type){case d.EI.Media:e.src&&t.push("".concat(e.tag,'[src="').concat(e.src,'"]'));break;case d.EI.Anchor:t.push("".concat(e.tag,'[href="').concat(e.href,'"]'));break;case d.EI.Button:break;case d.EI.Input:t.push("".concat(e.tag,'[type="').concat(e.inputType,'"]')),e.placeholder&&t.push("".concat(e.tag,'[placeholder="').concat(e.placeholder,'"]'))}return t}},{key:"getInnerTextCandidates",value:function(){var e=this.similarity.getQualifiedInnerText();if(!e)return[];var t=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).tag,n=void 0===t?"*":t;return(0,v.RA)(n).filter((function(t){var n;return(null===(n=t.innerText)||void 0===n?void 0:n.trim())===e.trim()}))}(e.content);return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}},{key:"getTagCandidates",value:function(){return(0,v.RA)(this.targetElementESRAMetadata.tag)}},{key:"isDescendant",value:function(e,t){return e.contains(t)}},{key:"formatStaticCandidates",value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}},{key:"isHidden",value:function(e){return(0,v.GF)(e,{useCache:!0})}}]),e}();q.limitChildren=void 0,q.timeout=void 0;var G,z,$=function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,"ESRA selection timeout")}return(0,s.Z)(n)}((0,H.Z)(Error)),Y=n(1752),Q=n(1120),X=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"injectSelectorsAndLocators",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,d,f,h,p,v=this,m=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=(r=m.length>1&&void 0!==m[1]?m[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=n.map((function(e){return{container:e,removedAttributes:v.stripNodeAttributes(e.element)}})),u=0;case 3:if(!(u<s.length)){e.next=15;break}return c=s[u],e.next=7,this.getSelectorAndLocator(c.container.element,{testIdSelector:i,searchParentFrames:a,stripAttributes:!1});case 7:d=e.sent,f=d.selector,h=d.locator,p=d.parentFramesSelectors,s[u]=(0,l.Z)((0,l.Z)({},c),{},{selector:f,locator:h,parentFramesSelectors:p});case 12:u++,e.next=3;break;case 15:return s.forEach((function(e){(e.removedAttributes.id||e.removedAttributes.originalClasses)&&v.restoreNodeAttributes(e.container.element,e.removedAttributes)})),e.abrupt("return",s.map((function(e){var t=e.container,n=e.selector,r=e.locator,i=e.parentFramesSelectors;return(0,l.Z)((0,l.Z)({},t),{},{selector:n,locator:r,parentFramesSelectors:i})})));case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stripNodeAttributes",value:function(e){var t,n,r=e;r.id&&(t=r.id,r.removeAttribute("id"));try{if((n=r.getAttribute("class"))&&"string"===typeof n){var i=n.split(" ").filter((function(e){return!e.startsWith("css-")&&!e.startsWith("jss-")})).join(" ");r.setAttribute("class",i)}else n=void 0}catch(Et){return console.warn("[playwright selector generator] error with class filtering",Et),{}}return{id:t,originalClasses:n}}},{key:"restoreNodeAttributes",value:function(e,t){var n=e,r=t.id,i=t.originalClasses;r&&n.setAttribute("id",r),i&&n.setAttribute("class",i)}},{key:"getSelectorAndLocator",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,k,E,S=this,x=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=x.length>1&&void 0!==x[1]?x[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=r.stripAttributes,u=void 0===s||s,c=r.ignoredIframesSelectors,l=void 0===c?[]:c,n){e.next=3;break}return e.abrupt("return",null);case 3:if(d=this.getIframes({ignoredIframesSelectors:l}),!a){e.next=10;break}return e.next=7,this.getParentFramesSelectors(n,d);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=[];case 11:if(f=e.t0,h=n,!(p=this.getTestAttributeSelector(h,i))){e.next=16;break}return e.abrupt("return",{selector:p,locator:'locator("'.concat(p,'")'),parentFramesSelectors:f});case 16:return u&&(g=this.stripNodeAttributes(n),v=g.id,m=g.originalClasses),y="",b="",e.prev=18,e.next=21,window.playwright.generateSelectorAndLocator(n);case 21:w=e.sent,y=w.selector,b=w.locator,e.next=42;break;case 26:if(e.prev=26,e.t1=e.catch(18),(k=n.ownerDocument.defaultView)===window){e.next=42;break}return k.playwright||(k.playwright=window.playwright),e.prev=31,e.next=34,k.playwright.generateSelectorAndLocator(n);case 34:E=e.sent,y=E.selector,b=E.locator,e.next=42;break;case 39:e.prev=39,e.t2=e.catch(31),console.log("get selector and locator error",n.nodeType,n,"\n",e.t1,"\n",e.t2);case 42:return e.prev=42,u&&this.restoreNodeAttributes(n,{id:v,originalClasses:m}),e.finish(42);case 45:return b&&f&&f.length>0&&(b=f.map((function(e){return"frameLocator('".concat(S.escapeSingleQuotes(S.escapeBackslash(e)),"')")})).join(".")+".".concat(b)),e.abrupt("return",{selector:y,locator:b,parentFramesSelectors:f});case 47:case"end":return e.stop()}}),e,this,[[18,26,42,45],[31,39]])})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a=window.top,!(r&&r.length>0)){e.next=22;break}s=(0,U.Z)(r),e.prev=4,s.s();case 6:if((u=s.n()).done){e.next=14;break}return c=u.value,e.next=10,a.playwright.$(c);case 10:l=e.sent,a=l.contentWindow;case 12:e.next=6;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),s.e(e.t0);case 19:return e.prev=19,s.f(),e.finish(19);case 22:return e.next=24,a.playwright.$(n);case 24:o=e.sent,e.next=29;break;case 27:e.prev=27,e.t1=e.catch(0);case 29:return e.abrupt("return",null!==(i=o)&&void 0!==i?i:this.selectOnIframe(n));case 30:case"end":return e.stop()}}),e,this,[[0,27],[4,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}())},{key:"getParentFramesSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.length){e.next=2;break}return e.abrupt("return",[]);case 2:if((i=n.ownerDocument)!==document){e.next=5;break}return e.abrupt("return",[]);case 5:if(o=r.find((function(e){return e.contentDocument===i}))){e.next=8;break}return e.abrupt("return",[]);case 8:return e.next=10,this.getSelectorAndLocator(o,{searchParentFrames:!1});case 10:return a=e.sent,e.t0=[],e.t1=x.Z,e.next=15,this.getParentFramesSelectors(o,r);case 15:return e.t2=e.sent,e.t3=(0,e.t1)(e.t2),e.t4=[a.selector],e.abrupt("return",e.t0.concat.call(e.t0,e.t3,e.t4));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getIframes",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignoredIframesSelectors,t=void 0===e?[]:e,n=function(e){return e.filter((function(e){return!t.some((function(t){return e.matches(t)}))}))},r=O.J.getInstance("playwrightElementSelectorGeneratorIframes",{log:!1});if(r.hasCache())return n(r.get());var i=(0,v.RA)("iframe");return r.set(i),n(i)}},{key:"selectOnIframe",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=document.querySelector("iframe")){e.next=3;break}return e.abrupt("return",void 0);case 3:return(i=r.contentWindow).playwright||(i.playwright=window.playwright),e.prev=5,e.next=8,i.playwright.$(n);case 8:return e.abrupt("return",e.sent);case 11:e.prev=11,e.t0=e.catch(5),console.log("selector error",n);case 14:case"end":return e.stop()}}),e,null,[[5,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getTestAttributeSelector",value:function(e,t){for(var n=0,r=[t].concat(["data-cy","data-testid","data-test-id","data-test"]);n<r.length;n++){var i=r[n];if(i&&e.getAttribute(i)){var o="[".concat(i,"='").concat(e.getAttribute(i),"']");if(1===(0,v.RA)(o).length)return o;if((0,v.RA)(o).length>1){var a=Array.from((0,v.RA)(o)).indexOf(e);return"".concat(o," >> nth=").concat(a)}}}}},{key:"escapeSingleQuotes",value:function(e){return(0,v.ko)(e,"'","\\'")}},{key:"escapeBackslash",value:function(e){return e.replace(/\\/g,"\\\\")}}]),e}(),K=[{selector:'path[d="M17.5 13V15.6667C17.5 16.0203 17.3361 16.3594 17.0444 16.6095C16.7527 16.8595 16.357 17 15.9444 17H5.05556C4.643 17 4.24733 16.8595 3.95561 16.6095C3.66389 16.3594 3.5 16.0203 3.5 15.6667V13"] + path[d="M14.6673 6.92057L10.5007 2.75391L6.33398 6.92057"] + path[d="M10.5 2.75391V12.7539"]',description:"export button"},{selector:'path[d="M16.0893 13.1868C16.6838 12.7754 17.1321 12.1858 17.3697 11.503C17.6072 10.8202 17.6216 10.0796 17.4107 9.38816C17.1999 8.69667 16.7748 8.09007 16.1968 7.65594C15.6187 7.2218 14.9177 6.9826 14.1948 6.97285H12.8308C12.6017 6.20011 12.1996 5.48973 11.6549 4.89565C11.1102 4.30157 10.4374 3.83943 9.68735 3.54431C8.93734 3.24918 8.12995 3.12885 7.32648 3.19244C6.52301 3.25603 5.7446 3.50187 5.05036 3.9113C4.35612 4.32072 3.7643 4.88297 3.31985 5.55533C2.8754 6.22769 2.59001 6.99248 2.48535 7.79164C2.38068 8.59079 2.4595 9.40329 2.71582 10.1674C2.97214 10.9316 3.39921 11.6272 3.96461 12.2016"] + path[d="M10.0273 10.0039V16.8241"] + path[d="M13.0585 13.0351L10.0273 10.0039L6.99609 13.0351"]',description:"import button"},{selector:'path[d="M20.4696 21.5303C20.7625 21.8232 21.2373 21.8232 21.5302 21.5303C21.8231 21.2374 21.8231 20.7626 21.5302 20.4697L20.4696 21.5303ZM17.1802 16.1197C16.8873 15.8268 16.4125 15.8268 16.1196 16.1197C15.8267 16.4126 15.8267 16.8874 16.1196 17.1803L17.1802 16.1197ZM18.25 11C18.25 15.0041 15.0041 18.25 11 18.25V19.75C15.8325 19.75 19.75 15.8325 19.75 11H18.25ZM11 18.25C6.99594 18.25 3.75 15.0041 3.75 11H2.25C2.25 15.8325 6.16751 19.75 11 19.75V18.25ZM3.75 11C3.75 6.99594 6.99594 3.75 11 3.75V2.25C6.16751 2.25 2.25 6.16751 2.25 11H3.75ZM11 3.75C15.0041 3.75 18.25 6.99594 18.25 11H19.75C19.75 6.16751 15.8325 2.25 11 2.25V3.75ZM21.5302 20.4697L17.1802 16.1197L16.1196 17.1803L20.4696 21.5303L21.5302 20.4697Z"]',description:"search"},{selector:'path[d="M3.75 10H16.875"] + path[d="M8.125 5L3.125 10L8.125 15"]',description:"back"},{selector:'path[d="M3.33301 8H12.6663"] + path[d="M8 3.33331L12.6667 7.99998L8 12.6666"]',description:"forward"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"new or Add button"},{selector:'path[d="M10 10.75C10.4142 10.75 10.75 10.4142 10.75 10C10.75 9.58579 10.4142 9.25 10 9.25C9.58579 9.25 9.25 9.58579 9.25 10C9.25 10.4142 9.58579 10.75 10 10.75Z"] + path[d="M15.833 10.75C16.2472 10.75 16.583 10.4142 16.583 10C16.583 9.58579 16.2472 9.25 15.833 9.25C15.4188 9.25 15.083 9.58579 15.083 10C15.083 10.4142 15.4188 10.75 15.833 10.75Z"] + path[d="M4.16699 10.75C4.58121 10.75 4.91699 10.4142 4.91699 10C4.91699 9.58579 4.58121 9.25 4.16699 9.25C3.75278 9.25 3.41699 9.58579 3.41699 10C3.41699 10.4142 3.75278 10.75 4.16699 10.75Z"]',description:"open menu"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"add filter"},{selector:'path[d="M15 5L5 15"] + path[d="M5 5L15 15"]',description:"close or remove"},{selector:'path[d="M4 6L8 10L12 6"]',description:"open or close dropdown"},{selector:'path[d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"] + path[d="M12.5 7.5L7.5 12.5"] + path[d="M7.5 7.5L12.5 12.5"]',description:"clear input"},{selector:'path[d="M3.33301 5.49054H4.81449H16.6663"] + path[d="M7.14286 5.49999V3.99999C7.14286 3.60216 7.29337 3.22063 7.56128 2.93932C7.82919 2.65802 8.19255 2.49998 8.57143 2.49998H11.4286C11.8075 2.49998 12.1708 2.65802 12.4387 2.93932C12.7066 3.22063 12.8571 3.60216 12.8571 3.99999V5.49999M15 5.49999V16C15 16.3978 14.8495 16.7793 14.5816 17.0607C14.3137 17.342 13.9503 17.5 13.5714 17.5H6.42857C6.04969 17.5 5.68633 17.342 5.41842 17.0607C5.15051 16.7793 5 16.3978 5 16V5.49999H15Z"] + path[d="M8.33203 9.23726V13.4039"] + path[d="M11.666 9.23726V13.4039"]',description:"delete"},{selector:'path[d="M13.3334 4L6.00008 11.3333L2.66675 8"]',description:"checked"},{selector:'path[d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"]',description:"downward-pointing arrow"},{selector:'path[d="M18.0893 3.08926C18.4147 2.76382 18.4147 2.23618 18.0893 1.91074C17.7638 1.58531 17.2362 1.58531 16.9107 1.91074L18.0893 3.08926ZM9.41074 9.41074L8.82149 10L10 11.1785L10.5893 10.5893L9.41074 9.41074ZM16.9107 1.91074L9.41074 9.41074L10.5893 10.5893L18.0893 3.08926L16.9107 1.91074Z"] + path[d="M17.5 2.5L12.25 17.5L9.25 10.75L2.5 7.75L17.5 2.5Z"]',description:"send"}],J=function(){function e(){(0,a.Z)(this,e),this.observer=void 0,this.monitoringPeriodTimeout=void 0,this.flashingTextElements=[]}return(0,s.Z)(e,[{key:"start",value:function(){var e=this;this.stop(),this.flashingTextElements=[],this.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.length>0&&t.addedNodes.forEach((function(t){t instanceof HTMLElement&&e.includeElement(t)&&setTimeout((function(){e.flashingTextElements.push(e.processTextElements(t))}),1e3)}))}))})),this.observer.observe(document.body,{childList:!0,subtree:!0}),this.monitoringPeriodTimeout=setTimeout((function(){e.stop()}),3e5)}},{key:"stop",value:function(){this.monitoringPeriodTimeout&&(clearTimeout(this.monitoringPeriodTimeout),this.monitoringPeriodTimeout=null),this.observer&&(this.observer.disconnect(),this.observer=null)}},{key:"get",value:function(){var e=this.flashingTextElements.map((function(e){return e.filter((function(e){return!e.isConnected||(0,v.GF)(e.parentElement).isHidden}))})).filter((function(e){return e.length})).map((function(e){return"<span>".concat(e.map((function(e){return e.textContent})).join("</span><span>"),"</span>")})),t=new Set(e);return Array.from(t)}},{key:"stopAndGet",value:function(){return this.stop(),this.get()}},{key:"includeElement",value:function(e){return!(e.getElementsByTagName("*").length>50)&&!(e.outerHTML.length>5e3)}},{key:"processTextElements",value:function(e){for(var t,n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),r=[];t=n.nextNode();)(0,v.GF)(t.parentNode).isHidden||r.push(t);return r}}]),e}(),ee=function(){function e(t){(0,a.Z)(this,e),this.counter=void 0,this.counter=null!==t&&void 0!==t?t:"0"}return(0,s.Z)(e,[{key:"increment",value:function(){for(var e=this.counter.length-1;e>=0;){var t=this.counter[e];if("9"===t)return void(this.counter=this.replaceAt(this.counter,e,"a"));if("z"!==t)return void(this.counter=this.replaceAt(this.counter,e,String.fromCharCode(t.charCodeAt(0)+1)));if(this.counter=this.replaceAt(this.counter,e,"0"),0===e)return void(this.counter="1"+this.counter);e--}}},{key:"get",value:function(){return this.counter}},{key:"incrementAndGet",value:function(){return this.increment(),this.get()}},{key:"getAndIncrement",value:function(){var e=this.get();return this.increment(),e}},{key:"replaceAt",value:function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)}}]),e}(),te="checksum-ignore",ne=.7,re=function(e,t){var n=t.forceIncludeAttribute,r=t.forceIncludeFileInput,i=t.forceIncludeElements,o=t.limit;e.excludedElements=new Set;var a=e.element,s=null!==o&&void 0!==o?o:Math.min(Math.ceil(.5*a.children.length),a.children.length-20),u=function(t){var n=0,r=ie(t);r.length>=e.attributes.length&&n++;var i=r.filter((function(t){return e.attributes.includes(t)})).length;i===e.attributes.length?n+=3:i>0&&n++;var o=oe(t).filter((function(t){return e.classes.includes(t)})).length;return o===e.classes.length?n+=2:o>0&&n++,n},c=Array.from(a.children).filter((function(t){return t.tagName===e.tagName&&!function(e){return!(!n||!(e.hasAttribute(n)||Array.from(e.querySelectorAll("[".concat(n,"]"))).length>0))||!(!r||"input"!==e.tagName.toLowerCase()||"file"!==e.type)||i.includes(e)}(t)})).map((function(e){return{element:e,score:u(e)}})).sort((function(e,t){return t.score-e.score})),l=c.reduce((function(e,t){var n=t.element;return(0,v.PZ)((0,v.m7)(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(n):e.outOfViewportElements.push(n),e}),{inViewportElements:[],outOfViewportElements:[]}),d=l.inViewportElements,f=function(t){var n,r=(0,U.Z)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e.excludedElements.add(i),e.excludedElements.size===s)return!0}}catch(o){r.e(o)}finally{r.f()}};return f(l.outOfViewportElements)||f(d),e.excludedElements.forEach((function(e){e.setAttribute(te,"")})),Array.from(e.excludedElements)};function ie(e){return Array.from(e.attributes).filter((function(e){return!e.name.startsWith("checksum")})).map((function(e){return e.name.replace(/[0-9]/g,"")}))}function oe(e){var t,n;return null!==(t=null===(n=e.className)||void 0===n?void 0:n.split(" ").filter((function(e){return e})))&&void 0!==t?t:[]}function ae(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).nodeRepetitionsThreshold,n=void 0===t?20:t;try{return console.time("bettertemplatize"),G=new Set,se(e,n),console.timeEnd("bettertemplatize"),console.log("[bettertemplatize] templates found:",Array.from(G)),Array.from(G)}catch(r){return console.error("[bettertemplatize] failed during template processing:",r.message),[]}}function se(e,t){Array.from(e.children).forEach((function(e){if(!(e instanceof SVGElement)){var n=e.children.length;if(n>=t)for(var r=0,i=Array.from(e.children),o=Math.ceil(n*ne),a=0;a<n;a++)for(var s=a+1;s<n;s++)try{if(fe(i[a],i[s])&&++r>=o)return void G.add((0,l.Z)({element:e},z))}catch(u){return}se(e,t)}}))}var ue=.8,ce=.5,le=.8,de=5;function fe(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=function(t){return t&&(z={attributes:n,classes:r,tagName:e.nodeName}),t};if(e.nodeType!==t.nodeType)return o(!1);if(e instanceof SVGElement||t instanceof SVGElement)return o(!1);if(e.nodeType===Node.TEXT_NODE)return o(!0);if(e.nodeType!==Node.ELEMENT_NODE)return o(!1);var a=e,s=t;if(a.tagName.toLowerCase()!==s.tagName.toLowerCase())return o(!1);var u=ie(a),c=ie(s);if((n=u.filter((function(e){return c.includes(e)}))).length/Math.max(u.length,c.length)<ue)return o(!1);var l=oe(a),d=oe(s);if((r=l.filter((function(e){return d.includes(e)}))).length/Math.max(l.length,d.length)<ce)return o(!1);if(i>=de)return o(!0);if(a.shadowRoot&&!s.shadowRoot||!a.shadowRoot&&s.shadowRoot)return o(!1);var f=Array.from(a.shadowRoot?a.shadowRoot.children:a.children),h=Array.from(s.shadowRoot?s.shadowRoot.children:s.children);if(0===f.length&&0===h.length)return o(!0);for(var p=0,v=0;v<Math.min(f.length,h.length);v++)fe(f[v],h[v],i+1)&&p++;return p/Math.max(f.length,h.length)<le?o(!1):o(!0)}var he,pe=function(e){return e.ARIA_LABEL="aria-label",e.TEXT="text",e}({}),ve=function(e){return e.SVG="svg",e}(ve||{}),me={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},ge=function(){function e(){(0,a.Z)(this,e),this.interactableElements=void 0,this.nonInteractableElementsFromSimplifiedDom=void 0,this.interactableElementsFromSimplifiedDom=void 0,this.elementsInSimplifiedDomByChecksumId=void 0,this.selectors=void 0,this.flashingElementsDetector=new J,this.forceIncludeElements=[],this.preMapReducedHTMLSelectors=!0,this.templateNodes=void 0,this.nodeRepetitionsThreshold=void 0,this.reducePercentage=50,this.checksumIdCounter=new ee}return(0,s.Z)(e,[{key:"preprocessDocument",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;(0,v.Ey)("[preprocessDocument] querySelectorAllExtended");var t=(0,v.RA)("*",e,{includeHTML:!0});(0,v.MX)("[preprocessDocument] querySelectorAllExtended"),(0,v.Ey)("[preprocessDocument] isElementHidden");var n,r=(0,U.Z)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!this.shouldIgnoreElement(i)){var o=(0,v.GF)(i,me);i.setAttribute("checksum-data-visible",o.isHidden||o.isTransparent?"false":"true"),!o.isHidden&&o.isTransparent&&i.setAttribute("checksum-data-transparently-visible","true"),o.isBehindTransparentElement&&i.setAttribute("checksum-data-visible-under-transparent-element","true"),o.clickOffset&&i.setAttribute("checksum-data-click-offset","".concat(o.clickOffset.x,";").concat(o.clickOffset.y))}}}catch(a){r.e(a)}finally{r.f()}(0,v.MX)("[preprocessDocument] isElementHidden")}},{key:"markInteractableElements",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.forceIncludeAttribute,o=r.forceIncludeFileInput;(0,v.Ey)("[markInteractableElements]"),this.interactableElements=[];var a=(0,v.w1)(n,e,{allowDisabled:!0,excludeCrossOriginIframes:!1}),s=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;if(!t.shouldIgnoreElement(e)){var o,a,s=null===(n=e.getAttribute("checksum-data-click-offset"))||void 0===n?void 0:n.split(";"),u=s&&{x:parseInt(s[0]),y:parseInt(s[1])},c=(a=i,(o=e)._checksumid||(o._checksumid=null!==a&&void 0!==a?a:t.checksumIdCounter.getAndIncrement()),o.setAttribute("checksumid",o._checksumid),o.setAttribute("checksuminteractable","true"),o._checksumid);t.interactableElements.push({checksumId:c,element:e,forced:r,clickOffset:u})}};a.forEach((function(e){return s(e)}));var u=function(e){(0,v.RA)(e,n,{includeHTML:!0}).forEach((function(e){return s(e,!0)}))};i&&u("[".concat(i,"]")),o&&u("input[type='file']"),this.forceIncludeElements.filter((function(e){var t=e.element;return null===t||void 0===t?void 0:t.isConnected})).forEach((function(e){var t=e.element,n=e.checksumid;return s(t,!0,n)})),console.log("Marked ".concat(this.interactableElements.length," interactable elements")),(0,v.MX)("[markInteractableElements]")}},{key:"truthyFilter",value:function(e){return Boolean(e)}},{key:"shouldIgnoreElement",value:function(e){return e.hasAttribute(te)}},{key:"generateSimplifiedDom",value:function(e){var t,n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=a.checkElementInstanceType,u=void 0===s||s,c=a.forceIncludeAttribute,l=void 0===c?void 0:c,d=a.forceIncludeFileInput,f=void 0!==d&&d,h=a.svgIntegration,p=void 0===h?pe.ARIA_LABEL:h,m=a.onForceIncludeElement,g=void 0===m?void 0:m,y=a.contentWindow,b=void 0===y?window:y,w=a.assignChecksumIdsToAllElements,k=void 0===w||w;if(!e)return null;var E,S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e._originalNode=t,k&&(0,v.m7)(e,"Element")&&(0,v.m7)(t,"Element")&&!t.hasAttribute("checksumid")){var n=e,i=t;i._checksumid||(i._checksumid=r.checksumIdCounter.getAndIncrement()),n.setAttribute("checksumid",i._checksumid),r.nonInteractableElementsFromSimplifiedDom.push({checksumId:i._checksumid,element:i})}return e},x=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return S(document.createTextNode(t),n)},I=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return S(document.createElement(t),n)};if(e.nodeType===Node.ELEMENT_NODE){var C=e;if("head"===C.tagName.toLowerCase())return null;if(this.shouldIgnoreElement(C))return null}if(e.nodeType===Node.TEXT_NODE)return e.parentElement&&("false"!==e.parentElement.getAttribute("checksum-data-visible")||e.parentElement.hasAttribute("checksumid"))?"body"===e.parentElement.tagName.toLowerCase()?null:null!==(E=e.textContent)&&void 0!==E&&E.trim()?x(e.textContent+" "):null:null;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(u&&!(0,v.m7)(e,"HTMLElement")&&!(0,v.m7)(e,"SVGElement"))return null;var T=e,M="iframe"===T.tagName.toLowerCase()&&T.contentDocument,N=(0,v.mn)(M?T.contentDocument.documentElement:T,{flattenShadowRootChildren:!0});null===(t=o.esraSelectionRules)||void 0===t||null===(n=t.limitChildren)||void 0===n||n.forEach((function(e){T.matches(e.selector)&&N.length>e.limit&&N.splice(e.limit)}));var A=N.map((function(e){return r.generateSimplifiedDom(e,i,o,{checkElementInstanceType:u,forceIncludeAttribute:l,forceIncludeFileInput:f,svgIntegration:p,onForceIncludeElement:g,contentWindow:M?T.contentWindow:b,assignChecksumIdsToAllElements:k})})).filter(this.truthyFilter),_="false"!==T.getAttribute("checksum-data-visible"),R=T.hasAttribute("checksumid"),D=T.hasAttribute("role"),O=this.getElementCustomDescription(T,{enableSVGCustomDescription:!!p}),L=O.customDescription,Z=O.customDescriptionTarget,F=!!L,P=T.hasAttribute("aria-label")||T.hasAttribute("name")||T.hasAttribute("alt"),B=this.forceIncludeElements.map((function(e){return e.element})).includes(T)||!!l&&T.hasAttribute(l)||f&&"input"===T.tagName.toLowerCase()&&"file"===T.getAttribute("type"),V=R||_&&(D||P||F||T.matches(["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"].join(",")));if(!(V||B)){if(!A.length)return null;if(1===A.length&&!(0,v.m7)(A[0],"Text"))return A[0]}!V&&B&&(null===g||void 0===g||g(T));var j=function(){if(F&&Z===ve.SVG)switch(p){case pe.ARIA_LABEL:var e=I("svg");return e.setAttribute("aria-label",L),{simplifiedNode:e,appendChildren:!1};case pe.TEXT:if(T.hasAttribute("checksumid")){var t=I("div");return t.innerText=L,{simplifiedNode:t,appendChildren:!1}}return{simplifiedNode:x(" [".concat(L,"] ")),appendChildren:!1}}var n="body"===T.tagName.toLowerCase()&&T.ownerDocument!==document?"div":T.tagName;return{simplifiedNode:I(n)}}(),H=j.simplifiedNode,W=j.appendChildren,q=void 0===W||W;if(!(0,v.m7)(H,"Element"))return H;var G,z=H,$=["aria-.+","data-name","name","type","placeholder","content","value","role","icon","title","checksumid","checksuminteractable","checked","disabled","selected","label","required","inputmode","min","max","step","minlength","maxlength","alt","hidden","draggable","ondrop","ondragover","contenteditable","href","(data-)?test(-)?id"].concat(i),Y=T.attributes,Q=(0,U.Z)(Y);try{for(Q.s();!(G=Q.n()).done;){var X,K=G.value,J=(0,U.Z)($);try{for(J.s();!(X=J.n()).done;){var ee,te=X.value;if(new RegExp("^"+te+"$").test(K.name))z.setAttribute(K.name,null===(ee=K.value)||void 0===ee||ee)}}catch(re){J.e(re)}finally{J.f()}}}catch(re){Q.e(re)}finally{Q.f()}if(T.isContentEditable?z.setAttribute("contenteditable","true"):["TEXTAREA","INPUT","SELECT"].includes(T.tagName)||"text"!==window.getComputedStyle(T).cursor||z.setAttribute("contenteditable","cursor-text"),(0,v.m7)(T,"HTMLInputElement")&&"checkbox"===T.getAttribute("type"))T.checked&&z.setAttribute("checked","true");else if((0,v.m7)(T,"HTMLInputElement")||(0,v.m7)(T,"HTMLSelectElement"))z.setAttribute("value",T.value);else if((0,v.m7)(T,"HTMLTextAreaElement")&&!T.childNodes.length&&T.value){var ne=x(T.value);z.appendChild(ne)}return q&&A.forEach((function(e){return z.appendChild(e)})),z}},{key:"getElementCustomDescription",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).enableSVGCustomDescription,n=void 0===t||t;return((0,v.m7)(e,"SVGElement")||"svg"===e.tagName.toLowerCase())&&n?{customDescriptionTarget:ve.SVG,customDescription:this.getSVGDescriptionForElement(e)}:{}}},{key:"getSVGDescriptionForElement",value:function(e){var t=this.findSvgElementDescriptionFromBank(e);if(t)return t;var n=e.querySelector("title");return n?n.textContent:void 0}},{key:"findSvgElementDescriptionFromBank",value:function(e){var t;return null===(t=this.getSvgBank().find((function(t){return e.matches("svg:has(".concat(t.selector,")"))})))||void 0===t?void 0:t.description}},{key:"getSvgBank",value:function(){return K}},{key:"restoreDom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;(0,v.RA)("*",e).forEach((function(e){e.removeAttribute("checksum-data-visible"),e.removeAttribute("checksum-data-transparently-visible"),e.removeAttribute("checksum-data-visible-under-transparent-element"),e.removeAttribute("checksumid"),e.removeAttribute("checksuminteractable"),e.removeAttribute("checksum-data-click-offset"),e.removeAttribute(te)}))}},{key:"removeAttribute",value:function(e){(0,v.RA)("*",document).forEach((function(t){t.removeAttribute(e)}))}},{key:"mapAndStoreSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},r=new X,e.t0=U.Z,e.next=5,r.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom);case 5:e.t1=e.sent,i=(0,e.t0)(e.t1),e.prev=7,i.s();case 9:if((o=i.n()).done){e.next=18;break}if(a=o.value,s=a.checksumId,u=a.element,c=a.clickOffset,l=a.selector,d=a.locator,f=a.parentFramesSelectors,l){e.next=14;break}return console.warn("Unable to get selector for element",u),e.abrupt("continue",16);case 14:h=u,n[s]={element:h,selector:l,locator:d,clickOffset:c,parentFramesSelectors:f,innerText:h.innerText};case 16:e.next=9;break;case 18:e.next=23;break;case 20:e.prev=20,e.t2=e.catch(7),i.e(e.t2);case 23:return e.prev=23,i.f(),e.finish(23);case 26:return e.abrupt("return",n);case 27:case"end":return e.stop()}}),e,this,[[7,20,23,26]])})));return function(){return e.apply(this,arguments)}}()},{key:"shouldFurtherReduce",value:function(e){return!e||e.outerHTML.length>16e3}},{key:"getRepeatingElementsToExclude",value:function(e,t,n){if(e.length<=t)return[];var r=t,i=e.reduce((function(e,t){var n=t._originalNode;return(0,v.PZ)((0,v.m7)(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(t):e.outOfViewportElements.push(t),e}),{inViewportElements:[],outOfViewportElements:[]}),o=i.inViewportElements,a=i.outOfViewportElements,s=[],u=function(e){var t,i,o=(0,U.Z)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(i=a,n&&(i.hasAttribute(n)||Array.from(i.querySelectorAll("[".concat(n,"]"))).length>0)||s.push(a),s.length===r)return!0}}catch(u){o.e(u)}finally{o.f()}};return u(a)||u(o),s}},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,k,E,S,I,C,T,M,N,A,_,R,D,L,Z,F=this,P=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=P.length>1&&void 0!==P[1]?P[1]:{}).checkElementInstanceType,o=void 0===i||i,a=r.extraAllowedAttributes,s=void 0===a?[]:a,u=r.maintainSelectorsMapping,c=void 0===u||u,l=r.initialChecksumId,d=void 0===l?"0":l,f=r.forceIncludeAttribute,h=r.forceIncludeFileInput,p=void 0!==h&&h,v=r.invalidateCache,m=void 0!==v&&v,g=r.svgIntegration,y=void 0===g?pe.ARIA_LABEL:g,b=r.includeFlashingElements,w=void 0===b||b,k=r.onForceIncludeElement,E=r.limitNodeRepetitions,S=void 0===E?50:E,I=r.stopFlashingElementsDetection,C=void 0!==I&&I,T=r.assignChecksumIdsToAllElements,M=void 0===T||T,N=P.length>2&&void 0!==P[2]?P[2]:document,console.time("reduceHTML"),!(A=O.J.getInstance("reduce",{target:N,monitorInput:!0,invalidate:m,log:!1})).hasCache()){e.next=6;break}return e.abrupt("return",A.get());case 6:_=w?this.flashingElementsDetector.get():void 0,C&&this.flashingElementsDetector.stop(),this.nodeRepetitionsThreshold=S,this.reducePercentage=50,this.templateNodes=void 0,R=function(e){return re(e,{forceIncludeAttribute:f,forceIncludeFileInput:p,forceIncludeElements:F.forceIncludeElements.map((function(e){return e.element})),limit:Math.min(Math.ceil(e.element.children.length*(F.reducePercentage/100)),e.element.children.length-6)})},console.log("Running pre-templatize"),this.templatize(R),console.log("Preprocessing document..."),this.preprocessDocument(N),this.checksumIdCounter=new ee(null!==d&&void 0!==d?d:"0");case 17:if(console.log("Marking interactable elements..."),this.markInteractableElements(n,N,{forceIncludeAttribute:f,forceIncludeFileInput:p}),console.log("Generating simplified DOM..."),this.nonInteractableElementsFromSimplifiedDom=[],D=this.generateSimplifiedDom(N.documentElement,s,n,{checkElementInstanceType:o,forceIncludeAttribute:f,forceIncludeFileInput:p,svgIntegration:y,onForceIncludeElement:k,assignChecksumIdsToAllElements:M})){e.next=25;break}throw new Error("Unable to get simplified DOM");case 25:if(!this.shouldFurtherReduce(D)){e.next=33;break}if(console.log("Will further reduce (".concat(D.outerHTML.length,")...")),this.templatize(R)){e.next=30;break}return console.log("Exceeded maximum html reduction, stopping (html size: ".concat(D.outerHTML.length,")")),e.abrupt("break",36);case 30:this.removeAttribute("checksumid"),e.next=34;break;case 33:return e.abrupt("break",36);case 34:e.next=17;break;case 36:if(console.log("Simplified DOM generated, length:",D.outerHTML.length),L=new Set(Array.from(D.querySelectorAll("[checksumid]")).map((function(e){return e.getAttribute("checksumid")}))),this.interactableElementsFromSimplifiedDom=this.interactableElements.filter((function(e){return L.has(e.checksumId)})),console.log("Found ".concat(this.interactableElementsFromSimplifiedDom.length," interactable elements in simplified DOM vs ").concat(this.interactableElements.length," in original DOM")),console.log("Restoring DOM..."),this.restoreDom(N),this.preMapReducedHTMLSelectors=!!n.preMapReducedHTMLSelectors,!this.preMapReducedHTMLSelectors||!c){e.next=49;break}return console.log("Mapping selectors..."),e.next=47,this.mapAndStoreSelectors();case 47:this.selectors=e.sent,console.log("Done mapping selectors");case 49:return this.elementsInSimplifiedDomByChecksumId=[].concat((0,x.Z)(this.interactableElementsFromSimplifiedDom),(0,x.Z)(this.nonInteractableElementsFromSimplifiedDom)).reduce((function(e,t){return e[t.checksumId]=t,e}),{}),Z={reducedDomHTMLElement:D,reducedHTML:D.outerHTML,currentChecksumId:this.checksumIdCounter.get(),flashingHTML:_},A.set(Z),console.timeEnd("reduceHTML"),e.abrupt("return",Z);case 54:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"templatize",value:function(e){if(this.templateNodes)if(this.reducePercentage<98)this.reducePercentage=Math.min(this.reducePercentage+20,98),console.log("Increasing reduce percentage to",this.reducePercentage);else{if(this.nodeRepetitionsThreshold<=20)return!1;this.reducePercentage=50;var t=this.templateNodes.length;do{this.nodeRepetitionsThreshold-=10,console.log("Reducing node repetitions threshold to",this.nodeRepetitionsThreshold),this.templateNodes=ae(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold})}while(this.templateNodes.length===t&&this.nodeRepetitionsThreshold>20)}else if(this.templateNodes=ae(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold}),0===this.templateNodes.length)return this.templatize(e);var n=Array.from(this.templateNodes).reduce((function(t,n){return t+e(n).length}),0);return console.log("[templatize] ".concat(n," elements marked to ignore for ").concat(this.templateNodes.length," templates")),!0}},{key:"getSelectorForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(h.length>1&&void 0!==h[1]?h[1]:{}).forceGenerate,o=void 0!==i&&i,a={selector:n,element:null,innerText:"",locator:"",parentFramesSelectors:[]},this.preMapReducedHTMLSelectors&&!o){e.next=14;break}if(s=new X,u=this.elementsInSimplifiedDomByChecksumId[n]){e.next=7;break}return e.abrupt("return",a);case 7:return e.next=9,s.getSelectorAndLocator(u.element);case 9:return c=e.sent,l=c.selector,d=c.locator,f=c.parentFramesSelectors,e.abrupt("return",{element:u.element,selector:l,locator:d,clickOffset:u.clickOffset,parentFramesSelectors:f,innerText:u.element.innerText});case 14:if(this.selectors[n]||o){e.next=16;break}return e.abrupt("return",this.getSelectorForChecksumId(n,{forceGenerate:!0}));case 16:return e.abrupt("return",null!==(r=this.selectors[n])&&void 0!==r?r:a);case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getElementForChecksumId",value:function(e){var t;return null===(t=this.elementsInSimplifiedDomByChecksumId[e])||void 0===t?void 0:t.element}},{key:"hasInnerTextByChecksumId",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.maxLength,i=void 0===r?void 0:r,o=n.minLength,a=void 0===o?void 0:o;if(!this.preMapReducedHTMLSelectors){var s,u=null===(s=this.elementsInSimplifiedDomByChecksumId[e])||void 0===s?void 0:s.element,c=null===u||void 0===u?void 0:u.innerText;return!!c&&(!(a&&c.length<a)&&!(i&&c.length>i))}return!(null===(t=this.selectors[e])||void 0===t||!t.innerText)}},{key:"getInteractableElements",value:function(){return this.interactableElements}},{key:"getInteractableElementsInReducedHTML",value:function(){return this.interactableElementsFromSimplifiedDom}},{key:"startFlashingElementsDetection",value:function(){return this.flashingElementsDetector.start()}},{key:"addForceIncludeElement",value:function(e){this.forceIncludeElements.push(e),e.element._checksumid=e.checksumid}}]),e}(),ye=function(){function e(){(0,a.Z)(this,e),this.esraExtractors=[],this.appSpecificRules=void 0,this.playwrightSelector=new X,this.defaultExtractReducedHtmlAndSelector=!1,this.defaultInspectInteractableElements=!1,this.previousTargetNodeForReducedHTML=void 0,this.currentReducedHTMLChecksumIdAllocationCount="0",this.htmlReducer=new ge}return(0,s.Z)(e,[{key:"getSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,y=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=y.length>1&&void 0!==y[1]?y[1]:{}).extractPlaywrightSelector,o=void 0===i||i,a=r.extractEsraMetadata,s=void 0===a||a,u=r.extractReducedHtmlAndSelector,c=void 0===u?this.defaultExtractReducedHtmlAndSelector:u,l=r.inspectInteractableElements,d=void 0===l?this.defaultInspectInteractableElements:l,n){e.next=3;break}return e.abrupt("return",null);case 3:if(console.log("[SessionDigesterSelector] generating for node",n),f={},s&&(console.log("extracting ESRA metadata..."),h=this.getESRAExtractor(n).extract(n),f.esraMetadata=h.toMetadata(),console.log("ESRA metadata extraction complete")),!o){e.next=18;break}return console.log("extracting playwright selector..."),e.next=10,this.playwrightSelector.getSelectorAndLocator(n);case 10:p=e.sent,v=p.selector,m=p.locator,g=p.parentFramesSelectors,f.playwrightSelector=v,f.playwrightLocator=m,f.playwrightParentFramesSelectors=g,console.log("Playwright selector extraction complete");case 18:if(!c){e.next=24;break}return console.log("extracting reduced HTML..."),e.next=22,this.getReducedHTMLAndTargetNodeSelector(n);case 22:f.reducedHTML=e.sent,console.log("Reduced HTML extraction complete");case 24:if(!d){e.next=30;break}return console.log("extracting element inspection..."),e.next=28,this.isElementInteractable(n);case 28:f.interactionFoundOnInspection=e.sent,console.log("Element inspection extraction complete");case 30:return console.log("[SessionDigesterSelector] complete",f),e.abrupt("return",f);case 32:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.playwrightSelector.selector(n));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"setOptions",value:function(e){var t=e.defaultExtractReducedHtmlAndSelector,n=e.defaultInspectInteractableElements;this.defaultExtractReducedHtmlAndSelector=t,this.defaultInspectInteractableElements=n}},{key:"getReducedHTMLAndTargetNodeSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="checksum-target-node",n.setAttribute(r,"true"),i=this.previousTargetNodeForReducedHTML&&this.previousTargetNodeForReducedHTML!==n,this.previousTargetNodeForReducedHTML=n,o=!1,a=function(e){e.hasAttribute(r)&&(o=!0)},e.next=8,this.htmlReducer.reduceHTML(this.appSpecificRules,{initialChecksumId:this.currentReducedHTMLChecksumIdAllocationCount,extraAllowedAttributes:[r],checkElementInstanceType:!1,maintainSelectorsMapping:!1,forceIncludeAttribute:r,invalidateCache:i,onForceIncludeElement:a},n.ownerDocument);case 8:return s=e.sent,u=s.reducedDomHTMLElement,c=s.reducedHTML,l=s.currentChecksumId,n.removeAttribute(r),this.currentReducedHTMLChecksumIdAllocationCount=l,d=u.matches("[".concat(r,"=true]"))?u:u.querySelector("[".concat(r,"=true]")),f=d?d.getAttribute("checksumid"):void 0,e.abrupt("return",{html:c,selector:f,targetForceIncluded:o});case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getESRAExtractor",value:function(e){var t=this.esraExtractors.find((function(t){return t.isSameDocument(e.ownerDocument)}));if(t)return t;var n=new B(e.ownerDocument);return this.esraExtractors.push(n),n}},{key:"isElementInteractable",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.htmlReducer.getInteractableElements())||!r.length){e.next=3;break}return e.abrupt("return",r.some((function(e){return e.element===n&&!e.forced})));case 3:return e.next=5,(0,v.w1)(n.ownerDocument,this.appSpecificRules);case 5:return i=e.sent,e.abrupt("return",i.includes(n));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),be=n(1414),we=n(8739),ke=n(1855),Ee=n(6301),Se=n.n(Ee),xe=function(e){(0,V.Z)(i,e);var n=(0,j.Z)(i);function i(e){var t,r=e.sessionMirror,o=e.elementSelector;return(0,a.Z)(this,i),(t=n.call(this)).sessionMirror=void 0,t.elementSelector=void 0,t.numberOfRetries=3,t.currentHref=void 0,t.previousMouseDownData=void 0,t.previousMousePositions=void 0,t.previousMousePositionsNodeSelectors={},t.hasUndefinedFocusNode=!1,t.lastMouseUpTime=0,t.lastMouseDownExtract=void 0,t.allInteractableElementsMetadata={mouseMove:void 0,mouseDown:void 0},t.events=void 0,t.currentEventIndex=-1,t.enableRecordingAvailableInteractableElements=!0,t.useTextInputFastForward=!0,t.textInputFastForwardInitialSelector=void 0,t.appSpecificRules=void 0,t.getBoundingBox=function(e){var n=(0,v.QI)(t.sessionMirror.getNodeById(e),t.appSpecificRules.appSpecificInteractableElementsSelectors);if(n)return null===n||void 0===n?void 0:n.getBoundingClientRect()},t.isPointWithinBoundingBox=function(e,t,n){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom},t.isPointWithinNodeBoundingBox=function(e,n,r){var i=t.getBoundingBox(e);return!!i&&(n>=i.left&&n<=i.right&&r>=i.top&&r<=i.bottom)},t.elementSelector=o,t.sessionMirror=r,t}return(0,s.Z)(i,[{key:"setEvents",value:function(e){this.events=e}},{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward,r=void 0===n||n;this.enableRecordingAvailableInteractableElements=t,this.useTextInputFastForward=r}},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"skipEvents",value:function(e){this.currentEventIndex+=e.length}},{key:"preEvent",value:function(e){++this.currentEventIndex}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",r);case 2:if(r.availableInteractableElementsAtStart||!this.enableRecordingAvailableInteractableElements||n.type!==be.tw.IncrementalSnapshot||n.data.source!==be.yh.MouseInteraction&&n.data.source!==be.yh.Input&&n.data.source!==be.yh.MediaInteraction){e.next=6;break}return e.next=5,this.getInteractableElementsMetadata();case 5:r.availableInteractableElementsAtStart=e.sent;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMeta",value:function(e){if(e.href!==this.currentHref)return this.currentHref=e.href,{eventCode:ke.$.Navigation,url:e.href}}},{key:"getNextUserTriggeredInputEvent",value:function(e){for(var t=this.currentEventIndex+1;t<this.events.length;++t){var n=this.events[t];if(n.type===be.tw.IncrementalSnapshot&&n.data.source===be.yh.Input&&n.data.userTriggered)return n;if(n.timestamp>e)return}}},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u,c,d=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.userTriggered){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(o=e.sent,(a=this.getInputEventCode(o,n))!==ke.$.Input||!this.useTextInputFastForward){e.next=18;break}if(this.textInputFastForwardInitialSelector){e.next=11;break}return e.next=10,this.elementSelector.getSelector(o);case 10:this.textInputFastForwardInitialSelector=e.sent;case 11:return s=(0,l.Z)({eventCode:a},this.textInputFastForwardInitialSelector),u=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=d.getNextUserTriggeredInputEvent(i.timestamp+2e3))){e.next=9;break}return r=n.data,e.next=5,d.getNodeById(r.id);case 5:if((a=e.sent)===o){e.next=8;break}return e.abrupt("return",!1);case 8:return e.abrupt("return",d.getInputEventCode(a,r)===ke.$.Input);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=15,u();case 15:if(e.sent){e.next=17;break}this.textInputFastForwardInitialSelector=void 0;case 17:return e.abrupt("return",s);case 18:return e.next=20,this.elementSelector.getSelector(o);case 20:return c=e.sent,e.abrupt("return",(0,l.Z)({eventCode:a},c));case 22:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMouseMove",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.previousMousePositions=n.positions,this.previousMousePositionsNodeSelectors={},!this.isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus()){e.next=39;break}this.previousMousePositionsNodeSelectors={},r={},i=(0,U.Z)(this.previousMousePositions),e.prev=6,i.s();case 8:if((o=i.n()).done){e.next=28;break}if(a=o.value,s=a.id,!r[s]){e.next=13;break}return e.abrupt("continue",26);case 13:return r[s]=!0,e.next=16,this.getNodeById(s);case 16:return u=e.sent,e.prev=17,e.next=20,this.elementSelector.getSelector(u);case 20:this.previousMousePositionsNodeSelectors[s]=e.sent,e.next=26;break;case 23:e.prev=23,e.t0=e.catch(17),console.warn("error with extracting selector for node during previousMousePositionsNodeSelectors mapping",u,e.t0);case 26:e.next=8;break;case 28:e.next=33;break;case 30:e.prev=30,e.t1=e.catch(6),i.e(e.t1);case 33:return e.prev=33,i.f(),e.finish(33);case 36:return e.next=38,this.getInteractableElementsMetadata();case 38:this.allInteractableElementsMetadata.mouseMove=e.sent;case 39:case"end":return e.stop()}}),e,this,[[6,30,33,36],[17,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===be.tw.IncrementalSnapshot)switch(t.data.source){case be.yh.MouseMove:return!1;case be.yh.MouseInteraction:switch(t.data.type){case be.Y2.Click:case be.Y2.MouseDown:return!0;case be.Y2.Focus:return-1===t.data.id}}}return!1}},{key:"handleMouseDown",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNodeById(n.id);case 2:return r=e.sent,e.prev=3,e.t0=r,e.next=7,this.elementSelector.getSelector(r);case 7:return e.t1=e.sent,this.lastMouseDownExtract={node:e.t0,selector:e.t1},e.next=11,this.getInteractableElementsMetadata();case 11:this.allInteractableElementsMetadata.mouseDown=e.sent,e.next=17;break;case 14:e.prev=14,e.t2=e.catch(3),console.warn("error with extracting selector for node during handleMouseDown",r,e.t2);case 17:this.previousMouseDownData=n;case 18:case"end":return e.stop()}}),e,this,[[3,14]])})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseUp",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.lastMouseUpTime=r.timestamp;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isLastMouseDownValidForClick",value:function(e){return!!this.lastMouseDownExtract&&e-this.lastMouseUpTime<10}},{key:"invalidateLastMouseDown",value:function(){this.lastMouseUpTime=0,this.lastMouseDownExtract=void 0,this.allInteractableElementsMetadata.mouseDown=void 0}},{key:"handleFocus",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.hasUndefinedFocusNode=-1===n.id;case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return o=this.isLastMouseDownValidForClick(i.timestamp),a=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var r,a,s,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=19;break}return e.t0=l.Z,e.t1=(0,l.Z)({},u.lastMouseDownExtract.selector),e.t2={},e.next=6,u.elementSelector.getSelector(u.lastMouseDownExtract.node,{extractEsraMetadata:!1});case 6:if(e.t4=r=e.sent,e.t3=null===e.t4,e.t3){e.next=10;break}e.t3=void 0===r;case 10:if(!e.t3){e.next=14;break}e.t5=void 0,e.next=15;break;case 14:e.t5=r.playwrightSelector;case 15:return e.t6=e.t5,e.t7=u.allInteractableElementsMetadata.mouseDown,e.t8={playwrightSelectorForSnapshot:e.t6,availableInteractableElementsAtStart:e.t7},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t8));case 19:return a=u.getNodeIdForClick(n,i),e.next=22,u.getNodeById(a);case 22:if(s=e.sent,!u.previousMousePositionsNodeSelectors[a]){e.next=42;break}return e.t9=l.Z,e.t10=(0,l.Z)({},u.previousMousePositionsNodeSelectors[a]),e.t11={},e.next=29,u.elementSelector.getSelector(s,{extractEsraMetadata:!1});case 29:if(e.t13=c=e.sent,e.t12=null===e.t13,e.t12){e.next=33;break}e.t12=void 0===c;case 33:if(!e.t12){e.next=37;break}e.t14=void 0,e.next=38;break;case 37:e.t14=c.playwrightSelector;case 38:return e.t15=e.t14,e.t16=u.allInteractableElementsMetadata.mouseMove,e.t17={playwrightSelectorForSnapshot:e.t15,availableInteractableElementsAtStart:e.t16},e.abrupt("return",(0,e.t9)(e.t10,e.t11,e.t17));case 42:return e.abrupt("return",u.elementSelector.getSelector(s));case 43:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=6,a();case 6:return s=e.sent,this.invalidateLastMouseDown(),e.abrupt("return",(0,l.Z)({eventCode:ke.$.Click},s));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNextMouseMoveEvent",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===be.tw.IncrementalSnapshot&&t.data.source===be.yh.MouseMove)return t}}},{key:"getNodeIdForClick",value:function(e,t){var n=this;if(this.hasUndefinedFocusNode&&this.previousMouseDownData&&this.previousMouseDownData.id!==e.id){var r={next:function(){var e=n.getNextMouseMoveEvent();if(e){var r=e.data,i=(0,x.Z)(r.positions).reverse().find((function(n){return e.timestamp+n.timeOffset<t.timestamp}));if(i)return i.id}}(),previous:function(){if(n.previousMousePositions){var e=(0,x.Z)(n.previousMousePositions).reverse().find((function(e){return!0}));if(e)return e.id}}(),point:function(){try{var t=n.sessionMirror.getNodeById(e.id),r=Array.from((0,v.mn)(t)).filter((function(e){return"none"===window.getComputedStyle(e).pointerEvents})),i=[];if(r.length){r.forEach((function(e){var t=e,n=t.getAttribute("style");i.push(n),t.setAttribute("style",n+";pointer-events:auto !important")}));var o=document.querySelector("iframe").contentDocument.elementFromPoint(e.x,e.y);if(r.forEach((function(e,t){e.setAttribute("style",i[t])})),o){var a=n.sessionMirror.getMeta(o);if(a)return a.id}}}catch(Et){console.warn("element from point calc error",Et)}}(),original:e.id},i=r.next||r.previous||e.id;return r.point&&function(){if(i===r.point)return!1;var t=n.sessionMirror.getNodeById(i);return n.isPointWithinBoundingBox(e.x,e.y,t.getBoundingClientRect())}()?r.point:i}return e.id}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.numberOfRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionMirror.getNodeById(n)){e.next=9;break}return e.next=8,Se()(100*(this.numberOfRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?(0,v.QI)(u,this.appSpecificRules.appSpecificInteractableElementsSelectors):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"checkbox":case"radio":return t.isChecked?ke.$.Check:ke.$.UnCheck;default:return ke.$.Input}}},{key:"getInteractableElementsMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o,a,s;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.enableRecordingAvailableInteractableElements){e.next=2;break}return e.abrupt("return",[]);case 2:return n=document.querySelector("iframe").contentWindow,i=n.document,console.log("Getting all interactable elements..."),o=(0,v.w1)(i,this.appSpecificRules),console.log("Got ".concat(o.length," interactable elements")),console.log("Extracting ESRA metadata for all interactable elements..."),a=new B(i),e.next=11,Promise.all(o.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.extract(n).toMetadata(),e.abrupt("return",{esraMetadata:r});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 11:return s=e.sent,console.log("Done processing all interactable elements..."),e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),i}(we.E),Ie=n(7666),Ce=n(885),Te=n(3246),Me=n(5512),Ne=n(7326);!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(he||(he={}));var Ae=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function _e(e){var t=[];for(var n in e){var r=e[n];if("string"===typeof r){var i=Ze(n);t.push("".concat(i,": ").concat(r,";"))}}return t.join(" ")}var Re=/-([a-z])/g,De=/^--[a-zA-Z0-9-]+$/,Oe=function(e){return De.test(e)?e:e.replace(Re,(function(e,t){return t?t.toUpperCase():""}))},Le=/\B([A-Z])/g,Ze=function(e){return e.replace(Le,"-$1").toLowerCase()},Fe=function(){function e(){(0,a.Z)(this,e),this.parentElement=null,this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.ELEMENT_NODE=Ue.ELEMENT_NODE,this.TEXT_NODE=Ue.TEXT_NODE}return(0,s.Z)(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}();function Pe(e){return function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(e,r,i){var o;return(0,a.Z)(this,n),(o=t.call(this)).nodeType=Ue.DOCUMENT_TYPE_NODE,o.RRNodeType=he.DocumentType,o.name=e,o.publicId=r,o.systemId=i,o.nodeName=e,o.textContent=null,o}return(0,s.Z)(n,[{key:"toString",value:function(){return"RRDocumentType"}}]),n}(e)}function Be(e){return function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=Ue.ELEMENT_NODE,r.RRNodeType=he.Element,r.attributes={},r.shadowRoot=null,r.tagName=e.toUpperCase(),r.nodeName=e.toUpperCase(),r}return(0,s.Z)(n,[{key:"textContent",get:function(){var e="";return this.childNodes.forEach((function(t){return e+=t.textContent})),e},set:function(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}},{key:"classList",get:function(){var e=this;return new We(this.attributes.class,(function(t){e.attributes.class=t}))}},{key:"id",get:function(){return this.attributes.id||""}},{key:"className",get:function(){return this.attributes.class||""}},{key:"style",get:function(){var e=this,t=this.attributes.style?function(e){var t={},n=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[Oe(r[0].trim())]=r[1].trim())}})),t}(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=function(r,i,o){if(!n.test(r)){var a=Oe(r);i?t[a]=i:delete t[a],"important"===o&&(t[a]+=" !important"),e.attributes.style=_e(t)}},t.removeProperty=function(r){if(n.test(r))return"";var i=Oe(r),o=t[i]||"";return delete t[i],e.attributes.style=_e(t),o},t}},{key:"getAttribute",value:function(e){return this.attributes[e]||null}},{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"setAttributeNS",value:function(e,t,n){this.setAttribute(t,n)}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"appendChild",value:function(e){return qe(this,e)}},{key:"insertBefore",value:function(e,t){return Ge(this,e,t)}},{key:"removeChild",value:function(e){return ze(this,e)}},{key:"attachShadow",value:function(e){var t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}},{key:"dispatchEvent",value:function(e){return!0}},{key:"toString",value:function(){var e="";for(var t in this.attributes)e+="".concat(t,'="').concat(this.attributes[t],'" ');return"".concat(this.tagName," ").concat(e)}}]),n}(e)}function Ve(e){return function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=Ue.TEXT_NODE,r.nodeName="#text",r.RRNodeType=he.Text,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRText text=".concat(JSON.stringify(this.data))}}]),n}(e)}function je(e){return function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=Ue.COMMENT_NODE,r.nodeName="#comment",r.RRNodeType=he.Comment,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRComment text=".concat(JSON.stringify(this.data))}}]),n}(e)}function He(e){return function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeName="#cdata-section",r.nodeType=Ue.CDATA_SECTION_NODE,r.RRNodeType=he.CDATA,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRCDATASection data=".concat(JSON.stringify(this.data))}}]),n}(e)}var Ue,We=(0,s.Z)((function e(t,n){var r=this;if((0,a.Z)(this,e),this.classes=[],this.add=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i],s=String(a);r.classes.indexOf(s)>=0||r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))},this.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.classes=r.classes.filter((function(e){return-1===t.indexOf(e)})),r.onChange&&r.onChange(r.classes.join(" "))},t){var i,o=t.trim().split(/\s+/);(i=this.classes).push.apply(i,(0,x.Z)(o))}this.onChange=n}));function qe(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function Ge(e,t,n){if(!n)return qe(e,t);if(n.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===n||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=n.previousSibling,n.previousSibling=t,t.nextSibling=n,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function ze(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}!function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(Ue||(Ue={}));var $e={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Ye={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},Qe=null;function Xe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.mirror||t.ownerDocument.mirror;e=function(e,t,n,r){var i;n.afterAppend&&!Qe&&(Qe=new WeakSet,setTimeout((function(){Qe=null}),0));if(!et(e,t)){var o=Je(t,n.mirror,r);null===(i=e.parentNode)||void 0===i||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case he.Document:if(!tt(e,t,n.mirror,r)){var a=r.getMeta(t);a&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,a),null===Qe||void 0===Qe||Qe.add(e))}break;case he.Element:var s=e,u=t;switch(u.tagName){case"IFRAME":var c=e.contentDocument;if(!c)break;Xe(c,t.contentDocument,n,r)}u.shadowRoot&&(s.shadowRoot||s.attachShadow({mode:"open"}),Ke(s.shadowRoot,u.shadowRoot,n,r)),function(e,t,n){var r=e.attributes,i=t.attributes,o=function(){var r=i[a],o=n.getMeta(t);if((null===o||void 0===o?void 0:o.isSVG)&&$e[a])e.setAttributeNS($e[a],a,r);else if("CANVAS"===t.tagName&&"rr_dataURL"===a){var s=document.createElement("img");s.src=r,s.onload=function(){var t=e.getContext("2d");t&&t.drawImage(s,0,0,s.width,s.height)}}else{if("IFRAME"===t.tagName&&"srcdoc"===a)return 1;e.setAttribute(a,r)}};for(var a in i)o();for(var s=0,u=Array.from(r);s<u.length;s++){var c=u[s].name;c in i||e.removeAttribute(c)}t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}(s,u,r)}return e}(e,t,n,r),Ke(e,t,n,r),function(e,t,n){var r;switch(t.RRNodeType){case he.Document:var i=t.scrollData;i&&n.applyScroll(i,!0);break;case he.Element:var o=e,a=t;switch(a.scrollData&&n.applyScroll(a.scrollData,!0),a.inputData&&n.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":var s=e,u=a;void 0!==u.paused&&(u.paused?s.pause():s.play()),void 0!==u.muted&&(s.muted=u.muted),void 0!==u.volume&&(s.volume=u.volume),void 0!==u.currentTime&&(s.currentTime=u.currentTime),void 0!==u.playbackRate&&(s.playbackRate=u.playbackRate),void 0!==u.loop&&(s.loop=u.loop);break;case"CANVAS":var c=t;if(null!==c.rr_dataURL){var l=document.createElement("img");l.onload=function(){var e=o.getContext("2d");e&&e.drawImage(l,0,0,l.width,l.height)},l.src=c.rr_dataURL}c.canvasMutations.forEach((function(t){return n.applyCanvas(t.event,t.mutation,e)}));break;case"STYLE":var d=o.sheet;d&&t.rules.forEach((function(e){return n.applyStyleSheetMutation(e,d)}))}break;case he.Text:case he.Comment:case he.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}(null===Qe||void 0===Qe?void 0:Qe.has(e))&&(Qe.delete(e),null===(r=n.afterAppend)||void 0===r||r.call(n,e,n.mirror.getId(e)))}(e,t,n)}function Ke(e,t,n,r){var i=Array.from(e.childNodes),o=t.childNodes;if(0!==i.length||0!==o.length){for(var a=0,s=i.length-1,u=0,c=o.length-1,l=i[a],d=i[s],f=o[u],h=o[c],p=void 0,v=void 0;a<=s&&u<=c;)if(void 0===l)l=i[++a];else if(void 0===d)d=i[--s];else if(tt(l,f,n.mirror,r))l=i[++a],f=o[++u];else if(tt(d,h,n.mirror,r))d=i[--s],h=o[--c];else if(tt(l,h,n.mirror,r)){try{e.insertBefore(l,d.nextSibling)}catch(Et){console.warn(Et)}l=i[++a],h=o[--c]}else if(tt(d,f,n.mirror,r)){try{e.insertBefore(d,l)}catch(Et){console.warn(Et)}d=i[--s],f=o[++u]}else{if(!p){p={};for(var m=a;m<=s;m++){var g=i[m];g&&n.mirror.hasNode(g)&&(p[n.mirror.getId(g)]=m)}}var y=i[v=p[r.getId(f)]];if(void 0!==v&&y&&tt(y,f,n.mirror,r)){try{e.insertBefore(y,l)}catch(Et){console.warn(Et)}i[v]=void 0}else{var b=Je(f,n.mirror,r);"#document"===e.nodeName&&l&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(e.removeChild(l),n.mirror.removeNodeFromMap(l),l=i[++a]);try{e.insertBefore(b,l||null)}catch(Et){console.warn(Et)}}f=o[++u]}if(a>s){var w=o[c+1],k=null;for(w&&(k=n.mirror.getNode(r.getId(w)));u<=c;++u){var E=Je(o[u],n.mirror,r);try{e.insertBefore(E,k)}catch(Et){console.warn(Et)}}}else if(u>c)for(;a<=s;a++){var S=i[a];if(S&&S.parentNode===e)try{e.removeChild(S),n.mirror.removeNodeFromMap(S)}catch(Et){console.warn(Et)}}for(var x=e.firstChild,I=t.firstChild;null!==x&&null!==I;)Xe(x,I,n,r),x=x.nextSibling,I=I.nextSibling}}function Je(e,t,n){var r=n.getId(e),i=n.getMeta(e),o=null;if(r>-1&&(o=t.getNode(r)),null!==o&&et(o,e))return o;switch(e.RRNodeType){case he.Document:o=new Document;break;case he.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case he.Element:var a=e.tagName.toLowerCase();a=Ye[a]||a,o=i&&"isSVG"in i&&(null===i||void 0===i?void 0:i.isSVG)?document.createElementNS($e.svg,a):document.createElement(e.tagName);break;case he.Text:o=document.createTextNode(e.data);break;case he.Comment:o=document.createComment(e.data);break;case he.CDATA:o=document.createCDATASection(e.data)}i&&t.add(o,Object.assign({},i));try{null===Qe||void 0===Qe||Qe.add(o)}catch(Et){}return o}function et(e,t){return e.nodeType===t.nodeType&&(e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName)}function tt(e,t,n,r){var i=n.getId(e),o=r.getId(t);return-1!==i&&i===o&&et(e,t)}var nt=function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).UNSERIALIZED_STARTING_ID=-2,r._unserializedId=r.UNSERIALIZED_STARTING_ID,r.mirror=new pt,r.scrollData=null,e&&(r.mirror=e),r}return(0,s.Z)(n,[{key:"unserializedId",get:function(){return this._unserializedId--}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new rt(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t,n=e.toUpperCase();switch(n){case"AUDIO":case"VIDEO":t=new ot(n);break;case"IFRAME":t=new ut(n,this.mirror);break;case"CANVAS":t=new at(n);break;case"STYLE":t=new st(n);break;default:t=new it(n)}return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new lt(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new dt(e);return t.ownerDocument=this,t}},{key:"createTextNode",value:function(e){var t=new ct(e);return t.ownerDocument=this,t}},{key:"destroyTree",value:function(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}},{key:"open",value:function(){(0,Y.Z)((0,Q.Z)(n.prototype),"open",this).call(this),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}]),n}(function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call(this,i)).nodeType=Ue.DOCUMENT_NODE,e.nodeName="#document",e.compatMode="CSS1Compat",e.RRNodeType=he.Document,e.textContent=null,e.ownerDocument=(0,Ne.Z)(e),e}return(0,s.Z)(n,[{key:"documentElement",get:function(){return this.childNodes.find((function(e){return e.RRNodeType===he.Element&&"HTML"===e.tagName}))||null}},{key:"body",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===he.Element&&"BODY"===e.tagName})))||null}},{key:"head",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===he.Element&&"HEAD"===e.tagName})))||null}},{key:"implementation",get:function(){return this}},{key:"firstElementChild",get:function(){return this.documentElement}},{key:"appendChild",value:function(e){var t=e.RRNodeType;if((t===he.Element||t===he.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===t})))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ".concat(t===he.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var n=qe(this,e);return n.parentElement=null,n}},{key:"insertBefore",value:function(e,t){var n=e.RRNodeType;if((n===he.Element||n===he.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===n})))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ".concat(n===he.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var r=Ge(this,e,t);return r.parentElement=null,r}},{key:"removeChild",value:function(e){return ze(this,e)}},{key:"open",value:function(){this.firstChild=null,this.lastChild=null}},{key:"close",value:function(){}},{key:"write",value:function(e){var t;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===e?t="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===e&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){var n=this.createDocumentType("html",t,"");this.open(),this.appendChild(n)}}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new(Pe(Fe))(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t=new(Be(Fe))(e);return t.ownerDocument=this,t}},{key:"createElementNS",value:function(e,t){return this.createElement(t)}},{key:"createTextNode",value:function(e){var t=new(Ve(Fe))(e);return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new(je(Fe))(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new(He(Fe))(e);return t.ownerDocument=this,t}},{key:"toString",value:function(){return"RRDocument"}}]),n}(Fe)),rt=Pe(Fe),it=function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).inputData=null,e.scrollData=null,e}return(0,s.Z)(n)}(Be(Fe)),ot=function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n)}(function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"attachShadow",value:function(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}},{key:"play",value:function(){this.paused=!1}},{key:"pause",value:function(){this.paused=!0}}]),n}(it)),at=function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rr_dataURL=null,e.canvasMutations=[],e}return(0,s.Z)(n,[{key:"getContext",value:function(){return null}}]),n}(it),st=function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rules=[],e}return(0,s.Z)(n)}(it),ut=function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(e,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e)).contentDocument=new nt,i.contentDocument.mirror=r,i}return(0,s.Z)(n)}(it),ct=Ve(Fe),lt=je(Fe),dt=He(Fe);function ft(e,t,n,r){var i,o;switch(e.nodeType){case Ue.DOCUMENT_NODE:r&&"IFRAME"===r.nodeName?i=r.contentDocument:(i=t).compatMode=e.compatMode;break;case Ue.DOCUMENT_TYPE_NODE:var a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break;case Ue.ELEMENT_NODE:for(var s=e,u=(o=s)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),c=i=t.createElement(u),l=0,d=Array.from(s.attributes);l<d.length;l++){var f=d[l],h=f.name,p=f.value;c.attributes[h]=p}s.scrollLeft&&(c.scrollLeft=s.scrollLeft),s.scrollTop&&(c.scrollTop=s.scrollTop);break;case Ue.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case Ue.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case Ue.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case Ue.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}var v=n.getMeta(e);return t instanceof nt&&(v||(v=vt(i,t.unserializedId),n.add(e,v)),t.mirror.add(i,Object.assign({},v))),i}function ht(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ae,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new nt;return function e(r,i){var o=ft(r,n,t,i);if(null!==o)if("IFRAME"!==(null===i||void 0===i?void 0:i.nodeName)&&r.nodeType!==Ue.DOCUMENT_FRAGMENT_NODE&&(null===i||void 0===i||i.appendChild(o),o.parentNode=i,o.parentElement=i),"IFRAME"===r.nodeName){var a=r.contentDocument;a&&e(a,o)}else r.nodeType!==Ue.DOCUMENT_NODE&&r.nodeType!==Ue.ELEMENT_NODE&&r.nodeType!==Ue.DOCUMENT_FRAGMENT_NODE||(r.nodeType===Ue.ELEMENT_NODE&&r.shadowRoot&&e(r.shadowRoot,o),r.childNodes.forEach((function(t){return e(t,o)})))}(e,null),n}var pt=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function vt(e,t){switch(e.RRNodeType){case he.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case he.DocumentType:var n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case he.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case he.Text:case he.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case he.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function mt(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map((function(e){e(n)})),(r=e.get("*"))&&r.slice().map((function(e){e(t,n)}))}}}function gt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,"undefined"===typeof e?this.scrollLeft:~~e,"undefined"===typeof t?this.scrollTop:~~t)}else{if("number"===typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=function(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function u(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!==typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=l(e,"Y")&&d(e,"Y"),n=l(e,"X")&&d(e,"X");return t||n}function h(t){var n,r,o,s,u=(a()-t.startTime)/i;s=u=u>1?1:u,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,r,i){var s,c,l,d,f=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,d=o.scroll):(s=n,c=n.scrollLeft,l=n.scrollTop,d=u),h({scrollable:s,method:d,startTime:f,startX:c,startY:l,x:r,y:i})}}var yt,bt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,a.Z)(this,e),this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed}return(0,s.Z)(e,[{key:"addAction",value:function(e){var t=!0===this.raf;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{var n=this.findActionIndex(e);this.actions.splice(n,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}},{key:"start",value:function(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}},{key:"rafCheck",value:function(){var e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){var t=this.actions[0];if(!(this.timeOffset>=t.delay))break;this.actions.shift(),t.doAction()}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}},{key:"clear",value:function(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}},{key:"setSpeed",value:function(e){this.speed=e}},{key:"isActive",value:function(){return null!==this.raf}},{key:"findActionIndex",value:function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;n=r-1}}return t}}]),e}();function wt(e,t){if(e.type===be.tw.IncrementalSnapshot&&e.data.source===be.yh.MouseMove&&e.data.positions&&e.data.positions.length){var n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}function kt(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(yt||(yt={}));var Et={type:"xstate.init"};function St(e){return void 0===e?[]:[].concat(e)}function xt(e){return{type:"xstate.assign",assignment:e}}function It(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function Ct(e){return function(t){return e===t}}function Tt(e){return"string"==typeof e?{type:e}:e}function Mt(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Ct(e)}}function Nt(e,t,n){var r=t,i=!1;return[e.filter((function(e){if("xstate.assign"===e.type){i=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(i){t[i]="function"==typeof e.assignment[i]?e.assignment[i](r,n):e.assignment[i]})),r=t,!1}return!0})),r,i]}function At(e,t){void 0===t&&(t={});var n=kt(Nt(St(e.states[e.initial].entry).map((function(e){return It(e,t.actions)})),e.context,Et),2),r=n[0],i=n[1],o={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Ct(e.initial)},transition:function(t,n){var r,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,u=a.context,c=Tt(n),l=e.states[s];if(l.on){var d=St(l.on[c.type]);try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),h=f.next();!h.done;h=f.next()){var p=h.value;if(void 0===p)return Mt(s,u);var v="string"==typeof p?{target:p}:p,m=v.target,g=v.actions,y=void 0===g?[]:g,b=v.cond,w=void 0===b?function(){return!0}:b,k=void 0===m,E=null!=m?m:s,S=e.states[E];if(w(u,c)){var x=kt(Nt((k?St(y):[].concat(l.exit,y,S.entry).filter((function(e){return e}))).map((function(e){return It(e,o._options.actions)})),u,c),3),I=x[0],C=x[1],T=x[2],M=null!=m?m:s;return{value:M,context:C,actions:I,changed:m!==s||I.length>0||T,matches:Ct(M)}}}}catch(kt){r={error:kt}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}return Mt(s,u)}};return o}var _t=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function Rt(e){var t=e.initialState,n=yt.NotStarted,r=new Set,i={_machine:e,send:function(i){n===yt.Running&&(t=e.transition(t,i),_t(t,Tt(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var o="object"==typeof r?r:{context:e.config.context,value:r};t={value:o.value,actions:[],context:o.context,matches:Ct(o.value)}}return n=yt.Running,_t(t,Et),i},stop:function(){return n=yt.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function Dt(e,t){var n=t.getCastFn,r=t.applyEventsSynchronously,i=t.emitter,o=At({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:xt({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:xt((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),Object.assign(Object.assign({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,o=e.timer,a=e.events,s=e.baselineTime,u=e.lastPlayedEvent;o.clear();var c,l=(0,U.Z)(a);try{for(l.s();!(c=l.n()).done;){wt(c.value,s)}}catch(g){l.e(g)}finally{l.f()}var d=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===be.tw.Meta&&r.timestamp<=t)return e.slice(n)}return e}(a,s),f=null===u||void 0===u?void 0:u.timestamp;(null===u||void 0===u?void 0:u.type)===be.tw.IncrementalSnapshot&&u.data.source===be.yh.MouseMove&&(f=u.timestamp+(null===(t=u.data.positions[0])||void 0===t?void 0:t.timeOffset)),s<(f||0)&&i.emit(be.SA.PlayBack);var h,p=new Array,v=(0,U.Z)(d);try{var m=function(){var e=h.value;if(f&&f<s&&(e.timestamp<=f||e===u))return 1;if(e.timestamp<s)p.push(e);else{var t=n(e,!1);o.addAction({doAction:function(){t()},delay:e.delay})}};for(v.s();!(h=v.n()).done;)m()}catch(g){v.e(g)}finally{v.f()}r(p),i.emit(be.SA.Flush),o.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:xt((function(e){return Object.assign(Object.assign({},e),{lastPlayedEvent:null})})),startLive:xt({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:xt((function(e,t){var r=e.baselineTime,i=e.timer,o=e.events;if("ADD_EVENT"===t.type){var a=t.payload.event;wt(a,r);var s=o.length-1;if(!o[s]||o[s].timestamp<=a.timestamp)o.push(a);else{for(var u=-1,c=0;c<=s;){var l=Math.floor((c+s)/2);o[l].timestamp<=a.timestamp?c=l+1:s=l-1}-1===u&&(u=c),o.splice(u,0,a)}var d=a.timestamp<r,f=n(a,d);d?f():i.isActive()&&i.addAction({doAction:function(){f()},delay:a.delay})}return Object.assign(Object.assign({},e),{events:o})}))}});return Rt(o)}var Ot=n(1737),Lt=n(5647),Zt=n(3464),Ft=new Map;function Pt(e,t){var n=Ft.get(e);return n||(n=new Map,Ft.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Bt(e,n,r){var i=this;return function(o){return(0,Te.m)(i,void 0,void 0,(0,t.Z)().mark((function i(){var a,s,u,c,l,d,f,h,p,v,m;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o||"object"!==typeof o||!("rr_type"in o)){t.next=55;break}if(r&&(r.isUnchanged=!1),"ImageBitmap"!==o.rr_type||!("args"in o)){t.next=11;break}return t.next=5,Bt(e,n,r)(o.args);case 5:return a=t.sent,t.next=8,createImageBitmap.apply(null,a);case 8:return t.abrupt("return",t.sent);case 11:if(!("index"in o)){t.next=18;break}if(!r&&null!==n){t.next=14;break}return t.abrupt("return",o);case 14:return s=o.rr_type,u=o.index,t.abrupt("return",Pt(n,s)[u]);case 18:if(!("args"in o)){t.next=31;break}return c=o.rr_type,l=o.args,d=window[c],t.t0=Lt.Z,t.t1=d,t.t2=x.Z,t.next=26,Promise.all(l.map(Bt(e,n,r)));case 26:return t.t3=t.sent,t.t4=(0,t.t2)(t.t3),t.abrupt("return",(0,t.t0)(t.t1,t.t4));case 31:if(!("base64"in o)){t.next=35;break}return t.abrupt("return",(0,Zt.J)(o.base64));case 35:if(!("src"in o)){t.next=47;break}if(!(f=e.get(o.src))){t.next=41;break}return t.abrupt("return",f);case 41:return(h=new Image).src=o.src,e.set(o.src,h),t.abrupt("return",h);case 45:t.next=53;break;case 47:if(!("data"in o)||"Blob"!==o.rr_type){t.next=53;break}return t.next=50,Promise.all(o.data.map(Bt(e,n,r)));case 50:return p=t.sent,v=new Blob(p,{type:o.type}),t.abrupt("return",v);case 53:t.next=60;break;case 55:if(!Array.isArray(o)){t.next=60;break}return t.next=58,Promise.all(o.map(Bt(e,n,r)));case 58:return m=t.sent,t.abrupt("return",m);case 60:return t.abrupt("return",o);case 61:case"end":return t.stop()}}),i)})))}}function Vt(e,t){try{return t===be.FX.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(Et){return null}}var jt=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ht(e,t){if(null===t||void 0===t?void 0:t.constructor){var n=t.constructor.name;if(jt.includes(n)){var r=Pt(e,n);r.includes(t)||r.push(t)}}}function Ut(e){var n=e.mutation,r=e.target,i=e.type,o=e.imageMap,a=e.errorHandler;return(0,Te.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=Vt(r,i)){e.next=4;break}return e.abrupt("return");case 4:if(!n.setter){e.next=7;break}return s[n.property]=n.args[0],e.abrupt("return");case 7:return u=s[n.property],e.next=10,Promise.all(n.args.map(Bt(o,s)));case 10:c=e.sent,l=u.apply(s,c),Ht(s,l),!1,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),a(n,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}function Wt(e){var n=e.event,r=e.mutations,i=e.target,o=e.imageMap,a=e.errorHandler;return(0,Te.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=i.getContext("2d")){e.next=4;break}return a(r[0],new Error("Canvas context is null")),e.abrupt("return");case 4:return u=r.map((function(e){return(0,Te.m)(c,void 0,void 0,(0,t.Z)().mark((function n(){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.args.map(Bt(o,s))));case 1:case"end":return t.stop()}}),n)})))})),e.next=7,Promise.all(u);case 7:e.sent.forEach((function(e,t){var i=r[t];try{if(i.setter)return void(s[i.property]=i.args[0]);var u=s[i.property];"drawImage"===i.property&&"string"===typeof i.args[0]?(o.get(n),u.apply(s,i.args)):u.apply(s,e)}catch(c){a(i,c)}}));case 9:case"end":return e.stop()}}),e)})))}function qt(e){var n=e.event,r=e.mutation,i=e.target,o=e.imageMap,a=e.canvasEventMap,s=e.errorHandler;return(0,Te.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var u,c,l,d;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,u=a.get(n)||r,c="commands"in u?u.commands:[u],![be.FX.WebGL,be.FX.WebGL2].includes(r.type)){e.next=13;break}l=0;case 5:if(!(l<c.length)){e.next=12;break}return d=c[l],e.next=9,Ut({mutation:d,type:r.type,target:i,imageMap:o,errorHandler:s});case 9:l++,e.next=5;break;case 12:return e.abrupt("return");case 13:return e.next=15,Wt({event:n,mutations:c,target:i,imageMap:o,errorHandler:s});case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),s(r,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}var Gt=function(){function e(t){var n=this;(0,a.Z)(this,e),this.mediaMap=new Map,this.metadataCallbackMap=new Map,this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(be.SA.Start,this.start.bind(this)),this.emitter.on(be.SA.SkipStart,this.start.bind(this)),this.emitter.on(be.SA.Pause,this.pause.bind(this)),this.emitter.on(be.SA.Finish,this.pause.bind(this)),this.speedService.subscribe((function(){n.syncAllMediaElements()}))}return(0,s.Z)(e,[{key:"syncAllMediaElements",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pause:!1};this.mediaMap.forEach((function(n,r){e.syncTargetWithState(r),t.pause&&r.pause()}))}},{key:"start",value:function(){this.syncAllMediaElements()}},{key:"pause",value:function(){this.syncAllMediaElements({pause:!0})}},{key:"seekTo",value:function(e){var t=e.time,n=e.target,r=e.mediaState;if(r.isPlaying){var i=(t-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in n&&n.duration;if(Number.isNaN(o))return void this.waitForMetadata(n);var a=r.currentTimeAtLastInteraction+i;n.loop&&!1!==o&&(a%=o),n.currentTime=a}else n.pause(),n.currentTime=r.currentTimeAtLastInteraction}},{key:"waitForMetadata",value:function(e){var t=this;if(!this.metadataCallbackMap.has(e)&&"addEventListener"in e){var n=function(){t.metadataCallbackMap.delete(e);var n=t.mediaMap.get(e);n&&t.seekTo({time:t.getCurrentTime(),target:e,mediaState:n})};this.metadataCallbackMap.set(e,n),e.addEventListener("loadedmetadata",n,{once:!0})}}},{key:"getMediaStateFromMutation",value:function(e){var t,n,r,i,o,a=e.target,s=e.timeOffset,u=e.mutation,c=this.mediaMap.get(a),l=u.type,d=u.playbackRate,f=u.currentTime,h=u.muted,p=u.volume,v=u.loop;return{isPlaying:0===l||1!==l&&((null===c||void 0===c?void 0:c.isPlaying)||null!==a.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(t=null!==f&&void 0!==f?f:null===c||void 0===c?void 0:c.currentTimeAtLastInteraction)&&void 0!==t?t:0,lastInteractionTimeOffset:s,playbackRate:null!==(n=null!==d&&void 0!==d?d:null===c||void 0===c?void 0:c.playbackRate)&&void 0!==n?n:1,volume:null!==(r=null!==p&&void 0!==p?p:null===c||void 0===c?void 0:c.volume)&&void 0!==r?r:1,muted:null!==(i=null!==h&&void 0!==h?h:null===c||void 0===c?void 0:c.muted)&&void 0!==i?i:null===a.getAttribute("muted"),loop:null!==(o=null!==v&&void 0!==v?v:null===c||void 0===c?void 0:c.loop)&&void 0!==o?o:null===a.getAttribute("loop")}}},{key:"syncTargetWithState",value:function(e){var t=this.mediaMap.get(e);if(t){var n=t.muted,r=t.loop,i=t.volume,o=t.isPlaying,a=this.service.state.matches("paused"),s=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==i&&(e.volume=i),e.muted=n,e.loop=r,e.playbackRate!==s&&(e.playbackRate=s),o&&!a?e.play():e.pause()}catch(u){this.warn("Failed to replay media interactions: ".concat(u.message||u))}}}},{key:"addMediaElements",value:function(e,t,n){if(["AUDIO","VIDEO"].includes(e.nodeName)){var r=e,i=n.getMeta(r);if(i&&"attributes"in i){var o=this.service.state.matches("paused"),a=i.attributes,s=!1;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==r.getAttribute("autoplay"))&&o&&r.pause();var u=1;"number"===typeof a.rr_mediaPlaybackRate&&(u=a.rr_mediaPlaybackRate);var c=!1;c="boolean"===typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==r.getAttribute("muted");var l=!1;l="boolean"===typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==r.getAttribute("loop");var d=1;"number"===typeof a.rr_mediaVolume&&(d=a.rr_mediaVolume);var f=0;"number"===typeof a.rr_mediaCurrentTime&&(f=a.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:s,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:u,volume:d,muted:c,loop:l}),this.syncTargetWithState(r)}}}},{key:"mediaMutation",value:function(e){var t=e.target,n=e.timeOffset,r=e.mutation;this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:n,mutation:r})),this.syncTargetWithState(t)}},{key:"isSupportedMediaElement",value:function(e){return["AUDIO","VIDEO"].includes(e.nodeName)}},{key:"reset",value:function(){this.mediaMap.clear()}}]),e}(),zt=mt||e,$t="[replayer]",Yt={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Qt(e){return e.type==be.tw.IncrementalSnapshot&&(e.data.source==be.yh.TouchMove||e.data.source==be.yh.MouseInteraction&&e.data.type==be.Y2.TouchStart)}var Xt,Kt=function(){function e(t,n){var r=this;if((0,a.Z)(this,e),this.usingVirtualDom=!1,this.virtualDom=new nt,this.mouseTail=null,this.tailPositions=[],this.emitter=zt(),this.legacy_missingNodeRetryMap={},this.cache=(0,Me.Df)(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=(0,Me.bZ)(),this.styleMirror=new Ot.ug,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=function(e){r.iframe.style.display="inherit";for(var t=0,n=[r.mouseTail,r.iframe];t<n.length;t++){var i=n[t];i&&(i.setAttribute("width",String(e.width)),i.setAttribute("height",String(e.height)))}},this.applyEventsSynchronously=function(e){var t,n=(0,U.Z)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;switch(i.type){case be.tw.DomContentLoaded:case be.tw.Load:case be.tw.Custom:continue;case be.tw.FullSnapshot:case be.tw.Meta:case be.tw.Plugin:case be.tw.IncrementalSnapshot:}r.getCastFn(i,!0)()}}catch(o){n.e(o)}finally{n.f()}},this.getCastFn=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case be.tw.DomContentLoaded:case be.tw.Load:break;case be.tw.Custom:t=function(){r.emitter.emit(be.SA.CustomEvent,e)};break;case be.tw.Meta:t=function(){return r.emitter.emit(be.SA.Resize,{width:e.data.width,height:e.data.height})};break;case be.tw.FullSnapshot:t=function(){var t;if(r.firstFullSnapshot){if(r.firstFullSnapshot===e)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.mediaManager.reset(),r.styleMirror.reset(),r.rebuildFullSnapshot(e,n),null===(t=r.iframe.contentWindow)||void 0===t||t.scrollTo(e.data.initialOffset)};break;case be.tw.IncrementalSnapshot:t=function(){if(r.applyIncremental(e,n),!n&&(e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){var t,i=(0,U.Z)(r.service.state.context.events);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(!(o.timestamp<=e.timestamp)&&r.isUserInteraction(o)){o.delay-e.delay>r.config.inactivePeriodThreshold*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=o);break}}}catch(u){i.e(u)}finally{i.f()}if(r.nextUserInteractionEvent){var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/5e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:s}),r.emitter.emit(be.SA.SkipStart,s)}}}}return function(){t&&t();var i,o=(0,U.Z)(r.config.plugins||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.handler&&a.handler(e,n,{replayer:r})}}catch(c){o.e(c)}finally{o.f()}r.service.send({type:"CAST_EVENT",payload:{event:e}});var s=r.service.state.context.events.length-1;if(!r.config.liveMode&&e===r.service.state.context.events[s]){var u=50;e.type===be.tw.IncrementalSnapshot&&e.data.source===be.yh.MouseMove&&e.data.positions.length&&(u+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout((function(){s<r.service.state.context.events.length-1||(r.backToNormal(),r.service.send("END"),r.emitter.emit(be.SA.Finish))}),u)}r.emitter.emit(be.SA.EventCast,e)}},!(null===n||void 0===n?void 0:n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Yt,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(be.SA.Resize,this.handleResize),this.setupDom();var o,s=(0,U.Z)(this.config.plugins||[]);try{for(s.s();!(o=s.n()).done;){var u=o.value;u.getMirror&&u.getMirror({nodeMirror:this.mirror})}}catch(v){s.e(v)}finally{s.f()}this.emitter.on(be.SA.Flush,(function(){if(r.usingVirtualDom){var e={mirror:r.mirror,applyCanvas:function(e,t,n){qt({event:e,mutation:t,target:n,imageMap:r.imageMap,canvasEventMap:r.canvasEventMap,errorHandler:r.warnCanvasMutationFailed.bind(r)})},applyInput:r.applyInput.bind(r),applyScroll:r.applyScroll.bind(r),applyStyleSheetMutation:function(e,t){e.source===be.yh.StyleSheetRule?r.applyStyleSheetRule(e,t):e.source===be.yh.StyleDeclaration&&r.applyStyleDeclaration(e,t)},afterAppend:function(e,t){var n,i=(0,U.Z)(r.config.plugins||[]);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.onBuild&&o.onBuild(e,{id:t,replayer:r})}}catch(v){i.e(v)}finally{i.f()}}};if(r.iframe.contentDocument)try{Xe(r.iframe.contentDocument,r.virtualDom,e,r.virtualDom.mirror)}catch(Et){console.warn(Et)}if(r.virtualDom.destroyTree(),r.usingVirtualDom=!1,Object.keys(r.legacy_missingNodeRetryMap).length)for(var t in r.legacy_missingNodeRetryMap)try{var n=r.legacy_missingNodeRetryMap[t],i=Je(n.node,r.mirror,r.virtualDom.mirror);Xe(i,n.node,e,r.virtualDom.mirror),n.node=i}catch(u){r.warn(u)}r.constructedStyleMutations.forEach((function(e){r.applyStyleSheetMutation(e)})),r.constructedStyleMutations=[],r.adoptedStyleSheets.forEach((function(e){r.applyAdoptedStyleSheet(e)})),r.adoptedStyleSheets=[]}if(r.mousePos&&(r.moveAndHover(r.mousePos.x,r.mousePos.y,r.mousePos.id,!0,r.mousePos.debugData),r.mousePos=null),!0===r.touchActive?r.mouse.classList.add("touch-active"):!1===r.touchActive&&r.mouse.classList.remove("touch-active"),r.touchActive=null,r.lastMouseDownEvent){var o=(0,Ce.Z)(r.lastMouseDownEvent,2),a=o[0],s=o[1];a.dispatchEvent(s)}r.lastMouseDownEvent=null,r.lastSelectionData&&(r.applySelection(r.lastSelectionData),r.lastSelectionData=null)})),this.emitter.on(be.SA.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset(),r.styleMirror.reset(),r.mediaManager.reset()}));var c=new bt([],{speed:this.config.speed});this.service=Dt({events:t.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(be.SA.StateChange,{player:e})})),this.speedService=Rt(At({id:"speed",context:{normalSpeed:-1,timer:c},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:xt({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(be.SA.StateChange,{speed:e})})),this.mediaManager=new Gt({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var l=this.service.state.context.events.find((function(e){return e.type===be.tw.Meta})),d=this.service.state.context.events.find((function(e){return e.type===be.tw.FullSnapshot}));if(l){var f=l.data,h=f.width,p=f.height;setTimeout((function(){r.emitter.emit(be.SA.Resize,{width:h,height:p})}),0)}d&&setTimeout((function(){var e;r.firstFullSnapshot||(r.firstFullSnapshot=d,r.rebuildFullSnapshot(d),null===(e=r.iframe.contentWindow)||void 0===e||e.scrollTo(d.data.initialOffset))}),1),this.service.state.context.events.find(Qt)&&this.mouse.classList.add("touch-device")}return(0,s.Z)(e,[{key:"timer",get:function(){return this.service.state.context.timer}},{key:"on",value:function(e,t){return this.emitter.on(e,t),this}},{key:"off",value:function(e,t){return this.emitter.off(e,t),this}},{key:"setConfig",value:function(e){var t=this;Object.keys(e).forEach((function(n){e[n],t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),"undefined"!==typeof e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),"undefined"!==typeof e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}},{key:"getMetaData",value:function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}},{key:"getCurrentTime",value:function(){return this.timer.timeOffset+this.getTimeOffset()}},{key:"getTimeOffset",value:function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp}},{key:"getMirror",value:function(){return this.mirror}},{key:"play",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:n}}),null===(t=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.getElementsByTagName("html")[0])||void 0===t||t.classList.remove("rrweb-paused"),this.emitter.emit(be.SA.Start)}},{key:"pause",value:function(e){var t,n;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"===typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(n=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===n||n.classList.add("rrweb-paused"),this.emitter.emit(be.SA.Pause)}},{key:"resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(be.SA.Resume)}},{key:"destroy",value:function(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(be.SA.Destroy)}},{key:"startLive",value:function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}},{key:"addEvent",value:function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Qt(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))}},{key:"enableInteract",value:function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}},{key:"disableInteract",value:function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}},{key:"resetCache",value:function(){this.cache=(0,Me.Df)()}},{key:"setupDom",value:function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(gt(this.iframe.contentWindow,this.iframe.contentDocument),(0,Ot.OK)(this.iframe.contentWindow))}},{key:"rebuildFullSnapshot",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var r=[],i=function(n,i){if(t.collectIframeAndAttachDocument(r,n),t.mediaManager.isSupportedMediaElement(n)){var o=t.service.state.context.events;t.mediaManager.addMediaElements(n,e.timestamp-o[0].timestamp,t.mirror)}var a,s=(0,U.Z)(t.config.plugins||[]);try{for(s.s();!(a=s.n()).done;){var u=a.value;u.onBuild&&u.onBuild(n,{id:i,replayer:t})}}catch(c){s.e(c)}finally{s.f()}};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),(0,Me.VU)(e.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,e.data.node.id);for(var o=function(){var e=s[a],n=e.mutationInQueue,r=e.builtNode;t.attachDocumentToIframe(n,r),t.newDocumentQueue=t.newDocumentQueue.filter((function(e){return e!==n}))},a=0,s=r;a<s.length;a++)o();var u=this.iframe.contentDocument,c=u.documentElement,l=u.head;this.insertStyleRules(c,l),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(be.SA.FullsnapshotRebuilded,e),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}},{key:"insertStyleRules",value:function(e,t){var n,r,i=(r=this.config.blockClass,[".".concat(r," { background: currentColor }"),"noscript { display: none !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,vt(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:be.yh.StyleSheetRule,adds:i.map((function(e,t){return{rule:e,index:t}}))})}else{var a=document.createElement("style");e.insertBefore(a,t);for(var s=0;s<i.length;s++)null===(n=a.sheet)||void 0===n||n.insertRule(i[s],s)}}},{key:"attachDocumentToIframe",value:function(e,t){var n=this,r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=function(e,o){n.collectIframeAndAttachDocument(i,e);var a=r.getMeta(e);if((null===a||void 0===a?void 0:a.type)===Me.Jq.Element&&"HTML"===(null===a||void 0===a?void 0:a.tagName.toUpperCase())){var s=t.contentDocument,u=s.documentElement,c=s.head;n.insertStyleRules(u,c)}if(!n.usingVirtualDom){var l,d=(0,U.Z)(n.config.plugins||[]);try{for(d.s();!(l=d.n()).done;){var f=l.value;f.onBuild&&f.onBuild(e,{id:o,replayer:n})}}catch(h){d.e(h)}finally{d.f()}}};(0,Me.GQ)(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(var a=function(){var e=u[s],t=e.mutationInQueue,r=e.builtNode;n.attachDocumentToIframe(t,r),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==t}))},s=0,u=i;s<u.length;s++)a()}},{key:"collectIframeAndAttachDocument",value:function(e,t){var n=this;if((0,Ot.Cj)(t,this.mirror)){var r=this.newDocumentQueue.find((function(e){return e.parentId===n.mirror.getId(t)}));r&&e.push({mutationInQueue:r,builtNode:t})}}},{key:"waitForStylesheetLoad",value:function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(be.SA.Start,a),this.emitter.on(be.SA.Pause,a);var s=function(){t.emitter.off(be.SA.Start,a),t.emitter.off(be.SA.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(be.SA.LoadStylesheetEnd),r&&clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(be.SA.LoadStylesheetStart),r=setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}}},{key:"preloadAllImages",value:function(){return(0,Te.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var n,r,i,o,a,s=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.service.state,n=function(){s.service.state},this.emitter.on(be.SA.Start,n),this.emitter.on(be.SA.Pause,n),r=[],i=(0,U.Z)(this.service.state.context.events),e.prev=6,a=(0,t.Z)().mark((function e(){var n;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=o.value).type===be.tw.IncrementalSnapshot&&n.data.source===be.yh.CanvasMutation&&(r.push(s.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach((function(e){s.preloadImages(e,n)})));case 2:case"end":return e.stop()}}),e)})),i.s();case 9:if((o=i.n()).done){e.next=13;break}return e.delegateYield(a(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),i.e(e.t1);case 18:return e.prev=18,i.f(),e.finish(18);case 21:return e.abrupt("return",Promise.all(r));case 22:case"end":return e.stop()}}),e,this,[[6,15,18,21]])})))}},{key:"preloadImages",value:function(e,t){if("drawImage"===e.property&&"string"===typeof e.args[0]&&!this.imageMap.has(t)){var n=document.createElement("canvas"),r=n.getContext("2d"),i=null===r||void 0===r?void 0:r.createImageData(n.width,n.height);null===i||void 0===i||i.data,JSON.parse(e.args[0]),null===r||void 0===r||r.putImageData(i,0,0)}}},{key:"deserializeAndPreloadCanvasEvents",value:function(e,n){return(0,Te.m)(this,void 0,void 0,(0,t.Z)().mark((function r(){var i,o,a,s=this;return(0,t.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.canvasEventMap.has(n)){r.next=13;break}if(i={isUnchanged:!0},!("commands"in e)){r.next=9;break}return r.next=5,Promise.all(e.commands.map((function(e){return(0,Te.m)(s,void 0,void 0,(0,t.Z)().mark((function n(){var r;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.args.map(Bt(this.imageMap,null,i)));case 2:return r=t.sent,t.abrupt("return",Object.assign(Object.assign({},e),{args:r}));case 4:case"end":return t.stop()}}),n,this)})))})));case 5:o=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{commands:o})),r.next=13;break;case 9:return r.next=11,Promise.all(e.args.map(Bt(this.imageMap,null,i)));case 11:a=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{args:a}));case 13:case"end":return r.stop()}}),r,this)})))}},{key:"applyIncremental",value:function(e,t){var n,r,i,o=this,a=e.data;switch(a.source){case be.yh.Mutation:try{this.applyMutation(a,t)}catch(b){this.warn("Exception in mutation ".concat(b.message||b),a)}break;case be.yh.Drag:case be.yh.TouchMove:case be.yh.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(n){var r={doAction:function(){o.moveAndHover(n.x,n.y,n.id,t,a)},delay:n.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case be.yh.MouseInteraction:if(-1===a.id)break;var u=new Event((0,Me.UR)(be.Y2[a.type])),c=this.mirror.getNode(a.id);if(!c)return this.debugNodeNotFound(a,a.id);this.emitter.emit(be.SA.MouseInteraction,{type:a.type,target:c});var l=this.config.triggerFocus;switch(a.type){case be.Y2.Blur:"blur"in c&&c.blur();break;case be.Y2.Focus:l&&c.focus&&c.focus({preventScroll:!0});break;case be.Y2.Click:case be.Y2.TouchStart:case be.Y2.TouchEnd:case be.Y2.MouseDown:case be.Y2.MouseUp:t?(a.type===be.Y2.TouchStart?this.touchActive=!0:a.type===be.Y2.TouchEnd&&(this.touchActive=!1),a.type===be.Y2.MouseDown?this.lastMouseDownEvent=[c,u]:a.type===be.Y2.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===be.Y2.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,t,a),a.type===be.Y2.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===be.Y2.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===be.Y2.TouchEnd?this.mouse.classList.remove("touch-active"):c.dispatchEvent(u));break;case be.Y2.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(u)}break;case be.yh.Scroll:if(-1===a.id)break;if(this.usingVirtualDom){var d=this.virtualDom.mirror.getNode(a.id);if(!d)return this.debugNodeNotFound(a,a.id);d.scrollData=a;break}this.applyScroll(a,t);break;case be.yh.ViewportResize:this.emitter.emit(be.SA.Resize,{width:a.width,height:a.height});break;case be.yh.Input:if(-1===a.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);f.inputData=a;break}this.applyInput(a);break;case be.yh.MediaInteraction:var h=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!h)return this.debugNodeNotFound(a,a.id);var p=h,v=this.service.state.context.events;this.mediaManager.mediaMutation({target:p,timeOffset:e.timestamp-v[0].timestamp,mutation:a});break;case be.yh.StyleSheetRule:case be.yh.StyleDeclaration:this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&(null===(r=this.virtualDom.mirror.getNode(a.id))||void 0===r||r.rules.push(a)):this.applyStyleSheetMutation(a);break;case be.yh.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var m=this.virtualDom.mirror.getNode(a.id);if(!m)return this.debugNodeNotFound(a,a.id);m.canvasMutations.push({event:e,mutation:a})}else{var g=this.mirror.getNode(a.id);if(!g)return this.debugNodeNotFound(a,a.id);qt({event:e,mutation:a,target:g,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case be.yh.Font:try{var y=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(y)}catch(b){this.warn(b)}break;case be.yh.Selection:if(t){this.lastSelectionData=a;break}this.applySelection(a);break;case be.yh.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a)}}},{key:"applyMutation",value:function(e,t){var n=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,ht(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(var r in this.legacy_missingNodeRetryMap)try{var i=this.legacy_missingNodeRetryMap[r],o=ft(i.node,this.virtualDom,this.mirror);o&&(i.node=o)}catch(v){this.warn(v)}var a=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter((function(t){return!!a.getNode(t.id)||(n.warnNodeNotFound(e,t.id),!1)})),e.removes.forEach((function(t){var r,i=a.getNode(t.id);if(i){var o=a.getNode(t.parentId);if(!o)return n.warnNodeNotFound(e,t.parentId);if(t.isShadow&&(0,Ot.He)(o)&&(o=o.shadowRoot),a.removeNodeFromMap(i),o)try{o.removeChild(i),n.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===o.nodeName&&(null===(r=o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}catch(v){if(!(v instanceof DOMException))throw v;n.warn("parent could not remove child in mutation",o,i,e)}}}));var s=Object.assign({},this.legacy_missingNodeRetryMap),u=[],c=function(e){var t,r;if(!n.iframe.contentDocument)return n.warn("Looks like your replayer has been destroyed.");var i=a.getNode(e.parentId);if(!i)return e.node.type===Me.Jq.Document?n.newDocumentQueue.push(e):u.push(e);e.node.isShadow&&((0,Ot.He)(i)||i.attachShadow({mode:"open"}),i=i.shadowRoot);var o=null,c=null;if(e.previousId&&(o=a.getNode(e.previousId)),e.nextId&&(c=a.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return u.push(e);if(!e.node.rootId||a.getNode(e.node.rootId)){var l=e.node.rootId?a.getNode(e.node.rootId):n.usingVirtualDom?n.virtualDom:n.iframe.contentDocument;if((0,Ot.Cj)(i,a))n.attachDocumentToIframe(e,i);else{var d=function(e,t){if(!n.usingVirtualDom){var r,i=(0,U.Z)(n.config.plugins||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.onBuild&&o.onBuild(e,{id:t,replayer:n})}}catch(a){i.e(a)}finally{i.f()}}},f=(0,Me.GQ)(e.node,{doc:l,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache,afterAppend:d});if(-1!==e.previousId&&-1!==e.nextId){var h=a.getMeta(i);if(h&&h.type===Me.Jq.Element&&"textarea"===h.tagName&&e.node.type===Me.Jq.Text){var p,v=Array.isArray(i.childNodes)?i.childNodes:Array.from(i.childNodes),m=(0,U.Z)(v);try{for(m.s();!(p=m.n()).done;){var g=p.value;g.nodeType===i.TEXT_NODE&&i.removeChild(g)}}catch(k){m.e(k)}finally{m.f()}}else if((null===h||void 0===h?void 0:h.type)===Me.Jq.Document){var y=i;e.node.type===Me.Jq.DocumentType&&(null===(t=y.childNodes[0])||void 0===t?void 0:t.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),"HTML"===f.nodeName&&y.documentElement&&y.removeChild(y.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?i.insertBefore(f,o.nextSibling):c&&c.parentNode?i.contains(c)?i.insertBefore(f,c):i.insertBefore(f,null):i.appendChild(f),d(f,e.node.id),n.usingVirtualDom&&"#text"===f.nodeName&&"STYLE"===i.nodeName&&(null===(r=i.rules)||void 0===r?void 0:r.length)>0&&(i.rules=[]),(0,Ot.Cj)(f,n.mirror)){var b=n.mirror.getId(f),w=n.newDocumentQueue.find((function(e){return e.parentId===b}));w&&(n.attachDocumentToIframe(w,f),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==w})))}(e.previousId||e.nextId)&&n.legacy_resolveMissingNode(s,i,f,e)}else s[e.node.id]={node:f,mutation:e}}}};e.adds.forEach((function(e){c(e)}));for(var l=Date.now();u.length;){var d=(0,Ot.s6)(u);if(u.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}var f,h=(0,U.Z)(d);try{for(h.s();!(f=h.n()).done;){var p=f.value;a.getNode(p.value.parentId)?(0,Ot.Fn)(p,(function(e){c(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",p)}}catch(m){h.e(m)}finally{h.f()}}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),(0,Ot.E2)(e.texts).forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}if(i.textContent=t.value,n.usingVirtualDom){var o=i.parentNode;(null===(r=null===o||void 0===o?void 0:o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}})),e.attributes.forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}var o=function(){if("string"===typeof s){var e=t.attributes[s];if(null===e)i.removeAttribute(s);else if("string"===typeof e)try{if("_cssText"===s&&("LINK"===i.nodeName||"STYLE"===i.nodeName))try{var o=a.getMeta(i);Object.assign(o.attributes,t.attributes);var u=(0,Me.GQ)(o,{doc:i.ownerDocument,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache}),c=i.nextSibling,l=i.parentNode;if(u&&l)return l.removeChild(i),l.insertBefore(u,c),a.replace(t.id,u),1}catch(Et){}if("value"===s&&"TEXTAREA"===i.nodeName){var d=i;d.childNodes.forEach((function(e){return d.removeChild(e)}));var f=null===(r=i.ownerDocument)||void 0===r?void 0:r.createTextNode(e);f&&d.appendChild(f)}else i.setAttribute(s,e)}catch(v){n.warn("An error occurred may due to the checkout feature.",v)}else if("style"===s){var h=e,p=i;for(var m in h)if(!1===h[m])p.style.removeProperty(m);else if(h[m]instanceof Array){var g=h[m];p.style.setProperty(m,g[0],g[1])}else{var y=h[m];p.style.setProperty(m,y)}}}};for(var s in t.attributes)if(o())break}))}},{key:"applyScroll",value:function(e,t){var n,r,i=this.mirror.getNode(e.id);if(!i)return this.debugNodeNotFound(e,e.id);var o=this.mirror.getMeta(i);if(i===this.iframe.contentDocument)null===(n=this.iframe.contentWindow)||void 0===n||n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((null===o||void 0===o?void 0:o.type)===Me.Jq.Document)null===(r=i.defaultView)||void 0===r||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}},{key:"applyInput",value:function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(n){}}},{key:"applySelection",value:function(e){var t=this;try{var n=new Set,r=e.ranges.map((function(e){var r=e.start,i=e.startOffset,o=e.end,a=e.endOffset,s=t.mirror.getNode(r),u=t.mirror.getNode(o);if(s&&u){var c=new Range;c.setStart(s,i),c.setEnd(u,a);var l=s.ownerDocument,d=null===l||void 0===l?void 0:l.getSelection();return d&&n.add(d),{range:c,selection:d}}}));n.forEach((function(e){return e.removeAllRanges()})),r.forEach((function(e){var t;return e&&(null===(t=e.selection)||void 0===t?void 0:t.addRange(e.range))}))}catch(i){}}},{key:"applyStyleSheetMutation",value:function(e){var t,n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=(null===(t=this.mirror.getNode(e.id))||void 0===t?void 0:t.sheet)||null),n&&(e.source===be.yh.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===be.yh.StyleDeclaration&&this.applyStyleDeclaration(e,n))}},{key:"applyStyleSheetRule",value:function(e,t){var n,r,i,o;if(null===(n=e.adds)||void 0===n||n.forEach((function(e){var n=e.rule,r=e.index;try{if(Array.isArray(r)){var i=(0,Ot._X)(r),o=i.positions,a=i.index;(0,Ot.md)(t.cssRules,o).insertRule(n,a)}else{var s=void 0===r?void 0:Math.min(r,t.cssRules.length);null===t||void 0===t||t.insertRule(n,s)}}catch(Et){}})),null===(r=e.removes)||void 0===r||r.forEach((function(e){var n=e.index;try{if(Array.isArray(n)){var r=(0,Ot._X)(n),i=r.positions,o=r.index;(0,Ot.md)(t.cssRules,i).deleteRule(o||0)}else null===t||void 0===t||t.deleteRule(n)}catch(Et){}})),e.replace)try{null===(i=t.replace)||void 0===i||i.call(t,e.replace)}catch(Et){}if(e.replaceSync)try{null===(o=t.replaceSync)||void 0===o||o.call(t,e.replaceSync)}catch(Et){}}},{key:"applyStyleDeclaration",value:function(e,t){e.set&&(0,Ot.md)(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority);e.remove&&(0,Ot.md)(t.rules,e.index).style.removeProperty(e.remove.property)}},{key:"applyAdoptedStyleSheet",value:function(e){var t,n=this,r=this.mirror.getNode(e.id);if(r){null===(t=e.styles)||void 0===t||t.forEach((function(e){var t,i=null,o=null;if((0,Ot.He)(r)?o=(null===(t=r.ownerDocument)||void 0===t?void 0:t.defaultView)||null:"#document"===r.nodeName&&(o=r.defaultView),o)try{i=new o.CSSStyleSheet,n.styleMirror.add(i,e.styleId),n.applyStyleSheetRule({source:be.yh.StyleSheetRule,adds:e.rules},i)}catch(Et){}}));var i=0;!function e(t,r){var o=r.map((function(e){return n.styleMirror.getStyle(e)})).filter((function(e){return null!==e}));(0,Ot.He)(t)?t.shadowRoot.adoptedStyleSheets=o:"#document"===t.nodeName&&(t.adoptedStyleSheets=o),o.length!==r.length&&i<10&&(setTimeout((function(){return e(t,r)}),0+100*i),i++)}(r,e.styleIds)}}},{key:"legacy_resolveMissingNode",value:function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var u=a.node,c=a.mutation;t.insertBefore(u,n),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(s){var l=s.node,d=s.mutation;t.insertBefore(l,n.nextSibling),delete e[d.node.id],delete this.legacy_missingNodeRetryMap[d.node.id],(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(e,t,l,d)}}},{key:"moveAndHover",value:function(e,t,n,r,i){var o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(i,n);var a=(0,Ot.vD)(o,this.iframe),s=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left="".concat(s,"px"),this.mouse.style.top="".concat(u,"px"),r||this.drawMouseTail({x:s,y:u}),this.hoverElements(o)}},{key:"drawMouseTail",value:function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?Yt:Object.assign({},Yt,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=r,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}}},{key:"hoverElements",value:function(e){var t;null===(t=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")})),this.lastHoveredRootNode=e.getRootNode();for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}},{key:"isUserInteraction",value:function(e){return e.type===be.tw.IncrementalSnapshot&&(e.data.source>be.yh.Mutation&&e.data.source<=be.yh.Input)}},{key:"backToNormal",value:function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(be.SA.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}},{key:"warnNodeNotFound",value:function(e,t){this.warn("Node with id '".concat(t,"' not found. "),e)}},{key:"warnCanvasMutationFailed",value:function(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}},{key:"debugNodeNotFound",value:function(e,t){this.debug("Node with id '".concat(t,"' not found. "),e)}},{key:"warn",value:function(){var e;if(this.config.showWarning){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).warn.apply(e,[$t].concat(n))}}},{key:"debug",value:function(){var e;if(this.config.showDebug){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).log.apply(e,[$t].concat(n))}}}]),e}(),Jt=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.events=[],this.castedEvents=[],this.isLive=!0,this.liveEvents=void 0,this.currentTraveledTimestamp=void 0,this.replayer=void 0,this.onEventCast=void 0,this.config={enableInteract:!1},this.useTimestampCompression=!0,this.startOptions=void 0,this.fastForward=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u,c,d,f=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f.length>1&&void 0!==f[1]&&f[1]||n.isLive){e.next=4;break}return(i=n.liveEvents).push.apply(i,(0,x.Z)(r)),e.abrupt("return");case 4:o=r.sort((function(e,t){return e.timestamp-t.timestamp})),n.useTimestampCompression&&(a=Date.now(),o=o.map((function(e,t){var r;return(0,l.Z)((0,l.Z)({},e),{},{timestamp:a+t,originalTimestamp:null!==(r=n.getOriginalTimestamp(e))&&void 0!==r?r:e.timestamp})}))),n.events=[].concat((0,x.Z)(n.events),(0,x.Z)(o)),s=new Promise((function(e){n.onEventCast=function(t){n.castedEvents.push(t),n.castedEvents.length===n.events.length&&(n.onEventCast=void 0,e())}})),u=(0,U.Z)(o);try{for(u.s();!(c=u.n()).done;)d=c.value,n.replayer.addEvent(d)}catch(t){u.e(t)}finally{u.f()}return e.abrupt("return",s);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.stop=function(){n.replayer.destroy()},this.getOriginalTimestamp=function(e){return e.originalTimestamp},this.getNodeById=function(e){return n.replayer.getMirror().getNode(e)},this.getMeta=function(e){return n.replayer.getMirror().getMeta(e)},this.config=(0,l.Z)((0,l.Z)({},this.config),i)}return(0,s.Z)(e,[{key:"start",value:function(e){var t=this;this.startOptions=e;var n=e.firstEventTimestamp,r=e.speed,i=void 0===r?8:r,o=e.useTimestampCompression,a=void 0===o||o;this.replayer=new Kt([],{mouseTail:!1,pauseAnimation:!1,speed:i,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0}),this.config.enableInteract?this.replayer.enableInteract():this.replayer.disableInteract(),this.useTimestampCompression=a,this.replayer.startLive(this.useTimestampCompression?Date.now():n),this.replayer.on("event-cast",(function(e){t.onEventCast&&t.onEventCast(e)}))}},{key:"goBack",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u=this,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).sleepAfter,o=void 0===i?1e3:i,a=r.beforeTimestamp,s=void 0!==a&&a,this.currentTraveledTimestamp!==n){e.next=3;break}return e.abrupt("return");case 3:return this.currentTraveledTimestamp=n,this.isLive&&(this.liveEvents=this.events),this.stop(),this.events=[],this.castedEvents=[],this.start(this.startOptions),this.isLive=!1,e.next=12,this.fastForward(this.liveEvents.filter((function(e){return s?u.getOriginalTimestamp(e)<n:u.getOriginalTimestamp(e)<=n})),!0);case 12:if(!o){e.next=15;break}return e.next=15,Se()(o);case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"goLive",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>0&&void 0!==r[0]?r[0]:1e3,!this.isLive){e.next=3;break}return e.abrupt("return");case 3:return this.stop(),this.currentTraveledTimestamp=void 0,this.events=[],this.castedEvents=[],this.start(this.startOptions),this.isLive=!0,e.next=11,this.fastForward(this.liveEvents);case 11:if(!n){e.next=14;break}return e.next=14,Se()(n);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),en=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.eventProcessor=void 0,this.sessionReplayer=void 0,this.eventHandlers=void 0,this.sessionReplayer=new Jt(t),this.eventProcessor=new Ie.u({eventHandlers:new we.E})}return(0,s.Z)(e,[{key:"setEventHandlers",value:function(e){this.eventHandlers=e,this.eventProcessor.setHandlers(this.eventHandlers)}},{key:"start",value:function(e){this.sessionReplayer.start(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.preCastEvent(n);case 2:return e.next=4,this.sessionReplayer.fastForward([n]);case 4:return e.next=6,this.eventProcessor.processEvent(n);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"skipEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.skipEvents(n);case 2:return e.next=4,this.sessionReplayer.fastForward(n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stop",value:function(){this.sessionReplayer.stop()}}]),e}(),tn=function(e){(0,V.Z)(i,e);var n=(0,j.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).pageIdentifiers=void 0,e.elementSelector=new ye,e.appSpecificRules=void 0,e.setEventHandlers(new xe({sessionMirror:e.sessionReplayer,elementSelector:e.elementSelector})),e}return(0,s.Z)(i,[{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward;this.eventHandlers.setConfiguration({enableRecordingAvailableInteractableElements:t,useTextInputFastForward:n})}},{key:"setEvents",value:function(e){this.eventHandlers.setEvents(e)}},{key:"setOptions",value:function(e){this.elementSelector.setOptions({defaultExtractReducedHtmlAndSelector:e.extractReducedHTML,defaultInspectInteractableElements:e.inspectInteractables})}},{key:"setAppRules",value:function(e){this.appSpecificRules=e,this.elementSelector.setAppRules(e),this.eventHandlers.setAppRules(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Y.Z)((0,Q.Z)(i.prototype),"handleEvent",this).call(this,n);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),i}(en),nn=n(4925),rn=function(e){return e.TextElementAppear="text_element_appear",e.TextElementDisappear="text_element_disappear",e.PageUrlChange="page_url_change",e.Custom="custom_assertion",e}({}),on=function(){function e(t){var n=this;(0,a.Z)(this,e),this.urlChangeEventCallback=void 0,this.currentURL=void 0,this.originalPushState=void 0,this.originalReplaceState=void 0,this.onURLChange=function(){try{var e=Date.now();setTimeout((function(){var t=window.location.href;if(t!==n.currentURL){n.currentURL=t;var r={url:t,timestamp:e};n.urlChangeEventCallback(r)}}))}catch(Et){}},this.urlChangeEventCallback=t}return(0,s.Z)(e,[{key:"startMonitoring",value:function(){this.toggleWindowEventListeners(!0),this.overrideHistoryStateChanges(),this.currentURL=window.location.href}},{key:"stopMonitoring",value:function(){this.toggleWindowEventListeners(!1),this.restoreHistoryStateChanges()}},{key:"toggleWindowEventListeners",value:function(t){var n=this,r=t?"addEventListener":"removeEventListener";e.WINDOW_EVENTS.forEach((function(e){window[r](e,n.onURLChange)}))}},{key:"overrideHistoryStateChanges",value:function(){var e=this;this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState,this.originalPushState&&(window.history.pushState=function(){e.onURLChange();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.originalPushState.apply(window.history,n)}),this.originalReplaceState&&(window.history.replaceState=function(){e.onURLChange();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.originalReplaceState.apply(window.history,n)})}},{key:"restoreHistoryStateChanges",value:function(){this.originalPushState&&(window.history.pushState=this.originalPushState),this.originalReplaceState&&(window.history.replaceState=this.originalReplaceState)}}]),e}();on.WINDOW_EVENTS=["popstate","locationchange","hashchange"],function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Xt||(Xt={}));new WeakMap;var an=/(max|min)-device-(width|height)/,sn=(new RegExp(an.source,"g"),/([^\\]):hover/);new RegExp(sn.source,"g");var un=function(e){return e.replace(/\u200b/g,"").trim().replace(/\s+/g," ")};function cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,n=t.get(e);if(void 0!==n)return n;if(n={full:"",normalized:"",immediate:[]},e instanceof Element&&e.getElementsByTagName("*").length>100)return n;if(!function(e){var t=e.ownerDocument;return"SCRIPT"===e.nodeName||"NOSCRIPT"===e.nodeName||"STYLE"===e.nodeName||t.head&&t.head.contains(e)}(e)){var r="";if(e instanceof HTMLInputElement&&("submit"===e.type||"button"===e.type))n={full:e.value,normalized:un(e.value),immediate:[e.value]};else{for(var i=e.firstChild;i;i=i.nextSibling)i.nodeType===Node.TEXT_NODE?(n.full+=i.nodeValue||"",r+=i.nodeValue||""):(r&&n.immediate.push(r),r="",i.nodeType===Node.ELEMENT_NODE&&(n.full+=cn(i,t).full));r&&n.immediate.push(r),e.shadowRoot&&(n.full+=cn(e.shadowRoot,t).full),n.full&&(n.normalized=un(n.full))}}return t.set(e,n),n}var ln,dn=function(e,t){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,t):void 0},fn=function(e){var t=e.ownerDocument.createRange();t.selectNode(e);var n=t.getBoundingClientRect();return n.width>0&&n.height>0};function hn(e){var t=dn(e);if(!t)return!0;if("contents"===t.display){for(var n=e.firstChild;n;n=n.nextSibling){if(1===n.nodeType&&hn(n))return!0;if(3===n.nodeType&&fn(n))return!0}return!1}if(!function(e,t){var n;if(!(t=null!==(n=t)&&void 0!==n?n:dn(e)))return!0;if(Element.prototype.checkVisibility){if(!e.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!1}))return!1}else{var r=e.closest("details,summary");if(r!==e&&"DETAILS"===(null===r||void 0===r?void 0:r.nodeName)&&!r.open)return!1}return"visible"===t.visibility}(e,t))return!1;var r=e.getBoundingClientRect();return r.width>0&&r.height>0}var pn=function(e){(0,V.Z)(n,e);var t=(0,j.Z)(n);function n(e){var r,i=e.sessionMirror,o=e.elementSelectorGenerator,s=e.assertionsConfig;return(0,a.Z)(this,n),(r=t.call(this)).sessionMirror=void 0,r.elementSelectorGenerator=void 0,r.urlObserver=void 0,r.assertionsConfig=void 0,r.isMonitoring=void 0,r.assertions=[],r.urlChangeCount=0,r.previousDomState=void 0,r.currentDomState=void 0,r.elementSelectorGenerator=o,r.sessionMirror=i,r.isMonitoring=!1,r.assertionsConfig=s,r.urlObserver=new on(r.handleUrlChange.bind((0,Ne.Z)(r))),r}return(0,s.Z)(n,[{key:"startMonitoring",value:function(){this.isMonitoring=!0,this.urlChangeCount=0,this.urlObserver.startMonitoring(),this.previousDomState=this.calculateDomState(),this.currentDomState=this.previousDomState}},{key:"calculateDomState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this.getChangedRrwebNodeIds(e),r=this.getElementByNodeId(t),i=this.getParentNodeIdByNodeId(t),o=this.getElementVisibilityByElementId(t),a=this.getMaxDistanceToTextNodeByNodeId(),s=this.getInnerTextByResolvedVisibleNodeId(t,o,i,a);return{nodeByNodeId:r,visibilityByElementId:o,parentNodeIdByNodeId:i,innerTextByResolvedVisibleNodeId:s,resolvedVisibleNodesIdsByInnerText:n.groupMapByValue(s),childrenNodeIdsByNodeId:n.groupMapByValue(i),maxDistanceToTextNodeByNodeId:a}}},{key:"createMapByNodeId",value:function(e,t,n){var r=this,i=new Map(e),o=new Set(t),a=Array.from(o),s=function(e){var t=r.getRrwebNodeId(e);void 0===t||o.has(t)||(o.add(t),a.push(t))};t.forEach((function(e){var t=r.getNodeById(e);if(t)for(var n=0;n<3&&t.parentElement&&(t.parentElement&&!(t.parentElement instanceof HTMLBodyElement));n++)t=t.parentElement,s(t)}));for(var u=0;u<a.length;u++){var c=a[u],l=this.getNodeById(c);if(l){var d=n(c,l);d!==e.get(c)&&(null===d?i.delete(c):i.set(c,d),this.getRelatedNodes(l).forEach(s))}else i.delete(c)}return i}},{key:"getElementByNodeId",value:function(e){var t,n;return this.createMapByNodeId(null!==(t=null===(n=this.previousDomState)||void 0===n?void 0:n.nodeByNodeId)&&void 0!==t?t:new Map,e,(function(e,t){return t}))}},{key:"getParentNodeIdByNodeId",value:function(e){var t,n,r=this;return this.createMapByNodeId(null!==(t=null===(n=this.previousDomState)||void 0===n?void 0:n.parentNodeIdByNodeId)&&void 0!==t?t:new Map,e,(function(e,t){if(!(t instanceof HTMLBodyElement)){if(!t.isConnected)return null;if(t.parentElement)return r.getRrwebNodeId(t.parentElement)}}))}},{key:"getElementVisibilityByElementId",value:function(e){var t,n;return this.createMapByNodeId(null!==(t=null===(n=this.previousDomState)||void 0===n?void 0:n.visibilityByElementId)&&void 0!==t?t:new Map,e,(function(e,t){if(t.nodeType===Node.ELEMENT_NODE)return hn(t)}))}},{key:"getInnerTextByResolvedVisibleNodeId",value:function(e,t,n,r){var i,o,a=this,s=null!==(i=null===(o=this.previousDomState)||void 0===o?void 0:o.innerTextByResolvedVisibleNodeId)&&void 0!==i?i:new Map,u=new Map;return this.createMapByNodeId(s,e,(function(e,i){var o,s,c;if(i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE){if(!(i.nodeType===Node.ELEMENT_NODE?t.get(e):n.get(e)&&t.get(n.get(e))))return null;var l=i.nodeType===Node.ELEMENT_NODE&&(null!==(o=r.get(e))&&void 0!==o?o:0)<=a.assertionsConfig.maxDistanceFromTextNode?cn(i,u).normalized:null!==(s=null===(c=i.textContent)||void 0===c?void 0:c.trim())&&void 0!==s?s:"";return 0===l.length||l.length>a.assertionsConfig.assertionsTextMaxLength||(i.nodeType===Node.ELEMENT_NODE?Array.from(i.childNodes).filter((function(e){return e.nodeType===Node.ELEMENT_NODE})):[]).some((function(e){return cn(e,u).normalized===l}))?null:l}}))}},{key:"getRelatedNodes",value:function(e){return e.childNodes?Array.from(e.childNodes):[]}},{key:"getRrwebNodeId",value:function(e){var t,n=null===(t=this.sessionMirror.getMeta(e))||void 0===t?void 0:t.id;if(n)return n;console.log("no meta for node",e)}},{key:"filterCoveredBranches",value:function(e,t,n){var r,i=this;if(1===e.maxDepthFromTextNode)return!0;var o=function(e){return n.innerTextByResolvedVisibleNodeId.has(i.getRrwebNodeId(e))},a=e.element;if((null!==(r=n.childrenNodeIdsByNodeId.get(e.nodeId))&&void 0!==r?r:[]).map((function(e){return n.nodeByNodeId.get(e)})).filter((function(e){return e.nodeType===Node.TEXT_NODE&&o(e)})).length>0)return!0;var s=Array.from(a.children).filter((function(e){return e instanceof HTMLElement})).filter(o);if(0===s.length)return!1;var u=s.filter((function(e){return t.some((function(t){return t.element===e}))}));return u.length!==s.length}},{key:"filterCoveredLeaves",value:function(e,t,n){var r=n.parentNodeIdByNodeId.get(e.nodeId);return!t.find((function(e){return e.nodeId===r}))}},{key:"filterUniqueTextAssertionsByTagPriority",value:function(e){var t=new Map;return e.forEach((function(e){var r=e.text,i=t.get(r);(!i||n.getTagPrecedenceIndex(e.element)<n.getTagPrecedenceIndex(i.element))&&t.set(r,e)})),Array.from(t.values())}},{key:"createAssertionsForAllElementsWithText",value:function(e,t,r,i,o){var a,s,u=this,c=null!==(a=r.resolvedVisibleNodesIdsByInnerText.get(e))&&void 0!==a?a:[],l=new Set(null!==(s=t.resolvedVisibleNodesIdsByInnerText.get(e))&&void 0!==s?s:[]);return c.filter((function(e){return!l.has(e)})).filter((function(e){var t=r.nodeByNodeId.get(e);return(null===t||void 0===t?void 0:t.nodeType)===Node.ELEMENT_NODE&&!n.EXCLUDED_TAGS_FOR_ASSERTION.includes(t.tagName)})).filter((function(e){var n=r.maxDistanceToTextNodeByNodeId.get(e),i=t.maxDistanceToTextNodeByNodeId.get(e);return n<=u.assertionsConfig.maxDistanceFromTextNode&&(!i||i<=u.assertionsConfig.maxDistanceFromTextNode)})).map((function(t){var n=r.nodeByNodeId.get(t),a=u.getLowestAncestorIdWithSameVisibility(n,i);return{type:i,text:e,element:n,nodeId:t,tag:n.tagName.toLowerCase(),timestamp:o,domTreeRootId:a,maxDepthFromTextNode:r.maxDistanceToTextNodeByNodeId.get(t)}}))}},{key:"generateAssertionsForNextTexts",value:function(e,t,r,i){var o,a=this,s=Array.from(r.resolvedVisibleNodesIdsByInnerText.keys()).filter((function(e){return!t.resolvedVisibleNodesIdsByInnerText.has(e)})).filter(this.assertionsConfig.usePlaywrightGetByText?n.canTextWorkInExactLocator:function(){return!0});if(s.length){var u=s.flatMap((function(n){return a.createAssertionsForAllElementsWithText(n,t,r,e,i)}));this.assertionsConfig.removeCoveredBranches&&(u=u.filter((function(e){return a.filterCoveredBranches(e,u,r)}))),this.assertionsConfig.removeCoveredLeaves&&(u=u.filter((function(e){return a.filterCoveredLeaves(e,u,r)}))),u=this.filterUniqueTextAssertionsByTagPriority(u);var c=this.groupAssertionByDomRoot(u);(o=this.assertions).push.apply(o,(0,x.Z)(c.map((function(e){return e.sort(n.sortByTagPrecedenceThenYPosition)}))))}}},{key:"getLowestAncestorIdWithSameVisibility",value:function(e,t){for(var n,r=this.getRrwebNodeId(e),i=t===rn.TextElementAppear;e.parentElement;){var o,a=this.getRrwebNodeId(e.parentElement);if((null!==(o=this.currentDomState.visibilityByElementId.get(a))&&void 0!==o&&o)!==i)break;e=e.parentElement,r=a}return null!==(n=r)&&void 0!==n?n:-1}},{key:"groupAssertionByDomRoot",value:function(e){var t=new Map;return e.forEach((function(e){var n;t.set(e.domTreeRootId,[].concat((0,x.Z)(null!==(n=t.get(e.domTreeRootId))&&void 0!==n?n:[]),[e]))})),Array.from(t.values())}},{key:"isTextVisibilityChanged",value:function(){var e,t;return e=new Set(this.previousDomState.resolvedVisibleNodesIdsByInnerText.keys()),t=new Set(this.currentDomState.resolvedVisibleNodesIdsByInnerText.keys()),(0,x.Z)(e).some((function(e){return!t.has(e)}))||(0,x.Z)(t).some((function(t){return!e.has(t)}))}},{key:"generateAssertions",value:function(){var e=this;return this.log("possible assertions count before filtering",this.countPossibleAssertions()),this.filterAssertionsWithSameText(),this.validateAssertionsVisibilityInCurrentDom(),this.filterUrlChangeAssertionsBeforeLast(),this.log("possible assertions count after filtering",this.countPossibleAssertions()),this.getAssertionsDomSlicing().map((function(t,n){return e.assertions[n].slice(0,t)})).flat()}},{key:"getAssertionsDomSlicing",value:function(){var e=this,t=function(e){return e.reduce((function(e,t){return e+t}),0)},n=this.assertions.map((function(t){return Math.min(t.length,e.assertionsConfig.maxAssertionsPerDomTree)}));if(t(n)<=this.assertionsConfig.maxAssertions)return n;for(var r=this.assertions.map((function(){return 1})),i=0;i<this.assertions.length&&t(r)<this.assertionsConfig.maxAssertions;i++)r[i]<n[i]&&r[i]++,i===this.assertions.length-1&&(i=0);return r}},{key:"filterAssertionsWithSameText",value:function(){var e,t=new Map,n=(0,U.Z)(this.assertions);try{for(n.s();!(e=n.n()).done;){var r,i=e.value,o=(0,U.Z)(i);try{for(o.s();!(r=o.n()).done;){var a,s=r.value;if(s.type!==rn.PageUrlChange){var u=s.text;t.set(u,(null!==(a=t.get(u))&&void 0!==a?a:0)+1)}}}catch(l){o.e(l)}finally{o.f()}}}catch(l){n.e(l)}finally{n.f()}for(var c=0;c<this.assertions.length;c++)this.assertions[c]=this.assertions[c].filter((function(e){return e.type===rn.PageUrlChange||1===t.get(e.text)})),0===this.assertions[c].length&&(this.assertions.splice(c,1),c--)}},{key:"validateAssertionsVisibilityInCurrentDom",value:function(){for(var e=this,t=0;t<this.assertions.length;t++)this.assertions[t]=this.assertions[t].filter((function(t){var n=e.validateAssertionVisibilityInCurrentDom(t);return n||e.log("Assertion removed due to visibility validation",t),n}))}},{key:"validateAssertionVisibilityInCurrentDom",value:function(e){if(e.type===rn.PageUrlChange)return!0;if(!this.assertionsConfig.usePlaywrightGetByText)return!0;var t=e.text,r=[];try{r=n.getElementsByTextWithPlaywright(t)}catch(Et){return!1}if(r.length>1)return!1;if(0===r.length)return e.type===rn.TextElementDisappear;var i=r[0];return e.type===(hn(i)?rn.TextElementAppear:rn.TextElementDisappear)}},{key:"filterUrlChangeAssertionsBeforeLast",value:function(){var e=this.assertions.map((function(e,t){return{assertionTree:e,index:t}})).filter((function(e){var t;return(null===(t=e.assertionTree[0])||void 0===t?void 0:t.type)===rn.PageUrlChange})).map((function(e){return e.index}));e.length<=1||(e.pop(),this.assertions=this.assertions.filter((function(t,n){return!e.includes(n)})))}},{key:"countPossibleAssertions",value:function(){return this.assertions.reduce((function(e,t){return e+t.length}),0)}},{key:"stopMonitoringAndGenerateAssertions",value:function(){var e=this.generateAssertions();return this.stopMonitoring(),e}},{key:"stopMonitoring",value:function(){this.isMonitoring=!1,this.urlObserver.stopMonitoring(),this.assertions=[],this.urlChangeCount=0,this.previousDomState=void 0,this.currentDomState=void 0}},{key:"handleMutation",value:function(e,t){this.isMonitoring&&(this.processMutationData(e),this.currentDomState=this.calculateDomState(e),this.isTextVisibilityChanged()&&(this.log("mutation data",e),this.generateAssertionsForNextTexts(rn.TextElementDisappear,this.currentDomState,this.previousDomState,t.timestamp),this.generateAssertionsForNextTexts(rn.TextElementAppear,this.previousDomState,this.currentDomState,t.timestamp),this.previousDomState=this.currentDomState))}},{key:"processMutationData",value:function(e){try{var t=function(e){var t={};return e.filter((function(e){var n=e.parentId;return t[n]=n in t?t[n]+1:0,t[n]<=50}))};e.adds=t(e.adds),e.removes=t(e.removes)}catch(Et){console.error("Error while filtering mutation data")}}},{key:"handleUrlChange",value:function(e){if(this.isMonitoring){this.urlChangeCount++;var t={type:rn.PageUrlChange,url:e.url,urlChangeCount:this.urlChangeCount};this.log("new url change assertion",t),this.assertions.push([t])}}},{key:"getNodesByDepthDesc",value:function(){for(var e=[],t=[document.body];t.length>0;)e.push.apply(e,(0,x.Z)(t)),t=t.flatMap((function(e){return e.nodeType===Node.ELEMENT_NODE&&"svg"===e.tagName?[]:Array.from(e.childNodes).filter((function(e){return n.TRACKED_NODE_TYPES.includes(e.nodeType)}))}));return e.reverse()}},{key:"getMaxDistanceToTextNodeByNodeId",value:function(){var e=this,t=new Map;return this.getNodesByDepthDesc().forEach((function(r){var i=e.getRrwebNodeId(r);if(n.TRACKED_NODE_TYPES.includes(r.nodeType))if(r.nodeType===Node.TEXT_NODE){var o,a;(null!==(o=null===(a=r.textContent)||void 0===a?void 0:a.trim())&&void 0!==o?o:"")&&t.set(i,0)}else{var s=Array.from(r.childNodes).map((function(n){return t.get(e.getRrwebNodeId(n))})).filter((function(e){return void 0!==e}));s.length>0&&t.set(i,1+Math.max.apply(Math,(0,x.Z)(s)))}})),t}},{key:"getNodeById",value:function(e){var t,n,r;return null!==(t=this.sessionMirror.getNodeById(e))&&void 0!==t?t:null===(n=this.previousDomState)||void 0===n||null===(r=n.nodeByNodeId)||void 0===r?void 0:r.get(e)}},{key:"getInitialRrwebNodeIds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return[this.getRrwebNodeId(e)].concat((0,x.Z)(Array.from(e.childNodes).flatMap(this.getInitialRrwebNodeIds.bind(this))))}},{key:"filterAddsToTrackedNode",value:function(e){var t=this,n=new Map(e.map((function(e){return[e.node.id,e.parentId]})));return e.filter((function(e){return t.currentDomState.nodeByNodeId.has(function(e){for(;n.has(e);)e=n.get(e);return e}(e.node.id))}))}},{key:"getAllDescendantsIds",value:function(e){var t=this.currentDomState.childrenNodeIdsByNodeId.get(e);return t?[].concat((0,x.Z)(t),(0,x.Z)(t.flatMap(this.getAllDescendantsIds.bind(this)))):[]}},{key:"getChangedRrwebNodeIds",value:function(e){var t=this;if(!e)return new Set(this.getInitialRrwebNodeIds());var r=e.adds.filter((function(e){return e.node.type===Xt.Element&&!n.UNTRACKED_TAGS.includes(e.node.tagName)||e.node.type===Xt.Text}));r=this.filterAddsToTrackedNode(r);var i=function(e){var n=e.id;return t.currentDomState.nodeByNodeId.has(n)},o=e.removes.filter(i),a=o.flatMap((function(e){var n=e.id;return[n].concat((0,x.Z)(t.getAllDescendantsIds(n)))})),s=o.map((function(e){return e.parentId}));return new Set([].concat((0,x.Z)(r.flatMap((function(e){return[e.node.id,e.parentId]}))),(0,x.Z)(a),(0,x.Z)(s),(0,x.Z)(e.attributes.filter(i).flatMap((function(e){var n=e.id;return[n].concat((0,x.Z)(t.getAllDescendantsIds(n)))}))),(0,x.Z)(e.texts.filter(i).flatMap((function(e){var n,r,i=e.id;return[null===(n=t.currentDomState)||void 0===n||null===(r=n.parentNodeIdByNodeId)||void 0===r?void 0:r.get(i),i]})))).filter((function(e){return void 0!==e})))}},{key:"log",value:function(){var e;n.LOG_TO_CONSOLE&&(e=console).log.apply(e,arguments)}}],[{key:"groupMapByValue",value:function(e){var t=new Map;return e.forEach((function(e,n){var r=t.get(e)||[];t.set(e,[].concat((0,x.Z)(r),[n]))})),t}},{key:"canTextWorkInExactLocator",value:function(e){return n.getElementsByTextWithPlaywright(e).length<2}},{key:"getElementsByTextWithPlaywright",value:function(e){return window.playwright.getByText(e,{exact:!0}).elements}},{key:"sortByTagPrecedenceThenYPosition",value:function(e,t){var r=e.type===rn.TextElementAppear,i=e.element,o=t.element,a=5e3*(n.getTagPrecedenceIndex(i)-n.getTagPrecedenceIndex(o));return r&&(a+=i.getBoundingClientRect().top-o.getBoundingClientRect().top),a}}]),n}(we.E);ln=pn,pn.LOG_TO_CONSOLE=!1,pn.TAG_PRECEDENCE_ORDERING=["h1","h2","h3","h4","h5","h6","a","span","div"],pn.UNTRACKED_TAGS=["script","style"],pn.TRACKED_NODE_TYPES=[Node.ELEMENT_NODE,Node.DOCUMENT_NODE,Node.TEXT_NODE],pn.EXCLUDED_TAGS_FOR_ASSERTION=["OPTION"],pn.getTagPrecedenceIndex=function(e){var t,n=ln.TAG_PRECEDENCE_ORDERING.indexOf(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase());return-1===n?ln.TAG_PRECEDENCE_ORDERING.length:n};var vn=n(408),mn=["aria-label","aria-labelledby","label","title","alt"];function gn(e){var t,n;return null!==(t=e._debugSource)&&void 0!==t&&t.fileName?null===(n=e._debugSource)||void 0===n?void 0:n.fileName:""}function yn(e,t){if("Unknown"===e)return!1;if("string"!==typeof e)return!1;if(e[0]!==e[0].toUpperCase())return!1;if(t.type.$$typeof===Symbol.for("react.context")||t.type.$$typeof===Symbol.for("react.forward_ref")||t.type.$$typeof===Symbol.for("react.memo")||t.type.$$typeof===Symbol.for("react.profiler")||t.type.$$typeof===Symbol.for("react.suspense"))return!1;var n=gn(t);return!/.*\/node_modules\//.test(n)&&e!==n&&!/^(?!.*src).*$/.test(n)}function bn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return["",{}];var n=e.type,r=n?n.name||n:"Unknown",i="";if(yn(r,e)){i+="<".concat(r,">");var o=gn(e);t[r]=o}if(e.child){var a=bn(e.child,t),s=(0,Ce.Z)(a,2),u=s[0],c=s[1];i+=u,t=(0,l.Z)((0,l.Z)({},t),c)}if(yn(r,e)&&(i+="</".concat(r,">")),e.sibling){var d=bn(e.sibling,t),f=(0,Ce.Z)(d,2),h=f[0],p=f[1];i+=h,t=(0,l.Z)((0,l.Z)({},t),p)}return[i,t]}function wn(e){var t,n=null===(t=e._reactRootContainer)||void 0===t?void 0:t._internalRoot.current;return n||console.log("No react tree in element",e),bn(n)}var kn=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"setPrefix",value:function(e){}}]),e}();kn.original={};var En,Sn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.map((function(e){return e.target}))},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collectElement:!0};(0,a.Z)(this,e),this.filterElements=t,this.observeOptions=n,this.options=r,this.elements=void 0,this.observer=void 0,this.mutationEventListeners=[]}return(0,s.Z)(e,[{key:"addEventListener",value:function(e,t){this.mutationEventListeners.push({selector:e,listener:t})}},{key:"startListening",value:function(){var e=this;this.elements=[],this.observer=new MutationObserver((function(t){e.options.collectElement&&(e.elements=[].concat((0,x.Z)(e.elements),(0,x.Z)(e.filterElements(t)))),e.mutationEventListeners.length&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE){var n=t;e.mutationEventListeners.forEach((function(e){n.matches(e.selector)?e.listener(n):n.querySelectorAll(e.selector).forEach((function(t){e.listener(t)}))}))}}))}))})),this.observer.observe(document.body,this.observeOptions)}},{key:"stopListening",value:function(){return this.observer.disconnect(),this.elements}}]),e}();function xn(e){var t=e.filter((function(e){return e.addedNodes.length>0})).reduce((function(e,t){return[].concat((0,x.Z)(e),(0,x.Z)(t.addedNodes))}),[]),n=e.filter((function(e){return"attributes"===e.type&&"style"===e.attributeName&&e.target instanceof HTMLElement&&/display\s*:\s*none/.test(e.oldValue)&&(0,v.Zl)(e.target).visible})).map((function(e){return e.target}));return[].concat((0,x.Z)(t),(0,x.Z)(n))}function In(e){En=!1;var t=Cn(e);return En?t:null}var Cn=function e(t){var n=function(e){var t=window.getComputedStyle(e).backgroundImage;if(t&&"none"!==t){var n=t.match(/url\("(.+)"\)/);if(n)return En=!0,"BGIMG:".concat(e.tagName.toLowerCase()+n[1])}for(var r=0,i=["::before","::after"];r<i.length;r++){var o=i[r],a=window.getComputedStyle(e,o).content.replace(/['"]/g,""),s=window.getComputedStyle(e,o).fontFamily;if("none"!==a&&""!==a){En=!0;var u=a.charCodeAt(0).toString(16).padStart(4,"0");return"FONT:".concat(e.tagName.toLowerCase()+s+u)}}return e.tagName.toLowerCase()};if(t&&t.nodeType!==Node.TEXT_NODE&&t.tagName){var r=t instanceof SVGElement?function(e){if(!(e.tagName.toLowerCase()in h))return e.tagName.toLowerCase();var t=h[e.tagName.toLowerCase()].map((function(t){return"".concat(t,":").concat(e.getAttribute(t))})).join(",");return t?(En=!0,"SVG:".concat(t)):e.tagName.toLowerCase()}(t):t instanceof HTMLImageElement?function(e){En=!0;var t=n(e);return"IMG:".concat(e.src)+(t!==e.tagName.toLowerCase()?"(".concat(t,")"):"")}(t):n(t);if(t.childNodes.length>0){var i=Array.from(t.childNodes).map(e).filter(Boolean).join("+");i&&i.length>0&&(r+="("+i+")")}return r}};function Tn(e,t){var n,r=function(e,t){for(var n=new Set;e;)n.add(e),e=e.parentNode;for(;t;){if(n.has(t))return t;t=t.parentNode}return null}(e,t),i=0;if(!r)return 99999;for(n=e;n&&n!==r;)i++,n=n.parentNode;for(n=t;n&&n!==r;)i++,n=n.parentNode;return i}var Mn=function(){function e(t,n){(0,a.Z)(this,e),this.rawDbName=t,this.storeName=n,this.db=null,this._dbName=void 0}return(0,s.Z)(e,[{key:"getDBName",value:function(){if(!this._dbName){if(!window.name){var e,t=null!==(e=window.sessionStorage.getItem("nextTabIndex"))&&void 0!==e?e:"0";window.name=t,window.sessionStorage.setItem("nextTabIndex","".concat(parseInt(t)+1))}this._dbName="".concat(this.rawDbName,"-").concat(window.name)}return this._dbName}},{key:"open",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new Promise((function(n,r){var i=indexedDB.open(e.getDBName(),t);i.onupgradeneeded=function(t){e.db=i.result,e.db.objectStoreNames.contains(e.storeName)||e.db.createObjectStore(e.storeName)},i.onsuccess=function(t){e.db=i.result,n(e.db)},i.onerror=function(e){console.log("IndexedDBClient.open() error",e,i.error),r(i.error)}}))}},{key:"count",value:function(){var e=this;return new Promise((function(t,n){if(e.db){var r=e.db.transaction([e.storeName]).objectStore(e.storeName).count();r.onsuccess=function(){return t(r.result)},r.onerror=function(){return n(r.error)}}else n("Database has not been initialized")}))}},{key:"set",value:function(e,t){var n=this;return new Promise((function(r,i){if(n.db){var o=n.db.transaction([n.storeName],"readwrite").objectStore(n.storeName).add(e,t);o.onsuccess=function(){return r()},o.onerror=function(){return i(o.error)}}else i("Database has not been initialized")}))}},{key:"get",value:function(e,t,n){var r=this;return new Promise((function(i,o){if(r.db){var a=r.db.transaction([r.storeName]).objectStore(r.storeName),s=e?a.getAll(t,n):a.get(t);s.onsuccess=function(){return i(s.result)},s.onerror=function(){return o(s.error)}}else o("Database has not been initialized")}))}},{key:"getOne",value:function(e){return this.get(!1,e)}},{key:"getAll",value:function(e,t){return this.get(!0,e,t)}}]),e}(),Nn=["element","innerText"],An=function(e){(0,V.Z)(i,e);var n=(0,j.Z)(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)(this,i),kn.setPrefix("$checksum"),(e=n.call(this)).options={skipElementHighlighting:!1},e.elementSelector=void 0,e.testIdCounter=0,e.currentESRASelector=void 0,e.lastHighlights=[],e.assertionGenerator=void 0,e.initialized=!1,e.htmlReducer=void 0,e.appSpecificRules=void 0,e.config=void 0,e.rrwebEventsIndexedDB=void 0,e.rrwebEventsLoaded=!1,e.loadRRwebEvents=[],e.rrwebCrossFrameEventIdCounter=0,e.mutationDetector=void 0,e.elementSelector=new X,e.options=(0,l.Z)((0,l.Z)({},e.options),t),e.htmlReducer=new ge,e}return(0,s.Z)(i,[{key:"init",value:function(e){var t,n,r,i,o=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=s.assertionGenerator,c=void 0===u||u,d=s.sessionRecorder,f=void 0===d||d,h=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.appSpecificRules=e,this.config=a,this.options=(0,l.Z)((0,l.Z)({},this.options),h),!this.initialized){this.initialized=!0;var p,v,m=f||c;if(m&&(p=new vn.L((function(e){return o.onRRwebEvent(e),o.eventProcessor.processEvent(e)})),this.initRRwebEvents()),c)this.assertionGenerator=new pn({sessionMirror:p,elementSelectorGenerator:this.elementSelector,assertionsConfig:null!==(v=this.config.assertionsConfig)&&void 0!==v?v:{maxAssertionsPerDomTree:2,maxAssertions:10,assertionsTextMaxLength:200,maxDistanceFromTextNode:2,removeCoveredLeaves:!1,removeCoveredBranches:!1,usePlaywrightGetByText:!0}});m&&p.start(),c&&this.setEventHandlers(this.assertionGenerator),q.limitChildren=null!==(t=null===(n=this.appSpecificRules)||void 0===n||null===(r=n.esraSelectionRules)||void 0===r?void 0:r.limitChildren)&&void 0!==t?t:[],q.timeout=this.config.esraTimeout,null!==(i=this.config.logPrefix)&&void 0!==i&&i.length&&kn.setPrefix(this.config.logPrefix)}}},{key:"getElementSelector",value:function(){return this.elementSelector}},{key:"getLastSelectionLogs",value:function(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}},{key:"getBestMatchingElementSimilarityScore",value:function(e){return this.currentESRASelector=new q(e),this.currentESRASelector.selectOne().score}},{key:"extractESRAMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new B(document).extract(n).toMetadata());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"select",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.elementSelector.selector(n,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getSelectionDataForSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.elementSelector.selector(n,r);case 3:if(a=e.sent){e.next=7;break}return console.warn("could not find element for selector: "+n),e.abrupt("return",null);case 7:return e.next=9,this.elementSelector.getSelectorAndLocator(a,{testIdSelector:null===(i=this.appSpecificRules)||void 0===i||null===(o=i.esraSelectionRules)||void 0===o?void 0:o.testIdSelector});case 9:return s=e.sent,u=s.locator,e.next=13,this.extractESRAMetadata(a);case 13:return c=e.sent,e.abrupt("return",{generatedLocator:u,esraMetadata:c,selector:n,parentFramesSelectors:r});case 17:return e.prev=17,e.t0=e.catch(0),console.log("getMetadataForSelector exception",e.t0),e.abrupt("return");case 21:case"end":return e.stop()}}),e,this,[[0,17]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=h.length>1&&void 0!==h[1]?h[1]:{minSelectionScore:.3}).minSelectionScore,o=r.cachedSelector,a=r.staticMetadata,s=h.length>2&&void 0!==h[2]&&h[2],e.prev=2,!o){e.next=8;break}return console.log("Trying to locate using cached selector",o),e.next=7,this.elementSelector.selector(o);case 7:u=e.sent;case 8:if(u||(console.log("Trying to locate using ESRA",n),w(a)&&console.log("and static data",a),this.currentESRASelector=new q(n,a),(d=this.currentESRASelector.selectOne({minSelectionScore:i})).score>=i?(u=d.candidate,c=d.score,l=d.clickOffset):console.log("Best matching element was below threshold",d)),console.log(u?["Located with score ".concat(c),u]:"Element not located"),u){e.next=12;break}return e.abrupt("return");case 12:return s&&new P.t(u).scrollIntoView(),this.highlightElement(u),e.next=16,this.makeMatchingElementSelectionData(u,c);case 16:return f=e.sent,l&&(f.clickOffset=l),e.abrupt("return",f);case 21:return e.prev=21,e.t0=e.catch(2),console.log("getMatchingElementSelectionData exception",e.t0),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[2,21]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAllInteractableElementsForLastSelectQuery",value:function(){var e=this,n=this.currentESRASelector.getFinalCandidates();return Promise.all(n.map(function(){var n=(0,r.Z)((0,t.Z)().mark((function n(r){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=r.esraMetadata,t.next=3,e.makeMatchingElementSelectionData(r.candidate,r.score);case 3:return t.t1=t.sent,t.abrupt("return",{esraMetadata:t.t0,selectionData:t.t1});case 5:case"end":return t.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()))}},{key:"getInteractableElementsRaw",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,v.w1)());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getInteractableElements",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,v.w1)(),i=new B(document),e.abrupt("return",Promise.all(n.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.extract(n).toMetadata(),e.next=3,o.makeMatchingElementSelectionData(n);case 3:return a=e.sent,e.abrupt("return",{esraMetadata:r,selectionData:a});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getCurrentESRASelector",value:function(){return this.currentESRASelector}},{key:"startFlashingElementsDetection",value:function(){return this.htmlReducer.startFlashingElementsDetection()}},{key:"startMonitoringForAssertions",value:function(){return this.assertionGenerator.startMonitoring()}},{key:"generateAssertions",value:function(){return this.assertionGenerator.generateAssertions()}},{key:"stopMonitoringAndGenerateAssertions",value:function(){return this.assertionGenerator?this.assertionGenerator.stopMonitoringAndGenerateAssertions():(console.warn("Assertion generator not initialized, returning empty assertions"),[])}},{key:"stopMonitoring",value:function(){this.assertionGenerator.stopMonitoring()}},{key:"onRRwebEvent",value:function(e){this.rrwebEventsLoaded?this.rrwebEventsIndexedDB.set(e,this.rrwebCrossFrameEventIdCounter++):this.loadRRwebEvents.push(e)}},{key:"initRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.rrwebEventsIndexedDB=new Mn("checksum","rrwebEvents"),e.prev=1,e.next=4,this.rrwebEventsIndexedDB.open();case 4:e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(1),e.abrupt("return");case 9:return e.next=11,this.rrwebEventsIndexedDB.count();case 11:this.rrwebCrossFrameEventIdCounter=e.sent,this.loadRRwebEvents.forEach((function(e){n.rrwebEventsIndexedDB.set(e,n.rrwebCrossFrameEventIdCounter++)})),this.rrwebEventsLoaded=!0;case 14:case"end":return e.stop()}}),e,this,[[1,6]])})));return function(){return e.apply(this,arguments)}}()},{key:"postRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.rrwebEventsLoaded){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.rrwebEventsIndexedDB.getAll();case 4:return r=e.sent,e.abrupt("return",fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.rrwebEventsLoaded){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.rrwebEventsIndexedDB.getAll(IDBKeyRange.lowerBound(n));case 4:return r=e.sent,e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:{},r=s.length>1&&void 0!==s[1]?s[1]:{},i=s.length>2&&void 0!==s[2]?s[2]:document,e.next=5,this.htmlReducer.reduceHTML((0,l.Z)((0,l.Z)({},this.appSpecificRules),n),r,i);case 5:return o=e.sent,r.extractESRAForInterpretationRequiredElements&&(console.log("Extracting ESRA for interpretation required elements..."),a=this.htmlReducer.getInteractableElementsInReducedHTML(),o.elementsForNodeInterpretation=a.reduce((function(e,t){var n,r=t.checksumId,i=t.element;if(!(i instanceof HTMLElement))return e;if(null!==(n=i.innerText)&&void 0!==n&&n.trim().length)return e;var o=new B(document).extract(i).toMetadata();return[].concat((0,x.Z)(e),[{checksumId:r,esraMetadata:o}])}),[]),console.log("Done with ESRA extraction for interpretation required elements")),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"displayInterpretationForElements",value:function(e){var t=this;this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach((function(n){var r=n.checksumId,i=n.element,o=e[r];o&&(i.isConnected?t.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}}):console.log("Element ".concat(r," is not connected to the DOM, skipping display")))}))}},{key:"overlayInteractableElementsWithChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,d,f,h,p,m=this,g=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=g.length>0&&void 0!==g[0]?g[0]:{}).reduceBeforeRender,i=void 0!==r&&r,o=n.mode,a=void 0===o?"full":o,s=n.textPosition,u=void 0===s?"tag"===a?"above":void 0:s,c=n.shouldFlipHighlightTextOutsideViewport,d=void 0===c||c,f=n.scrollIntoView,h=void 0!==f&&f,this.clearHighlights(),!i){e.next=5;break}return e.next=5,this.reduceHTML();case 5:p=function(e,t,n){if(t.isConnected){var r=t.getBoundingClientRect(),i=r.width,o=r.height;if(!(i<=0||o<=0)){var s=function(e){var t=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return e?t[e%t.length]:"red"}(n);m.highlightElement(t,(0,l.Z)((0,l.Z)({text:e,clear:!1,highlightStyle:{outline:"tag"===a?"3px dashed ".concat(s):"none"}},u?{textPosition:u}:{}),{},{textStyle:function(e){switch(a){case"tag":return{background:e,width:"initial",left:"-2px",border:"3px dashed ".concat(e),"font-weight":"bold"};case"full":return{background:"black",height:"100%"}}}(s),shouldFlipHighlightTextOutsideViewport:d}))}}else console.log("Element ".concat(e," is not connected to the DOM, skipping display"))},this.htmlReducer.getInteractableElementsInReducedHTML().filter((function(e){return!(0,v.GF)(e.element,(0,l.Z)((0,l.Z)({},me),{},{scrollIntoView:h})).isHidden})).forEach((function(e,t){var n=e.checksumId,r=e.element;p(n,r,t)}));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getElementForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.htmlReducer.getSelectorForChecksumId(n);case 2:if(e.t1=r=e.sent,e.t0=null===e.t1,e.t0){e.next=6;break}e.t0=void 0===r;case 6:if(!e.t0){e.next=10;break}e.t2=void 0,e.next=11;break;case 10:e.t2=r.element;case 11:return e.abrupt("return",e.t2);case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSelectorForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.htmlReducer.getSelectorForChecksumId(n);case 2:return r=e.sent,r.element,r.innerText,i=(0,nn.Z)(r,Nn),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"hasInnerTextByChecksumId",value:function(e){return this.htmlReducer.hasInnerTextByChecksumId(e)}},{key:"getSelectorByPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=document.elementFromPoint(n,r),e.next=3,this.elementSelector.getSelectorAndLocator(i);case 3:return o=e.sent,a=o.selector,s=o.locator,u=o.parentFramesSelectors,e.abrupt("return",{selector:a,locator:s,parentFramesSelectors:u});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isInput",value:function(e){var t=(0,v.RA)(e);if(t.length)return["input","textarea"].includes(t[0].tagName.toLowerCase())}},{key:"querySelectorExtended",value:function(e){return(0,v.RA)(e)}},{key:"getReactTree",value:function(e){return wn(e)}},{key:"isHidden",value:function(e,t){return(0,v.GF)(e,t)}},{key:"showGrid",value:function(){this.removeGrid();var e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML='\n .checksum_grid {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAJ1JREFUaEPtksEJgDAUxX73H1oRxAECkSrppacXaNI1M8f84Kz7Idf95XP0kM3yVWSzIFORikgG+lqSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddKwIpJYjK0IVicNKyKJxdiKYHXSsCKSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddLwKSLx38Oej8ZiASoSUGMAAAAASUVORK5CYII=");\n background-repeat: repeat;\n background-size: 20px;\n background-position: 0px 0px;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n z-index: 1000;\n }\n',document.body.prepend(e);var t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}},{key:"removeGrid",value:function(){var e=document.querySelector("#checksum_grid_style");e&&e.remove();var t=document.querySelector(".checksum_grid");t&&t.remove()}},{key:"clearHighlights",value:function(){this.lastHighlights.length&&(this.lastHighlights.forEach((function(e){return e.remove()})),this.lastHighlights=[])}},{key:"highlightElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.highlightStyle,r=void 0===n?{}:n,i=t.textStyle,o=void 0===i?{}:i,a=t.mousePosition,s=t.text,u=t.textType,c=void 0===u?"static":u,l=t.textPosition,d=void 0===l?"overlap":l,f=t.textWidthType,h=void 0===f?"rect":f,p=t.clear,m=void 0===p||p,g=t.shouldFlipHighlightTextOutsideViewport,y=void 0===g||g,b=t.pointerEvents,w=t.classNames,k=void 0===w?[]:w;if(!this.options.skipElementHighlighting&&(m&&this.clearHighlights(),e)){var E=e.ownerDocument,S=(0,v.$s)(e),I=e.getBoundingClientRect(),C=E.createElement("div");if(C.style.outline="2px dashed rgba(255,0,0,.75)",C.style.position=S?"fixed":"absolute",C.style.left=I.left+"px",C.style.top=I.top+"px",C.style.width=I.right-I.left+"px",C.style.height=I.bottom-I.top+"px",C.style.pointerEvents=null!==b&&void 0!==b?b:"none",C.style.zIndex="2147483647",C.className=["checksum-dom-cache-ignore"].concat((0,x.Z)(k)).join(" "),this.mergeStyle(C,r),a){var T=E.createElement("div");if(T.style.position="absolute",T.style.left=+a.x-16+"px",T.style.top=+a.y-16+"px",T.style.color="#004DFF",T.className=["checksum-dom-cache-ignore","mouse-cross"].concat((0,x.Z)(k)).join(" "),T.style.zIndex="2147483648",!E.head.querySelector("style[role=mouse-location]")){var M=E.head.appendChild(E.createElement("style"));M.setAttribute("role","mouse-location"),M.innerHTML=".mouse-cross:before, .mouse-cross:after {position: absolute;left: 15px;content: ' ';height: 33px;width: 3px;background-color: #004DFF;}.mouse-cross:before {transform: rotate(0deg);}.mouse-cross:after {transform: rotate(-90deg);}"}E.body.appendChild(T),this.lastHighlights.push(T)}var N=E.createElement("div");s&&(N.className=["checksum-dom-cache-ignore"].concat((0,x.Z)(k)).join(" "),N.innerText=s,N.style.fontSize="12px",N.style.width="rect"===h?"".concat(I.width,"px"):"auto",N.style.background="#000000a1",N.style.color="white",N.style.padding="5px",N.style.position="absolute",N.style.pointerEvents="none",N.style.userSelect="none","above"===d?N.style.bottom="".concat(I.height,"px"):"below"===d&&(N.style.top="".concat(I.height,"px")),this.mergeStyle(N,o),C.appendChild(N),C.style.pointerEvents=null!==b&&void 0!==b?b:"none","hover"===c&&(N.style.display="none",C.addEventListener("mouseover",(function(){N.style.display="block"})),C.addEventListener("mouseout",(function(){N.style.display="none"})))),E.body.appendChild(C),"above"===d&&(0,v.ZS)(N)>0?(N.style.bottom="initial",N.style.top="".concat(I.height,"px")):"below"===d&&(0,v._N)(N)>0&&(N.style.top="initial",N.style.bottom="".concat(I.height,"px")),this.lastHighlights.push(C),y&&this.flipHighlightTextPositionOutsideViewport(N,d,I.height)}}},{key:"flipHighlightTextPositionOutsideViewport",value:function(e,t,n){"above"===t&&(0,v.ZS)(e)>0?(e.style.bottom="initial",e.style.top="".concat(n,"px")):"below"===t&&(0,v._N)(e)>0&&(e.style.top="initial",e.style.bottom="".concat(n,"px"))}},{key:"getNodeSelector",value:function(e){return(new ye).getSelector(e)}},{key:"startListeningForHTMLChanges",value:function(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new Sn(xn),this.mutationDetector.startListening()}},{key:"stopListeningForHTMLChanges",value:function(e){return this.mutationDetector.stopListening().map((function(e){var t,n;return null===(t=null!==(n=e.innerText)&&void 0!==n?n:e.textContent)||void 0===t?void 0:t.trim()}))}},{key:"recordScrollPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getElementForChecksumId(n);case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:(i=new P.t(r)).getScrollableParentsPositions(),r._checksumScrollHelper=i;case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"restoreScrollPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getElementForChecksumId(n);case 2:if((r=e.sent)&&"_checksumScrollHelper"in r){e.next=5;break}return e.abrupt("return");case 5:r._checksumScrollHelper.restore(),delete r._checksumScrollHelper;case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getElementCaptioningKeyForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.htmlReducer.getElementForChecksumId(n)){e.next=4;break}return console.warn("Element with checksumId ".concat(n," not found")),e.abrupt("return");case 4:return e.abrupt("return",In(r));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"determineClosestNode",value:function(e,t,n){return Tn(e,n)-Tn(t,n)}},{key:"addForceIncludeElement",value:function(e,t){this.htmlReducer.addForceIncludeElement({element:e,checksumid:t})}},{key:"shouldCaptionElement",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{recursive:!0}).recursive,n=this.htmlReducer.getElementForChecksumId(e);if(!n)return!1;for(var r,i=mn,o=!1,a=n,s=function(){var e=function(){var e;return o?a=null===(e=a)||void 0===e?void 0:e.parentElement:o=!0,a}();return i.some((function(t){return e.getAttribute(t)}))||e.querySelectorAll("[checksuminteractable]").length>0||1===i.filter((function(t){return e.querySelectorAll("[".concat(t,"]"))})).length?{v:!1}:t&&function(e){var t=e.parentElement;if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;var n=t.getBoundingClientRect(),r=n.width,i=n.height,o=e.getBoundingClientRect(),a=o.width,s=o.height;return Math.abs(r-a)<15&&Math.abs(i-s)<15}(e)?void 0:0};0!==(r=s());)if(r)return r.v;return!0}},{key:"mergeStyle",value:function(e,t){for(var n in t)e.style[n]=t[n]}},{key:"makeMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i,o){var a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,k,E,S,x,I,C,T;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,f=this.setAndGetTestId(n),h=this.getVisibleParent(n),p=this.setAndGetTestId(h),v=this.getElementAtCenterOfElement(n),m=this.setAndGetTestId(v),g={element:f,visibleElement:p===f?void 0:p,atPointElement:m===f||m===p?void 0:m},e.next=9,this.elementSelector.getSelectorAndLocator(n,{testIdSelector:null===(a=this.appSpecificRules)||void 0===a||null===(s=a.esraSelectionRules)||void 0===s?void 0:s.testIdSelector});case 9:return y=e.sent,e.next=12,this.elementSelector.getSelectorAndLocator(v,{testIdSelector:null===(u=this.appSpecificRules)||void 0===u||null===(c=u.esraSelectionRules)||void 0===c?void 0:c.testIdSelector});case 12:return b=e.sent,e.next=15,this.elementSelector.getSelectorAndLocator(h,{testIdSelector:null===(l=this.appSpecificRules)||void 0===l||null===(d=l.esraSelectionRules)||void 0===d?void 0:d.testIdSelector});case 15:return w=e.sent,k={element:null===y||void 0===y?void 0:y.selector,visibleElement:null===w||void 0===w?void 0:w.selector,atPointElement:null===b||void 0===b?void 0:b.selector},E={element:null===y||void 0===y?void 0:y.parentFramesSelectors,visibleElement:null===w||void 0===w?void 0:w.parentFramesSelectors,atPointElement:null===b||void 0===b?void 0:b.parentFramesSelectors},x={element:(S=function(e){return{tag:e.tagName.toLowerCase()}})(n),visibleElement:g.visibleElement?S(h):void 0,atPointElement:g.atPointElement?S(v):void 0},I=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r!==n||!o){e.next=2;break}return e.abrupt("return",o);case 2:return i=new B(document),e.abrupt("return",i.extract(r).toMetadata());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=23,I(n);case 23:if(e.t0=e.sent,!g.visibleElement){e.next=30;break}return e.next=27,I(h);case 27:e.t1=e.sent,e.next=31;break;case 30:e.t1=void 0;case 31:if(e.t2=e.t1,!g.atPointElement){e.next=38;break}return e.next=35,I(v);case 35:e.t3=e.sent,e.next=39;break;case 38:e.t3=void 0;case 39:return e.t4=e.t3,C={element:e.t0,visibleElement:e.t2,atPointElement:e.t4},T=null===y||void 0===y?void 0:y.locator,e.abrupt("return",{testIds:g,selectors:k,parentFramesSelectors:E,elementData:x,score:i,esraMetadata:C,generatedLocator:T});case 45:return e.prev=45,e.t5=e.catch(0),console.log("[makeMatchingElementSelectionData] exception",e.t5),e.abrupt("return",{testIds:{element:void 0},selectors:{element:void 0},parentFramesSelectors:{element:void 0},elementData:{element:void 0},esraMetadata:{element:void 0},generatedLocator:void 0});case 49:case"end":return e.stop()}}),e,this,[[0,45]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getElementAtCenterOfElement",value:function(e){var t=e.getBoundingClientRect(),n=t.x,r=t.y,i=e.ownerDocument.elementFromPoint(n,r);return i instanceof HTMLElement?i:void 0}},{key:"setAndGetTestId",value:function(e){if(e){var t=e.getAttribute("data-checksum-testid");if(t)return t;var n=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",n),n}}},{key:"getVisibleParent",value:function(e){return e instanceof HTMLElement?null!==e.offsetParent?e:this.getVisibleParent((0,v.nq)(e)):e}}]),i}(en),_n=function(){function e(){(0,a.Z)(this,e),this.goals=void 0,this.goals={}}return(0,s.Z)(e,[{key:"init",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"recordGoalFinished",value:function(e){var t;console.log("Goal reached: ".concat(e)),this.goals[e]||(this.goals[e]=0),this.goals[e]+=1,null===(t=window.checksumai)||void 0===t||t.capture("goal_reached",{goalName:e})}},{key:"getGoals",value:function(){return this.goals}}]),e}(),Rn=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"findSequence",value:function(e,t,n){for(var r=0;r<=e.length-t.length;r++){var i=this.findMatch(r,e,t,n);if(null!==i)return i}return null}},{key:"findMatch",value:function(e,t,n,r){for(var i={},o=[],a=0;a<n.length;a++){var s=t[e+a],u=n[a];if(!this.matchItem(u,s,i,null!==r&&void 0!==r?r:s))return null;o.push(s)}return{items:o,token_values:i}}},{key:"matchItem",value:function(e,t,n,r){if(Array.isArray(e)&&Array.isArray(t))return this.matchArray(e,t,n,r);if("object"===typeof e&&null!==e&&"object"===typeof t&&null!==t){for(var i in e){var o=e[i],a=t[i];if("string"===typeof o&&o.startsWith("$")){if(void 0===n[o])n[o]={value:a,item:r};else if(n[o].value!==a)return!1}else if("object"===typeof o&&null!==o){if(!this.matchItem(o,a,n,r))return!1}else if(o!==a)return!1}return!0}return e===t}},{key:"matchArray",value:function(e,t,n,r){for(var i=0;i<=t.length-e.length;i++){var o=t.slice(i,i+e.length),a=this.findSequence(o,e,r);if(a){for(var s in a.token_values)if(void 0===n[s])n[s]={value:a.token_values[s].value,item:r};else if(n[s].value!==a.token_values[s].value)return!1;return!0}}return!1}},{key:"runExample",value:function(){var t=(new e).findSequence([{x:"banana",id:"1gf3",class:"fruit",index:"3",details:{a:1,b:2,nested:{key:"value1"}},arr:[{a:3,b:2},{a:1,b:2}]},{y:"apple",id:"4gs2",class:"fruit",parentIndex:"3",index:"7",details:{a:1,b:2,nested:{key:"value1"}}}],[{class:"$1",index:"$2",details:{a:1,b:"$3",nested:{key:"$4"}},arr:[{a:1,b:"$5"}]},{class:"$1",parentIndex:"$2",details:{a:1,b:"$3",nested:{key:"$4"}}}]);console.log(t)}}]),e}(),Dn=n(4228),On=function(e){(0,V.Z)(i,e);var n=(0,j.Z)(i);function i(e){var o,s=e.sessionReplayer,u=e.elementSelector;return(0,a.Z)(this,i),(o=n.call(this)).sessionReplayer=void 0,o.elementSelector=void 0,o.events=[],o.interactions=[],o.lastInteractionEventIndex=0,o.sequences=[],o.sequenceMatcher=new Rn,o.inputFilter=void 0,o.clickFilter=void 0,o.releasePendingInputAction=function(){clearTimeout(o.inputFilter.timeout),o.addInteraction(o.inputFilter.action),o.inputFilter=void 0},o.releasePendingClickActions=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];clearTimeout(o.clickFilter.timeout),e&&o.clickFilter.actions.forEach((function(e){return o.addInteraction(e)})),o.clickFilter=void 0},o.dragAndDropSequence={events:[{type:be.tw.IncrementalSnapshot,data:{source:be.yh.MouseInteraction,type:be.Y2.MouseDown}},{type:be.tw.IncrementalSnapshot,data:{source:be.yh.Mutation,adds:[{parentId:"$dropzoneId",node:{id:"$draggableId"}}],removes:[{id:"$draggableId"}]}}],handler:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,a,s,u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.token_values,i=r.$dropzoneId,a=r.$draggableId,s=n.items,e.next=3,o.sessionReplayer.goBack(a.item.timestamp);case 3:return u=a.value,e.next=6,o.getNodeById(u);case 6:if(c=e.sent){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,o.elementSelector.getSelector(c);case 11:return l=e.sent,e.next=14,o.sessionReplayer.goBack(i.item.timestamp);case 14:return d=i.value,e.next=17,o.getNodeById(d);case 17:if(f=e.sent){e.next=20;break}return e.abrupt("return");case 20:return e.next=22,o.elementSelector.getSelector(f);case 22:return h=e.sent,console.log("Drag and drop",l.playwrightLocator,h.playwrightLocator),e.abrupt("return",[o.makePageAction(ke.$.DragAndDrop,s[0],l,{dropTarget:{selector:h.playwrightSelector,locator:h.playwrightLocator,parentFramesSelectors:h.playwrightParentFramesSelectors,esraMetadata:h.esraMetadata}})]);case 25:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},o.maxNumberOfGetNodeRetries=3,o.sessionReplayer=s,o.elementSelector=u,o.buildSequences(),o}return(0,s.Z)(i,[{key:"getInteractions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.interactions.slice(e)}},{key:"preEvent",value:function(e){this.inputFilter&&this.isActionEvent(e)&&!this.isConsecutiveInputEvent(e)&&this.releasePendingInputAction(),this.clickFilter&&this.isActionEvent(e)&&!this.isConsecutiveClickEvent(e)&&this.releasePendingClickActions(),this.events.push(e)}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.performSequenceSearch();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("performSequenceSearch",e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=u.length>2&&void 0!==u[2]&&u[2],!this.inputFilter){e.next=5;break}return this.inputFilter.action.fillValue=n.text,this.inputFilter.timeout=this.setInputWaitTimeout(),e.abrupt("return");case 5:if(n.userTriggered){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.getNodeById(n.id);case 9:if(o=e.sent){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,this.elementSelector.getSelector(o);case 14:if(a=e.sent,(s=this.makePageAction(this.getInputEventCode(o,n),r,a)).eventCode!==ke.$.Input){e.next=20;break}return s.fillValue=n.text,this.inputFilter={action:s,nodeId:n.id,contenteditable:i,timeout:this.setInputWaitTimeout()},e.abrupt("return");case 20:s.eventCode===ke.$.UploadFiles&&(s.files=[],s.files.push(n.text)),this.addInteraction(s);case 22:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isConsecutiveInputEvent",value:function(e){return!!this.inputFilter&&(this.inputFilter.contenteditable?e.type===be.tw.Custom&&e.data.tag===Dn.N.ContentEditableInput&&e.data.payload.id===this.inputFilter.nodeId:e.type===be.tw.IncrementalSnapshot&&e.data.source===be.yh.Input&&e.data.id===this.inputFilter.nodeId&&!!e.data.userTriggered)}},{key:"setInputWaitTimeout",value:function(){var e;return null!==(e=this.inputFilter)&&void 0!==e&&e.timeout&&clearTimeout(this.inputFilter.timeout),setTimeout(this.releasePendingInputAction,1e3)}},{key:"handleContentEditableInput",value:function(e,t){this.handleInput({userTriggered:!0,id:e.id,text:e.text,isChecked:void 0,source:be.yh.Input},t,!0)}},{key:"handleKeyStroke",value:function(e,t){}},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.elementSelector.getSelector(i);case 9:if(o=e.sent,a=this.makePageAction(ke.$.Click,r,o),!this.clickFilter){e.next=14;break}return this.clickFilter.actions.push(a),e.abrupt("return");case 14:this.clickFilter={actions:[a],nodeId:n.id,timeout:this.setClickWaitTimeout()};case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isConsecutiveClickEvent",value:function(e){return!!this.clickFilter&&(e.type===be.tw.IncrementalSnapshot&&e.data.source===be.yh.MouseInteraction&&e.data.type===be.Y2.Click&&e.data.id===this.inputFilter.nodeId)}},{key:"setClickWaitTimeout",value:function(){var e;return null!==(e=this.clickFilter)&&void 0!==e&&e.timeout&&clearTimeout(this.clickFilter.timeout),setTimeout(this.releasePendingClickActions,600)}},{key:"handleDblClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.elementSelector.getSelector(i);case 9:o=e.sent,a=this.makePageAction(ke.$.DoubleClick,r,o),this.addInteraction(a),this.releasePendingClickActions(!1);case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"buildSequences",value:function(){this.sequences.push(this.dragAndDropSequence)}},{key:"performSequenceSearch",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.events.slice(this.lastInteractionEventIndex),r=(0,U.Z)(this.sequences),e.prev=2,r.s();case 4:if((i=r.n()).done){e.next=14;break}if(o=i.value,!(a=this.sequenceMatcher.findSequence(n,o.events))){e.next=12;break}return e.next=10,o.handler(a);case 10:(s=e.sent)&&s.forEach((function(e){return u.addInteraction(e)}));case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return e.next=24,this.sessionReplayer.goLive();case 24:case"end":return e.stop()}}),e,this,[[2,16,19,22]])})));return function(){return e.apply(this,arguments)}}()},{key:"isActionEvent",value:function(e){switch(e.type){case be.tw.Meta:return!1;case be.tw.IncrementalSnapshot:switch(e.data.source){case be.yh.Input:return e.data.userTriggered;case be.yh.MouseInteraction:case be.yh.MouseMove:return!0;default:return!1}case be.tw.Custom:return e.data.tag===Dn.N.ContentEditableInput;default:return!1}}},{key:"addInteraction",value:function(e){this.interactions.push(e),this.lastInteractionEventIndex=this.events.length}},{key:"makePageAction",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,l.Z)({nodeId:this.interactions.length.toString(),eventCode:e,selector:n.playwrightSelector,locator:n.playwrightLocator,parentFramesSelectors:n.playwrightParentFramesSelectors,esraMetadata:n.esraMetadata,pageId:void 0,timestamp:t.timestamp},r)}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.maxNumberOfGetNodeRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionReplayer.getNodeById(n)){e.next=9;break}return e.next=8,Se()(100*(this.maxNumberOfGetNodeRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?(0,v.QI)(u,[]):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"file":return ke.$.UploadFiles;case"checkbox":case"radio":return t.isChecked?ke.$.Check:ke.$.UnCheck;default:return ke.$.Input}}}]),i}(we.E),Ln=function(e){return e.VisualTestGenerationProducer="VisualTestGenerationProducer",e.VisualTestGenerationConsumer="VisualTestGenerationConsumer",e}({}),Zn=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;(0,a.Z)(this,e),this.rootDocument=i,this.playwrightElementSelectorGenerator=void 0,this.hoveredElement=void 0,this.hoveredElementSelection=void 0,this.wasHoveredElementSelected=!1,this.selected=[],this.singleSelection=!0,this.onMouseOver=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.target instanceof n.rootDocument.defaultView.HTMLElement){e.next=2;break}return e.abrupt("return");case 2:if(r.target!==n.hoveredElement&&!r.target.matches(".element-inspector-ignore")){e.next=4;break}return e.abrupt("return");case 4:return window.checksum.testGenerator.clearHighlights(),n.hoveredElement&&n.hoveredElement.removeEventListener("click",n.onClick,{capture:!0}),e.next=8,n.playwrightElementSelectorGenerator.getSelectorAndLocator(r.target);case 8:return i=e.sent,o=i.locator,a=i.selector,s=i.parentFramesSelectors,window.checksum.testGenerator.highlightElement(r.target,{text:o.replace("frameLocator('iframe').",""),textPosition:"below",textWidthType:"auto",pointerEvents:"none",classNames:["element-inspector-ignore"]}),e.next=15,n.playwrightElementSelectorGenerator.selector(a,s);case 15:(u=e.sent)!==r.target&&window.checksum.testGenerator.highlightElement(u,{clear:!1,pointerEvents:"none",classNames:["element-inspector-ignore"]}),n.hoveredElement=r.target,n.hoveredElementSelection={locator:o,selector:a,parentFramesSelectors:s},n.wasHoveredElementSelected=!1,r.target.addEventListener("click",n.onClick,{capture:!0});case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.onClick=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.stopPropagation(),r.preventDefault(),!n.wasHoveredElementSelected){e.next=4;break}return e.abrupt("return");case 4:n.wasHoveredElementSelected=!0,n.selected.push(n.hoveredElementSelection),n.singleSelection&&n.stop();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.playwrightElementSelectorGenerator=new X}return(0,s.Z)(e,[{key:"start",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.singleSelection=e,this.stop(),this.cleanSelection(),this.rootDocument.addEventListener("mouseover",this.onMouseOver)}},{key:"stop",value:function(){window.checksum.testGenerator.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0}),this.hoveredElement=null,this.wasHoveredElementSelected=!1,this.rootDocument.removeEventListener("mouseover",this.onMouseOver)}},{key:"cleanSelection",value:function(){this.selected=[]}},{key:"consumeSelections",value:function(){var e=this.selected;return this.cleanSelection(),e}}]),e}(),Fn=function(e){(0,V.Z)(i,e);var n=(0,j.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).elementSelector=new ye,e.elementInspector=void 0,e.lengthOfConsumedInteractions=0,e.shouldHandleEvents=!0,e}return(0,s.Z)(i,[{key:"init",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];switch(this.shouldHandleEvents=t,e){case Ln.VisualTestGenerationProducer:break;case Ln.VisualTestGenerationConsumer:this.setEventHandlers(new On({sessionReplayer:this.sessionReplayer,elementSelector:this.elementSelector}))}}},{key:"handleEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,r=(0,U.Z)(n),e.prev=2,r.s();case 4:if((i=r.n()).done){e.next=12;break}return o=i.value,e.next=8,this.eventProcessor.processEvent(o,this.shouldHandleEvents);case 8:return e.next=10,this.skipEvents([o]);case 10:e.next=4;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),r.e(e.t0);case 17:return e.prev=17,r.f(),e.finish(17);case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(0),console.error(e.t1);case 25:case"end":return e.stop()}}),e,this,[[0,22],[2,14,17,20]])})));return function(t){return e.apply(this,arguments)}}()},{key:"consumeInteractions",value:function(){var e=this.eventHandlers.getInteractions(this.lengthOfConsumedInteractions);return this.lengthOfConsumedInteractions+=e.length,e}},{key:"setShouldHandleEvents",value:function(e){this.shouldHandleEvents=e}},{key:"startInspector",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.elementInspector=new Zn(document.querySelector(".replayer-wrapper > iframe").contentDocument),this.elementInspector.start(e)}},{key:"stopInspector",value:function(){this.elementInspector.stop()}},{key:"consumeSelections",value:function(){return this.elementInspector.consumeSelections()}},{key:"goBack",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?this.sessionReplayer.goBack(e,t):this.goLive()}},{key:"goLive",value:function(){return this.sessionReplayer.goLive()}}]),i}(en);!function(){var e=Element.prototype.addEventListener;Element.prototype.addEventListener=function(t,n,r){e.call(this,t,n,r),this._checksum_eventListenerList||(this._checksum_eventListenerList={}),this._checksum_eventListenerList[t]||(this._checksum_eventListenerList[t]=[]),this._checksum_eventListenerList[t].push(n)}}(),window.checksum||(window.checksum={testGenerator:new An,sessionDigester:new tn,goalTracker:new _n,timeMachine:new Fn});var Pn=!!(0,i.v)().app,Bn=(0,i.v)().type||Pn?o.pR.App:void 0;function Vn(){return(Vn=(0,r.Z)((0,t.Z)().mark((function e(){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=Bn||o.De.appType,e.next=e.t0===o.pR.App?3:e.t0===o.pR.Script?9:10;break;case 3:return e.next=5,Promise.all([n.e(542),n.e(736)]).then(n.bind(n,9607));case 5:return r=e.sent,(0,r.bootstrapApp)(),e.abrupt("break",10);case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}"true"===(0,i.v)().injectESRA&&(window.esraExtractor=new B(document),window.esraSelector=function(e){return new q(e)},window.esraMetadata=u),function(){Vn.apply(this,arguments)}()}()}();
3
+ //# sourceMappingURL=main.2179693d.js.map