UNPKG

91.3 kBJavaScriptView Raw
1function e(){}function t(e,t){for(const n in t)e[n]=t[n];return e}function n(e){return e()}function i(){return Object.create(null)}function r(e){e.forEach(n)}function o(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function s(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}function l(e,t){e.appendChild(t)}function c(e,t,n){e.insertBefore(t,n||null)}function u(e){e.parentNode.removeChild(e)}function d(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function f(e){return document.createElement(e)}function h(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function p(e){return document.createTextNode(e)}function m(){return p(" ")}function v(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function g(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function y(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function b(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function w(e,t,n){e.classList[n?"add":"remove"](t)}let x;function k(e){x=e}function _(){if(!x)throw new Error("Function called outside component initialization");return x}function S(e){_().$$.on_mount.push(e)}function E(e){_().$$.on_destroy.push(e)}function T(){const e=_();return(t,n)=>{const i=e.$$.callbacks[t];if(i){const r=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);i.slice().forEach(t=>{t.call(e,r)})}}}const M=[],C=[],N=[],I=[],A=Promise.resolve();let F=!1;function O(e){N.push(e)}let $=!1;const D=new Set;function L(){if(!$){$=!0;do{for(let e=0;e<M.length;e+=1){const t=M[e];k(t),R(t.$$)}for(M.length=0;C.length;)C.pop()();for(let e=0;e<N.length;e+=1){const t=N[e];D.has(t)||(D.add(t),t())}N.length=0}while(M.length);for(;I.length;)I.pop()();F=!1,$=!1,D.clear()}}function R(e){if(null!==e.fragment){e.update(),r(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(O)}}const P=new Set;let B;function j(){B={r:0,c:[],p:B}}function z(){B.r||r(B.c),B=B.p}function U(e,t){e&&e.i&&(P.delete(e),e.i(t))}function Z(e,t,n,i){if(e&&e.o){if(P.has(e))return;P.add(e),B.c.push(()=>{P.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}function H(e){e&&e.c()}function q(e,t,i){const{fragment:a,on_mount:s,on_destroy:l,after_update:c}=e.$$;a&&a.m(t,i),O(()=>{const t=s.map(n).filter(o);l?l.push(...t):r(t),e.$$.on_mount=[]}),c.forEach(O)}function V(e,t){const n=e.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function W(e,t){-1===e.$$.dirty[0]&&(M.push(e),F||(F=!0,A.then(L)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Y(t,n,o,a,s,l,c=[-1]){const d=x;k(t);const f=n.props||{},h=t.$$={fragment:null,ctx:null,props:l,update:e,not_equal:s,bound:i(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:[]),callbacks:i(),dirty:c};let p=!1;if(h.ctx=o?o(t,f,(e,n,...i)=>{const r=i.length?i[0]:n;return h.ctx&&s(h.ctx[e],h.ctx[e]=r)&&(h.bound[e]&&h.bound[e](r),p&&W(t,e)),n}):[],h.update(),p=!0,r(h.before_update),h.fragment=!!a&&a(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(u)}else h.fragment&&h.fragment.c();n.intro&&U(t.$$.fragment),q(t,n.target,n.anchor),L()}k(d)}class X{$destroy(){V(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(){}}var K,G,J,Q,ee;!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(K||(K={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font"}(G||(G={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(J||(J={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(Q||(Q={})),function(e){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"}(ee||(ee={}));
2/*! *****************************************************************************
3Copyright (c) Microsoft Corporation.
4
5Permission to use, copy, modify, and/or distribute this software for any
6purpose with or without fee is hereby granted.
7
8THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14PERFORMANCE OF THIS SOFTWARE.
15***************************************************************************** */
16var te,ne=function(){return(ne=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function ie(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function re(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function oe(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(re(arguments[t]));return e}!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"}(te||(te={}));var ae=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function se(e,t){void 0===t&&(t={});var n=1,i=1;function r(e){var t=e.match(/\n/g);t&&(n+=t.length);var r=e.lastIndexOf("\n");i=-1===r?i+e.length:e.length-r}function o(){var e={line:n,column:i};return function(t){return t.position=new a(e),h(),t}}var a=function(e){this.start=e,this.end={line:n,column:i},this.source=t.source};a.prototype.content=e;var s=[];function l(r){var o=new Error(t.source+":"+n+":"+i+": "+r);if(o.reason=r,o.filename=t.source,o.line=n,o.column=i,o.source=e,!t.silent)throw o;s.push(o)}function c(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,n=[];for(h(),p(n);e.length&&"}"!==e.charAt(0)&&(t=E()||T());)!1!==t&&(n.push(t),p(n));return n}function f(t){var n=t.exec(e);if(n){var i=n[0];return r(i),e=e.slice(i.length),n}}function h(){f(/^\s*/)}function p(e){var t;for(void 0===e&&(e=[]);t=m();)!1!==t&&e.push(t),t=m();return e}function m(){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 l("End of comment missing");var a=e.slice(2,n-2);return i+=2,r(a),e=e.slice(n),i+=2,t({type:"comment",comment:a})}}function v(){var e=f(/^([^{]+)/);if(e)return le(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).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=le(t[0]);if(!f(/^:\s*/))return l("property missing ':'");var i=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:n.replace(ae,""),value:i?le(i[0]).replace(ae,""):""});return f(/^[;\s]*/),r}}function y(){var e,t=[];if(!c())return l("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t)),e=g();return u()?t:l("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,x=S("import"),k=S("charset"),_=S("namespace");function S(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=o(),i=f(t);if(i){var r={type:e};return r[e]=i[1].trim(),n(r)}}}function E(){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 l("@keyframes missing name");var i,r=t[1];if(!c())return l("@keyframes missing '{'");for(var a=p();i=b();)a.push(i),a=a.concat(p());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:a}):l("@keyframes missing '}'")}}()||function(){var e=o(),t=f(/^@media *([^{]+)/);if(t){var n=le(t[1]);if(!c())return l("@media missing '{'");var i=p().concat(d());return u()?e({type:"media",media:n,rules:i}):l("@media missing '}'")}}()||function(){var e=o(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:le(t[1]),media:le(t[2])})}()||function(){var e=o(),t=f(/^@supports *([^{]+)/);if(t){var n=le(t[1]);if(!c())return l("@supports missing '{'");var i=p().concat(d());return u()?e({type:"supports",supports:n,rules:i}):l("@supports missing '}'")}}()||x()||k()||_()||function(){var e=o(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=le(t[1]),i=le(t[2]);if(!c())return l("@document missing '{'");var r=p().concat(d());return u()?e({type:"document",document:i,vendor:n,rules:r}):l("@document missing '}'")}}()||function(){var e=o();if(f(/^@page */)){var t=v()||[];if(!c())return l("@page missing '{'");for(var n,i=p();n=g();)i.push(n),i=i.concat(p());return u()?e({type:"page",selectors:t,declarations:i}):l("@page missing '}'")}}()||function(){var e=o();if(f(/^@host\s*/)){if(!c())return l("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=o();if(f(/^@font-face\s*/)){if(!c())return l("@font-face missing '{'");for(var t,n=p();t=g();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}function T(){var e=o(),t=v();return t?(p(),e({type:"rule",selectors:t,declarations:y()})):l("selector missing")}return function e(t,n){for(var i=t&&"string"==typeof t.type,r=i?t:n,o=0,a=Object.keys(t);o<a.length;o++){var s=a[o],l=t[s];Array.isArray(l)?l.forEach((function(t){e(t,r)})):l&&"object"==typeof l&&e(l,r)}i&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((w=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:w,parsingErrors:s}}))}function le(e){return e?e.replace(/^\s+|\s+$/g,""):""}var ce={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 ue=/([^\\]):hover/g;function de(e){var t=se(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(ue.test(t)){var n=t.replace(ue,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function fe(e,t){var n=t.doc,i=t.hackCss;switch(e.type){case te.Document:return n.implementation.createDocument(null,"",null);case te.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case te.Element:var r,o=function(e){var t=ce[e.tagName]?ce[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);r=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a||"number"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=r.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(r.style.width=a),"rr_height"===t&&(r.style.height=a),"rr_mediaState"===t)switch(a){case"played":r.play();case"paused":r.pause()}}else{var l="textarea"===o&&"value"===t,c="style"===o&&"_cssText"===t;if(c&&i&&(a=de(a)),l||c){for(var u=n.createTextNode(a),d=0,f=Array.from(r.childNodes);d<f.length;d++){var h=f[d];h.nodeType===r.TEXT_NODE&&r.removeChild(h)}return r.appendChild(u),"continue"}if("iframe"===o&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?r.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"===t||"onclick"===t||"onmouse"===t.substring(0,7)?r.setAttribute("_"+t,a):r.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return r;case te.Text:return n.createTextNode(e.isStyle&&i?de(e.textContent):e.textContent);case te.CDATA:return n.createCDATASection(e.textContent);case te.Comment:return n.createComment(e.textContent);default:return null}}function he(e,t){var n=t.doc,i=t.map,r=t.skipChild,o=void 0!==r&&r,a=t.hackCss,s=void 0===a||a,l=fe(e,{doc:n,hackCss:s});if(!l)return null;if(e.type===te.Document&&(n.close(),n.open(),l=n),l.__sn=e,i[e.id]=l,(e.type===te.Document||e.type===te.Element)&&!o)for(var c=0,u=e.childNodes;c<u.length;c++){var d=u[c],f=he(d,{doc:n,map:i,skipChild:!1,hackCss:s});f?l.appendChild(f):console.warn("Failed to rebuild",d)}return l}function pe(e,t){var n=t.doc,i=t.onVisit,r=t.hackCss,o={},a=he(e,{doc:n,map:o,skipChild:!1,hackCss:void 0===r||r});return function(e,t){for(var n in e)e[n]&&(i=e[n],t(i));var i}(o,(function(e){i&&i(e),function(e){var t=e.__sn;if(t.type===te.Element){var n=e;for(var i in t.attributes)if(t.attributes.hasOwnProperty(i)&&i.startsWith("rr_")){var r=t.attributes[i];"rr_scrollLeft"===i&&(n.scrollLeft=r),"rr_scrollTop"===i&&(n.scrollTop=r)}}}(e)})),[a,o]}var me={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return me.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete me.map[t],e.childNodes&&e.childNodes.forEach((function(e){return me.removeNodeFromMap(e)}))},has:function(e){return me.map.hasOwnProperty(e)}};var ve=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e){var t=this,n=this.indexes.get(e.parentId),i=this.indexes.get(e.id),r=function(e){t.removeIdSet.add(e);var n=me.getNode(e);null==n||n.childNodes.forEach((function(e){"__sn"in e&&r(e.__sn.id)}))},o=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return o(e)}));var i=t.indexes.get(n.id);if(i){var r=i.parent;r&&(delete i.parent,delete r.children[i.id],t.indexes.delete(e.id))}};i?n?(delete i.parent,delete n.children[i.id],this.indexes.delete(e.id),o(i)):(delete this.tree[i.id],this.indexes.delete(i.id),o(i)):(this.removeNodeMutations.push(e),r(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,i,r=this,o=this.tree,a=this.removeNodeMutations,s=this.textMutations,l=this.attributeMutations,c={source:G.Mutation,removes:a,texts:s,attributes:l,adds:[]},u=function(e,t){t&&r.removeIdSet.add(e.id),c.texts=c.texts.concat(t?[]:e.texts).filter((function(e){return!r.removeIdSet.has(e.id)})),c.attributes=c.attributes.concat(t?[]:e.attributes).filter((function(e){return!r.removeIdSet.has(e.id)})),r.removeIdSet.has(e.id)||r.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return u(e,!0)})):(c.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return u(e,!1)})))};Object.values(o).forEach((function(e){return u(e,!1)}));try{for(var d=ie(this.scrollMap.keys()),f=d.next();!f.done;f=d.next()){var h=f.value;this.removeIdSet.has(h)&&this.scrollMap.delete(h)}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=ie(this.inputMap.keys()),m=p.next();!m.done;m=p.next()){h=m.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){n={error:e}}finally{try{m&&!m.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}var v=new Map(this.scrollMap),g=new Map(this.inputMap);return this.reset(),{mutationData:c,scrollMap:v,inputMap:g}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e}();function ge(e){var t,n,i={},r=function(e,t){var n={value:e,parent:t,children:[]};return i[e.node.id]=n,n},o=[];try{for(var a=ie(e),s=a.next();!s.done;s=a.next()){var l=s.value,c=l.nextId,u=l.parentId;if(c&&c in i){var d=i[c];if(d.parent){var f=d.parent.children.indexOf(d);d.parent.children.splice(f,0,r(l,d.parent))}else{f=o.indexOf(d);o.splice(f,0,r(l,null))}}else if(u in i){var h=i[u];h.children.push(r(l,h))}else o.push(r(l,null))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o}function ye(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)ye(e.children[n],t)}function be(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}var we=Object.freeze({__proto__:null,default:be});function xe(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,i=e.HTMLElement||e.Element,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:i.prototype.scroll||s,scrollIntoView:i.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(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):r.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]&&(l(arguments[0])?r.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)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");r.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)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):r.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))},i.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=f(this),i=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+o.left-i.left,n.scrollTop+o.top-i.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else r.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(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 c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,n){var i=e.getComputedStyle(t,null)["overflow"+n];return"auto"===i||"scroll"===i}function d(e){var t=c(e,"Y")&&u(e,"Y"),n=c(e,"X")&&u(e,"X");return t||n}function f(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function h(t){var n,i,r,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),i=t.startX+(t.x-t.startX)*n,r=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,i,r),i===t.x&&r===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,i,a){var l,c,u,d,f=o();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=r.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,d=s),h({scrollable:l,method:d,startTime:f,startX:c,startY:u,x:i,y:a})}}var ke,_e=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,oe(e))},e.prototype.start=function(){this.actions.sort((function(e,t){return e.delay-t.delay})),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this;this.raf=requestAnimationFrame((function i(r){for(n.timeOffset+=(r-e)*n.speed,e=r;t.length;){var o=t[0];if(!(n.timeOffset>=o.delay))break;t.shift(),o.doAction()}(t.length>0||n.liveMode)&&(n.raf=requestAnimationFrame(i))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var i=Math.floor((t+n)/2);if(this.actions[i].delay<e.delay)t=i+1;else{if(!(this.actions[i].delay>e.delay))return i;n=i-1}}return t},e}();function Se(e,t){if(e.type===K.IncrementalSnapshot&&e.data.source===G.MouseMove){var n=e.data.positions[0].timeOffset,i=e.timestamp+n;return e.delay=i-t,i-t}return e.delay=e.timestamp-t,e.delay}
17/*! *****************************************************************************
18Copyright (c) Microsoft Corporation. All rights reserved.
19Licensed under the Apache License, Version 2.0 (the "License"); you may not use
20this file except in compliance with the License. You may obtain a copy of the
21License at http://www.apache.org/licenses/LICENSE-2.0
22
23THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
24KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
25WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
26MERCHANTABLITY OR NON-INFRINGEMENT.
27
28See the Apache Version 2.0 License for specific language governing permissions
29and limitations under the License.
30***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(ke||(ke={}));var Ee={type:"xstate.init"};function Te(e){return void 0===e?[]:[].concat(e)}function Me(e){return{type:"xstate.assign",assignment:e}}function Ce(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 Ne(e){return function(t){return e===t}}function Ie(e){return"string"==typeof e?{type:e}:e}function Ae(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Ne(e)}}function Fe(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:Te(e.states[e.initial].entry).map((function(e){return Ce(e,t.actions)})),context:e.context,matches:Ne(e.initial)},transition:function(t,i){var r,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=Ie(i),u=e.states[s];if(u.on){var d=Te(u.on[c.type]),f=function(t){if(void 0===t)return{value:Ae(s,l)};var i="string"==typeof t?{target:t}:t,r=i.target,o=void 0===r?s:r,a=i.actions,d=void 0===a?[]:a,f=i.cond,h=l;if((void 0===f?function(){return!0}:f)(l,c)){var p=e.states[o],m=!1,v=[].concat(u.exit,d,p.entry).filter((function(e){return e})).map((function(e){return Ce(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},h);return"function"==typeof e.assignment?t=e.assignment(h,c):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](h,c):e.assignment[n]})),h=t,!1}return!0}));return{value:{value:o,context:h,actions:v,changed:o!==s||v.length>0||m,matches:Ne(o)}}}};try{for(var h=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(d),p=h.next();!p.done;p=h.next()){var m=f(p.value);if("object"==typeof m)return m.value}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}return Ae(s,l)}};return n}var Oe=function(e,t){return e.actions.forEach((function(n){var i=n.exec;return i&&i(e.context,t)}))};function $e(e){var t=e.initialState,n=ke.NotStarted,i=new Set,r={_machine:e,send:function(r){n===ke.Running&&(t=e.transition(t,r),Oe(t,Ie(r)),i.forEach((function(e){return e(t)})))},subscribe:function(e){return i.add(e),e(t),{unsubscribe:function(){return i.delete(e)}}},start:function(i){if(i){var o="object"==typeof i?i:{context:e.config.context,value:i};t={value:o.value,actions:[],context:o.context,matches:Ne(o.value)}}return n=ke.Running,Oe(t,Ee),r},stop:function(){return n=ke.Stopped,i.clear(),r},get state(){return t},get status(){return n}};return r}function De(e,t){var n=t.getCastFn,i=t.emitter;return $e(Fe({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:Me({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:Me((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),ne(ne({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,r,o,a,s,l=e.timer,c=e.events,u=e.baselineTime,d=e.lastPlayedEvent;l.clear();try{for(var f=ie(c),h=f.next();!h.done;h=f.next()){Se(h.value,u)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}var p=function(e,t){for(var n=e.length-1;n>=0;n--){var i=e[n];if(i.type===K.Meta&&i.timestamp<=t)return e.slice(n)}return e}(c,u),m=new Array,v=function(e){var t=null==d?void 0:d.timestamp;if((null==d?void 0:d.type)===K.IncrementalSnapshot&&d.data.source===G.MouseMove&&(t=d.timestamp+(null===(s=d.data.positions[0])||void 0===s?void 0:s.timeOffset)),t&&t<u&&(e.timestamp<=t||e===d))return"continue";var r=e.timestamp<u;if(r&&!function(e){switch(e.type){case K.DomContentLoaded:case K.Load:case K.Custom:return!1;case K.FullSnapshot:case K.Meta:return!0}switch(e.data.source){case G.MouseMove:case G.MouseInteraction:case G.TouchMove:case G.MediaInteraction:return!1;case G.ViewportResize:case G.StyleSheetRule:case G.Scroll:case G.Input:return!0}return!0}(e))return"continue";var o=n(e,r);r?o():m.push({doAction:function(){o(),i.emit(ee.EventCast,e)},delay:e.delay})};try{for(var g=ie(p),y=g.next();!y.done;y=g.next()){v(y.value)}}catch(e){o={error:e}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(o)throw o.error}}i.emit(ee.Flush),l.addActions(m),l.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:Me((function(e){return ne(ne({},e),{lastPlayedEvent:null})})),startLive:Me({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:Me((function(e,t){var r=e.baselineTime,o=e.timer,a=e.events;if("ADD_EVENT"===t.type){var s=t.payload.event;Se(s,r),a.push(s);var l=s.timestamp<r,c=n(s,l);l?c():(o.addAction({doAction:function(){c(),i.emit(ee.EventCast,s)},delay:s.delay}),o.isActive()||o.start())}return ne(ne({},e),{events:a})}))}}))}var Le=be||we,Re={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"},Pe=function(){function e(e,t){var n=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=Le(),this.legacy_missingNodeRetryMap={},this.imageMap=new Map,!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,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:Re};this.config=Object.assign({},i,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(ee.Resize,this.handleResize),this.setupDom(),this.treeIndex=new ve,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.emitter.on(ee.Flush,(function(){var e,t,i,r,o,a,s=n.treeIndex.flush(),l=s.scrollMap,c=s.inputMap;try{for(var u=ie(n.fragmentParentMap.entries()),d=u.next();!d.done;d=u.next()){var f=re(d.value,2),h=f[0],p=f[1];me.map[p.__sn.id]=p,p.__sn.type===te.Element&&"textarea"===p.__sn.tagName&&h.textContent&&(p.value=h.textContent),p.appendChild(h),n.restoreState(p)}}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}n.fragmentParentMap.clear(),n.elementStateMap.clear();try{for(var m=ie(l.values()),v=m.next();!v.done;v=m.next()){var g=v.value;n.applyScroll(g)}}catch(e){i={error:e}}finally{try{v&&!v.done&&(r=m.return)&&r.call(m)}finally{if(i)throw i.error}}try{for(var y=ie(c.values()),b=y.next();!b.done;b=y.next()){g=b.value;n.applyInput(g)}}catch(e){o={error:e}}finally{try{b&&!b.done&&(a=y.return)&&a.call(y)}finally{if(o)throw o.error}}}));var r=new _e([],(null==t?void 0:t.speed)||i.speed);this.service=De({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})),timer:r,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){n.emitter.emit(ee.StateChange,{player:e})})),this.speedService=$e(Fe({id:"speed",context:{normalSpeed:-1,timer:r},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:Me({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){n.emitter.emit(ee.StateChange,{speed:e})}));var o=this.service.state.context.events.find((function(e){return e.type===K.Meta})),a=this.service.state.context.events.find((function(e){return e.type===K.FullSnapshot}));if(o){var s=o.data,l=s.width,c=s.height;setTimeout((function(){n.emitter.emit(ee.Resize,{width:l,height:c})}),0)}a&&setTimeout((function(){n.rebuildFullSnapshot(a)}),1)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){return this.emitter.on(e,t),this},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==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"))},e.prototype.getMetaData=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}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){var t;void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(ee.Start)},e.prototype.pause=function(e){var t;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===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(ee.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(ee.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.setupDom=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,t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(xe(this.iframe.contentWindow,this.iframe.contentDocument),void 0===(e=this.iframe.contentWindow)&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach))},e.prototype.handleResize=function(e){var t,n;this.iframe.style.display="inherit";try{for(var i=ie([this.mouseTail,this.iframe]),r=i.next();!r.done;r=i.next()){var o=r.value;o&&(o.setAttribute("width",String(e.width)),o.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.getCastFn=function(e,t){var n,i=this;switch(void 0===t&&(t=!1),e.type){case K.DomContentLoaded:case K.Load:break;case K.Custom:n=function(){i.emitter.emit(ee.CustomEvent,e)};break;case K.Meta:n=function(){return i.emitter.emit(ee.Resize,{width:e.data.width,height:e.data.height})};break;case K.FullSnapshot:n=function(){i.rebuildFullSnapshot(e,t),i.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case K.IncrementalSnapshot:n=function(){var n,r;if(i.applyIncremental(e,t),!t&&(e===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){try{for(var o=ie(i.service.state.context.events),a=o.next();!a.done;a=o.next()){var s=a.value;if(!(s.timestamp<=e.timestamp)&&i.isUserInteraction(s)){s.delay-e.delay>1e4*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=s);break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(i.nextUserInteractionEvent){var l=i.nextUserInteractionEvent.delay-e.delay,c={speed:Math.min(Math.round(l/5e3),360)};i.speedService.send({type:"FAST_FORWARD",payload:c}),i.emitter.emit(ee.SkipStart,c)}}}}return function(){if(n&&n(),i.service.send({type:"CAST_EVENT",payload:{event:e}}),e===i.service.state.context.events[i.service.state.context.events.length-1]){var t=function(){i.backToNormal(),i.service.send("END"),i.emitter.emit(ee.Finish)};e.type===K.IncrementalSnapshot&&e.data.source===G.MouseMove&&e.data.positions.length?setTimeout((function(){t()}),Math.max(0,-e.data.positions[0].timeOffset)):t()}}},e.prototype.rebuildFullSnapshot=function(e,t){if(void 0===t&&(t=!1),!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={},me.map=pe(e.data.node,{doc:this.iframe.contentDocument})[1];var n=document.createElement("style"),i=this.iframe.contentDocument,r=i.documentElement,o=i.head;r.insertBefore(n,o);var a,s=(a=this.config.blockClass,["iframe, ."+a+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&s.push("html.rrweb-paused * { animation-play-state: paused !important; }"),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused");for(var l=0;l<s.length;l++)n.sheet.insertRule(s[l],l);this.emitter.emit(ee.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.waitForStylesheetLoad=function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var i,r=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(ee.Start,a),this.emitter.on(ee.Pause,a);var s=function(){t.emitter.off(ee.Start,a),t.emitter.off(ee.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(r.add(e),e.addEventListener("load",(function(){r.delete(e),0===r.size&&-1!==i&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(ee.LoadStylesheetEnd),i&&window.clearTimeout(i),s())})))})),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(ee.LoadStylesheetStart),i=window.setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),i=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,n=this,i=this.service.state,r=function(){i=n.service.state};this.emitter.on(ee.Start,r),this.emitter.on(ee.Pause,r);var o=0,a=0;try{for(var s=ie(this.service.state.context.events),l=s.next();!l.done;l=s.next()){var c=l.value;if(c.type===K.IncrementalSnapshot&&c.data.source===G.CanvasMutation&&"drawImage"===c.data.property&&"string"==typeof c.data.args[0]&&!this.imageMap.has(c)){o++;var u=document.createElement("img");u.src=c.data.args[0],this.imageMap.set(c,u),u.onload=function(){++a===o&&(i.matches("playing")&&n.play(n.getCurrentTime()),n.emitter.off(ee.Start,r),n.emitter.off(ee.Pause,r))}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}o!==a&&this.service.send({type:"PAUSE"})},e.prototype.applyIncremental=function(e,t){var n,i,r=this,o=e.data;switch(o.source){case G.Mutation:t&&(o.adds.forEach((function(e){return r.treeIndex.add(e)})),o.texts.forEach((function(e){return r.treeIndex.text(e)})),o.attributes.forEach((function(e){return r.treeIndex.attribute(e)})),o.removes.forEach((function(e){return r.treeIndex.remove(e)}))),this.applyMutation(o,t);break;case G.MouseMove:if(t){var a=o.positions[o.positions.length-1];this.moveAndHover(o,a.x,a.y,a.id)}else o.positions.forEach((function(t){var n={doAction:function(){r.moveAndHover(o,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-r.service.state.context.baselineTime};r.timer.addAction(n)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=o.positions[0])||void 0===n?void 0:n.timeOffset)});break;case G.MouseInteraction:if(-1===o.id)break;var s=new Event(J[o.type].toLowerCase());if(!(v=me.getNode(o.id)))return this.debugNodeNotFound(o,o.id);this.emitter.emit(ee.MouseInteraction,{type:o.type,target:v});var l=this.config.triggerFocus;switch(o.type){case J.Blur:"blur"in v&&v.blur();break;case J.Focus:l&&v.focus&&v.focus({preventScroll:!0});break;case J.Click:case J.TouchStart:case J.TouchEnd:t||(this.moveAndHover(o,o.x,o.y,o.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:v.dispatchEvent(s)}break;case G.Scroll:if(-1===o.id)break;if(t){this.treeIndex.scroll(o);break}this.applyScroll(o);break;case G.ViewportResize:this.emitter.emit(ee.Resize,{width:o.width,height:o.height});break;case G.Input:if(-1===o.id)break;if(t){this.treeIndex.input(o);break}this.applyInput(o);break;case G.MediaInteraction:if(!(v=me.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var c=v;try{o.type===Q.Pause&&c.pause(),o.type===Q.Play&&(c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?c.play():c.addEventListener("canplay",(function(){c.play()})))}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case G.StyleSheetRule:if(!(v=me.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var u=v,d=v.parentNode,f=this.fragmentParentMap.has(d),h=void 0;if(f){var p=this.fragmentParentMap.get(v.parentNode);h=document.createTextNode(""),d.replaceChild(h,v),p.appendChild(v)}var m=u.sheet;o.adds&&o.adds.forEach((function(e){var t=e.rule,n=e.index,i=void 0===n?void 0:Math.min(n,m.rules.length);try{m.insertRule(t,i)}catch(e){}})),o.removes&&o.removes.forEach((function(e){var t=e.index;try{m.deleteRule(t)}catch(e){}})),f&&h&&d.replaceChild(v,h);break;case G.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var v;if(!(v=me.getNode(o.id)))return this.debugNodeNotFound(o,o.id);try{var g=v.getContext("2d");if(o.setter)return void(g[o.property]=o.args[0]);var y=g[o.property];if("drawImage"===o.property&&"string"==typeof o.args[0]){var b=this.imageMap.get(e);o.args[0]=b,y.apply(g,o.args)}else y.apply(g,o.args)}catch(e){this.warnCanvasMutationFailed(o,o.id,e)}break;case G.Font:try{var w=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(w)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,t){var n,i,r=this;e.removes.forEach((function(t){var n=me.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);var i=me.getNode(t.parentId);if(!i)return r.warnNodeNotFound(e,t.parentId);if(me.removeNodeFromMap(n),i){var o=r.fragmentParentMap.get(i);if(o&&o.contains(n))o.removeChild(n);else if(r.fragmentParentMap.has(n)){var a=r.fragmentParentMap.get(n);i.removeChild(a),r.fragmentParentMap.delete(n)}else i.removeChild(n)}}));var o=ne({},this.legacy_missingNodeRetryMap),a=[];var s=function(e){if(!r.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=me.getNode(e.parentId);if(!n)return a.push(e);var i=null;if(r.iframe.contentDocument.contains?i=r.iframe.contentDocument.contains(n):r.iframe.contentDocument.body.contains&&(i=r.iframe.contentDocument.body.contains(n)),t&&i){var s=document.createDocumentFragment();for(me.map[e.parentId]=s,r.fragmentParentMap.set(s,n),r.storeState(n);n.firstChild;)s.appendChild(n.firstChild);n=s}var l=null,c=null;if(e.previousId&&(l=me.getNode(e.previousId)),e.nextId&&(c=me.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=me.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return a.push(e);var u=he(e.node,{doc:r.iframe.contentDocument,map:me.map,skipChild:!0,hackCss:!0});-1!==e.previousId&&-1!==e.nextId?(l&&l.nextSibling&&l.nextSibling.parentNode?n.insertBefore(u,l.nextSibling):c&&c.parentNode?n.contains(c)?n.insertBefore(u,c):n.insertBefore(u,null):n.appendChild(u),(e.previousId||e.nextId)&&r.legacy_resolveMissingNode(o,n,u,e)):o[e.node.id]={node:u,mutation:e}};e.adds.forEach((function(e){s(e)}));for(var l=Date.now();a.length;){var c=ge(a);if(a.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}try{for(var u=(n=void 0,ie(c)),d=u.next();!d.done;d=u.next()){var f=d.value;me.getNode(f.value.parentId)?ye(f,(function(e){s(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",f)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}Object.keys(o).length&&Object.assign(this.legacy_missingNodeRetryMap,o),e.texts.forEach((function(t){var n=me.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=me.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);for(var i in r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),t.attributes)if("string"==typeof i){var o=t.attributes[i];try{null!==o?n.setAttribute(i,o):n.removeAttribute(i)}catch(e){r.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}}}))},e.prototype.applyScroll=function(e){var t=me.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},e.prototype.applyInput=function(e){var t=me.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},e.prototype.legacy_resolveMissingNode=function(e,t,n,i){var r=i.previousId,o=i.nextId,a=r&&e[r],s=o&&e[o];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,n.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,n,i){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px",this.drawMouseTail({x:t,y:n});var r=me.getNode(i);if(!r)return this.debugNodeNotFound(e,i);this.hoverElements(r)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?Re:Object.assign({},Re,this.config.mouseTail),i=n.lineCap,r=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=r,e.lineCap=i,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)}},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},e.prototype.isUserInteraction=function(e){return e.type===K.IncrementalSnapshot&&(e.data.source>G.Mutation&&e.data.source<=G.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(ee.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.storeState=function(e){var t,n;if(e&&e.nodeType===e.ELEMENT_NODE){var i=e;(i.scrollLeft||i.scrollTop)&&this.elementStateMap.set(e,{scroll:[i.scrollLeft,i.scrollTop]});var r=i.children;try{for(var o=ie(Array.from(r)),a=o.next();!a.done;a=o.next()){var s=a.value;this.storeState(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}},e.prototype.restoreState=function(e){var t,n;if(e.nodeType===e.ELEMENT_NODE){var i=e;if(this.elementStateMap.has(e)){var r=this.elementStateMap.get(e);r.scroll&&(i.scrollLeft=r.scroll[0],i.scrollTop=r.scroll[1]),this.elementStateMap.delete(e)}var o=i.children;try{for(var a=ie(Array.from(o)),s=a.next();!s.done;s=a.next()){var l=s.value;this.restoreState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}},e.prototype.warnNodeNotFound=function(e,t){this.warn("Node with id '"+t+"' not found in",e)},e.prototype.warnCanvasMutationFailed=function(e,t,n){this.warn("Has error on update canvas '"+t+"'",e,n)},e.prototype.debugNodeNotFound=function(e,t){this.debug("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,oe(["[replayer]"],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,oe(["[replayer]"],e))},e}();function Be(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var je=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports=function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){if(!s&&Be)return Be();if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,n,i)}return n[a].exports}for(var o=Be,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+i),r);else for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){var t,n,i,r,o,a;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(a=new Uint8Array(i),r=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,r),r+=o.length;return a}},a={arraySet:function(e,t,n,i,r){for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(i)},{}],2:[function(e,t,n){var i=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new i.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,r,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new i.Buf8(l),a=0,o=0;a<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,i,r,o,s=t||e.length,c=new Array(2*s);for(i=0,n=0;n<s;)if((r=e[n++])<128)c[i++]=r;else if((o=a[r])>4)c[i++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&n<s;)r=r<<6|63&e[n++],o--;o>1?c[i++]=65533:r<65536?c[i++]=r:(r-=65536,c[i++]=55296|r>>10&1023,c[i++]=56320|1023&r)}return l(c,i)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){t.exports=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+t[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}},{}],4:[function(e,t,n){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],6:[function(e,t,n){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,n){t.exports=function(e,t){var n,i,r,o,a,s,l,c,u,d,f,h,p,m,v,g,y,b,w,x,k,_,S,E,T;n=e.state,i=e.next_in,E=e.input,r=i+(e.avail_in-5),o=e.next_out,T=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,f=n.window,h=n.hold,p=n.bits,m=n.lencode,v=n.distcode,g=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{p<15&&(h+=E[i++]<<p,p+=8,h+=E[i++]<<p,p+=8),b=m[h&g];t:for(;;){if(h>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))T[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(h&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}x=65535&b,(w&=15)&&(p<w&&(h+=E[i++]<<p,p+=8),x+=h&(1<<w)-1,h>>>=w,p-=w),p<15&&(h+=E[i++]<<p,p+=8,h+=E[i++]<<p,p+=8),b=v[h&y];n:for(;;){if(h>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=v[(65535&b)+(h&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&b,p<(w&=15)&&(h+=E[i++]<<p,(p+=8)<w&&(h+=E[i++]<<p,p+=8)),(k+=h&(1<<w)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=w,p-=w,k>(w=o-a)){if((w=k-w)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(_=0,S=f,0===d){if(_+=c-w,w<x){x-=w;do{T[o++]=f[_++]}while(--w);_=o-k,S=T}}else if(d<w){if(_+=c+d-w,(w-=d)<x){x-=w;do{T[o++]=f[_++]}while(--w);if(_=0,d<x){x-=w=d;do{T[o++]=f[_++]}while(--w);_=o-k,S=T}}}else if(_+=d-w,w<x){x-=w;do{T[o++]=f[_++]}while(--w);_=o-k,S=T}for(;x>2;)T[o++]=S[_++],T[o++]=S[_++],T[o++]=S[_++],x-=3;x&&(T[o++]=S[_++],x>1&&(T[o++]=S[_++]))}else{_=o-k;do{T[o++]=T[_++],T[o++]=T[_++],T[o++]=T[_++],x-=3}while(x>2);x&&(T[o++]=T[_++],x>1&&(T[o++]=T[_++]))}break}}break}}while(i<r&&o<s);i-=x=p>>3,h&=(1<<(p-=x<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=h,n.bits=p}},{}],8:[function(e,t,n){var i=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees");function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):-2}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):-2}function f(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,d(e))):-2}function h(e,t){var n,i;return e?(i=new c,e.state=i,i.window=null,0!==(n=f(e,t))&&(e.state=null),n):-2}var p,m,v=!0;function g(e){if(v){var t;for(p=new i.Buf32(512),m=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,p,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=p,e.lenbits=9,e.distcode=m,e.distbits=5}function y(e,t,n,r){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new i.Buf8(a.wsize)),r>=a.wsize?(i.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),i.arraySet(a.window,t,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}n.inflateReset=d,n.inflateReset2=f,n.inflateResetKeep=u,n.inflateInit=function(e){return h(e,15)},n.inflateInit2=h,n.inflate=function(e,t){var n,c,u,d,f,h,p,m,v,b,w,x,k,_,S,E,T,M,C,N,I,A,F,O,$=0,D=new i.Buf8(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),f=e.next_out,u=e.output,p=e.avail_out,d=e.next_in,c=e.input,h=e.avail_in,m=n.hold,v=n.bits,b=h,w=p,A=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;v<16;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}if(2&n.wrap&&35615===m){n.check=0,D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0),m=0,v=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",n.mode=30;break}if(v-=4,I=8+(15&(m>>>=4)),0===n.wbits)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=512&m?10:12,m=0,v=0;break;case 2:for(;v<16;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}if(n.flags=m,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=m>>8&1),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0,n.mode=3;case 3:for(;v<32;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}n.head&&(n.head.time=m),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,n.check=o(n.check,D,4,0)),m=0,v=0,n.mode=4;case 4:for(;v<16;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}n.head&&(n.head.xflags=255&m,n.head.os=m>>8),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0,n.mode=5;case 5:if(1024&n.flags){for(;v<16;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}n.length=m,n.head&&(n.head.extra_len=m),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((x=n.length)>h&&(x=h),x&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,c,d,x,I)),512&n.flags&&(n.check=o(n.check,c,x,d)),h-=x,d+=x,n.length-=x),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===h)break e;x=0;do{I=c[d+x++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I))}while(I&&x<h);if(512&n.flags&&(n.check=o(n.check,c,x,d)),h-=x,d+=x,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===h)break e;x=0;do{I=c[d+x++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I))}while(I&&x<h);if(512&n.flags&&(n.check=o(n.check,c,x,d)),h-=x,d+=x,I)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;v<16;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}if(m!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}m=0,v=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;v<32;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}e.adler=n.check=l(m),m=0,v=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=f,e.avail_out=p,e.next_in=d,e.avail_in=h,n.hold=m,n.bits=v,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){m>>>=7&v,v-=7&v,n.mode=27;break}for(;v<3;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}switch(n.last=1&m,v-=1,3&(m>>>=1)){case 0:n.mode=14;break;case 1:if(g(n),n.mode=20,6===t){m>>>=2,v-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,m=0,v=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(x=n.length){if(x>h&&(x=h),x>p&&(x=p),0===x)break e;i.arraySet(u,c,d,x,f),h-=x,d+=x,p-=x,f+=x,n.length-=x;break}n.mode=12;break;case 17:for(;v<14;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}if(n.nlen=257+(31&m),m>>>=5,v-=5,n.ndist=1+(31&m),m>>>=5,v-=5,n.ncode=4+(15&m),m>>>=4,v-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;v<3;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}n.lens[L[n.have++]]=7&m,m>>>=3,v-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,F={bits:n.lenbits},A=s(0,n.lens,0,19,n.lencode,0,n.work,F),n.lenbits=F.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=($=n.lencode[m&(1<<n.lenbits)-1])>>>16&255,T=65535&$,!((S=$>>>24)<=v);){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}if(T<16)m>>>=S,v-=S,n.lens[n.have++]=T;else{if(16===T){for(O=S+2;v<O;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}if(m>>>=S,v-=S,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}I=n.lens[n.have-1],x=3+(3&m),m>>>=2,v-=2}else if(17===T){for(O=S+3;v<O;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}v-=S,I=0,x=3+(7&(m>>>=S)),m>>>=3,v-=3}else{for(O=S+7;v<O;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}v-=S,I=0,x=11+(127&(m>>>=S)),m>>>=7,v-=7}if(n.have+x>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;x--;)n.lens[n.have++]=I}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,F={bits:n.lenbits},A=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,F),n.lenbits=F.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,F={bits:n.distbits},A=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,F),n.distbits=F.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(h>=6&&p>=258){e.next_out=f,e.avail_out=p,e.next_in=d,e.avail_in=h,n.hold=m,n.bits=v,a(e,w),f=e.next_out,u=e.output,p=e.avail_out,d=e.next_in,c=e.input,h=e.avail_in,m=n.hold,v=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=($=n.lencode[m&(1<<n.lenbits)-1])>>>16&255,T=65535&$,!((S=$>>>24)<=v);){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}if(E&&0==(240&E)){for(M=S,C=E,N=T;E=($=n.lencode[N+((m&(1<<M+C)-1)>>M)])>>>16&255,T=65535&$,!(M+(S=$>>>24)<=v);){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}m>>>=M,v-=M,n.back+=M}if(m>>>=S,v-=S,n.back+=S,n.length=T,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(O=n.extra;v<O;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}n.length+=m&(1<<n.extra)-1,m>>>=n.extra,v-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=($=n.distcode[m&(1<<n.distbits)-1])>>>16&255,T=65535&$,!((S=$>>>24)<=v);){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}if(0==(240&E)){for(M=S,C=E,N=T;E=($=n.distcode[N+((m&(1<<M+C)-1)>>M)])>>>16&255,T=65535&$,!(M+(S=$>>>24)<=v);){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}m>>>=M,v-=M,n.back+=M}if(m>>>=S,v-=S,n.back+=S,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=T,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(O=n.extra;v<O;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}n.offset+=m&(1<<n.extra)-1,m>>>=n.extra,v-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===p)break e;if(x=w-p,n.offset>x){if((x=n.offset-x)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}x>n.wnext?(x-=n.wnext,k=n.wsize-x):k=n.wnext-x,x>n.length&&(x=n.length),_=n.window}else _=u,k=f-n.offset,x=n.length;x>p&&(x=p),p-=x,n.length-=x;do{u[f++]=_[k++]}while(--x);0===n.length&&(n.mode=21);break;case 26:if(0===p)break e;u[f++]=n.length,p--,n.mode=21;break;case 27:if(n.wrap){for(;v<32;){if(0===h)break e;h--,m|=c[d++]<<v,v+=8}if(w-=p,e.total_out+=w,n.total+=w,w&&(e.adler=n.check=n.flags?o(n.check,u,w,f-w):r(n.check,u,w,f-w)),w=p,(n.flags?m:l(m))!==n.check){e.msg="incorrect data check",n.mode=30;break}m=0,v=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;v<32;){if(0===h)break e;h--,m+=c[d++]<<v,v+=8}if(m!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}m=0,v=0}n.mode=29;case 29:A=1;break e;case 30:A=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=f,e.avail_out=p,e.next_in=d,e.avail_in=h,n.hold=m,n.bits=v,(n.wsize||w!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&y(e,e.output,e.next_out,w-e.avail_out),b-=e.avail_in,w-=e.avail_out,e.total_in+=b,e.total_out+=w,n.total+=w,n.wrap&&w&&(e.adler=n.check=n.flags?o(n.check,u,w,e.next_out-w):r(n.check,u,w,e.next_out-w)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===b&&0===w||4===t)&&0===A&&(A=-5),A},n.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},n.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?-2:(n.head=t,t.done=!1,0):-2},n.inflateSetDictionary=function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&r(1,t,i,0)!==n.check?-3:y(e,t,i,i)?(n.mode=31,-4):(n.havedict=1,0):-2},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){var i=e("../utils/common"),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,l,c,u,d,f){var h,p,m,v,g,y,b,w,x,k=f.bits,_=0,S=0,E=0,T=0,M=0,C=0,N=0,I=0,A=0,F=0,O=null,$=0,D=new i.Buf16(16),L=new i.Buf16(16),R=null,P=0;for(_=0;_<=15;_++)D[_]=0;for(S=0;S<l;S++)D[t[n+S]]++;for(M=k,T=15;T>=1&&0===D[T];T--);if(M>T&&(M=T),0===T)return c[u++]=20971520,c[u++]=20971520,f.bits=1,0;for(E=1;E<T&&0===D[E];E++);for(M<E&&(M=E),I=1,_=1;_<=15;_++)if(I<<=1,(I-=D[_])<0)return-1;if(I>0&&(0===e||1!==T))return-1;for(L[1]=0,_=1;_<15;_++)L[_+1]=L[_]+D[_];for(S=0;S<l;S++)0!==t[n+S]&&(d[L[t[n+S]]++]=S);if(0===e?(O=R=d,y=19):1===e?(O=r,$-=257,R=o,P-=257,y=256):(O=a,R=s,y=-1),F=0,S=0,_=E,g=u,C=M,N=0,m=-1,v=(A=1<<M)-1,1===e&&A>852||2===e&&A>592)return 1;for(;;){b=_-N,d[S]<y?(w=0,x=d[S]):d[S]>y?(w=R[P+d[S]],x=O[$+d[S]]):(w=96,x=0),h=1<<_-N,E=p=1<<C;do{c[g+(F>>N)+(p-=h)]=b<<24|w<<16|x|0}while(0!==p);for(h=1<<_-1;F&h;)h>>=1;if(0!==h?(F&=h-1,F+=h):F=0,S++,0==--D[_]){if(_===T)break;_=t[n+d[S]]}if(_>M&&(F&v)!==m){for(0===N&&(N=M),g+=E,I=1<<(C=_-N);C+N<T&&!((I-=D[C+N])<=0);)C++,I<<=1;if(A+=1<<C,1===e&&A>852||2===e&&A>592)return 1;c[m=F&v]=M<<24|C<<16|g-u|0}}return 0!==F&&(c[g+F]=_-N<<24|64<<16|0),f.bits=M,0}},{"../utils/common":1}],10:[function(e,t,n){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/inflate.js":[function(e,t,n){var i=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);if(this.header=new c,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=i.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[n])}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,l,c,d,f=this.strm,h=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(h),f.next_out=0,f.avail_out=h),(n=i.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(n=i.inflateSetDictionary(this.strm,p)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==a.Z_STREAM_END&&(0!==f.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(f.output,f.next_out),c=f.next_out-l,d=o.buf2string(f.output,l),f.next_out=c,f.avail_out=h-c,c&&r.arraySet(f.output,f.output,l,c,0),this.onData(d)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=f,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},n.ungzip=f},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})).inflate,ze=function(e){if("string"!=typeof e)return e;try{if((t=JSON.parse(e)).timestamp)return t}catch(e){}try{var t;if("v1"===(t=JSON.parse(je(e,{to:"string"}))).v)return t;throw new Error("These events were packed with packer "+t.v+" which is incompatible with current packer v1.")}catch(e){throw console.error(e),new Error("Unknown data format.")}};function Ue(e){let t="";return Object.keys(e).forEach(n=>{t+=`${n}: ${e[n]};`}),t}function Ze(e,t=2){let n=String(e);const i=Math.pow(10,t-1);if(e<i)for(;String(i).length>n.length;)n="0"+e;return n}function He(e){if(e<=0)return"00:00";const t=Math.floor(e/36e5);e%=36e5;const n=Math.floor(e/6e4);e%=6e4;const i=Math.floor(e/1e3);return t?`${Ze(t)}:${Ze(n)}:${Ze(i)}`:`${Ze(n)}:${Ze(i)}`}function qe(){return document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement}function Ve(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(e)]}function We(t){let n,i,r,o,a,s,d,h,b;return{c(){n=f("div"),i=f("input"),r=m(),o=f("label"),a=m(),s=f("span"),d=p(t[3]),g(i,"type","checkbox"),g(i,"id",t[2]),i.disabled=t[1],g(i,"class","svelte-1mmdovf"),g(o,"for",t[2]),g(o,"class","svelte-1mmdovf"),g(s,"class","label svelte-1mmdovf"),g(n,"class","switch svelte-1mmdovf"),w(n,"disabled",t[1])},m(e,u){c(e,n,u),l(n,i),i.checked=t[0],l(n,r),l(n,o),l(n,a),l(n,s),l(s,d),h||(b=v(i,"change",t[4]),h=!0)},p(e,[t]){4&t&&g(i,"id",e[2]),2&t&&(i.disabled=e[1]),1&t&&(i.checked=e[0]),4&t&&g(o,"for",e[2]),8&t&&y(d,e[3]),2&t&&w(n,"disabled",e[1])},i:e,o:e,d(e){e&&u(n),h=!1,b()}}}function Ye(e,t,n){let{disabled:i}=t,{checked:r}=t,{id:o}=t,{label:a}=t;return e.$set=e=>{"disabled"in e&&n(1,i=e.disabled),"checked"in e&&n(0,r=e.checked),"id"in e&&n(2,o=e.id),"label"in e&&n(3,a=e.label)},[r,i,o,a,function(){r=this.checked,n(0,r)}]}class Xe extends X{constructor(e){super(),Y(this,e,Ye,We,a,{disabled:1,checked:0,id:2,label:3})}}function Ke(e,t,n){const i=e.slice();return i[33]=t[n],i}function Ge(e,t,n){const i=e.slice();return i[36]=t[n],i}function Je(e){let t,n,i,o,a,s,h,x,k,_,S,E,T,M,N,A,F,O,$,D,L,R,P,B,j,z=He(e[6])+"",W=He(e[11].totalTime)+"",Y=e[13],X=[];for(let t=0;t<Y.length;t+=1)X[t]=Qe(Ge(e,Y,t));function K(e,t){return"playing"===e[7]?tt:et}let G=K(e),J=G(e),Q=e[3],ee=[];for(let t=0;t<Q.length;t+=1)ee[t]=nt(Ke(e,Q,t));function te(t){e[27].call(null,t)}let ne={id:"skip",disabled:"skipping"===e[8],label:"skip inactive"};return void 0!==e[0]&&(ne.checked=e[0]),$=new Xe({props:ne}),C.push(()=>function(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}($,"checked",te)),{c(){t=f("div"),n=f("div"),i=f("span"),o=p(z),a=m(),s=f("div"),h=f("div"),x=m();for(let e=0;e<X.length;e+=1)X[e].c();k=m(),_=f("div"),S=m(),E=f("span"),T=p(W),M=m(),N=f("div"),A=f("button"),J.c(),F=m();for(let e=0;e<ee.length;e+=1)ee[e].c();O=m(),H($.$$.fragment),L=m(),R=f("button"),R.innerHTML='<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M916 380c-26.4 0-48-21.6-48-48L868 223.2 613.6 477.6c-18.4\n 18.4-48.8 18.4-68 0-18.4-18.4-18.4-48.8 0-68L800 156 692 156c-26.4\n 0-48-21.6-48-48 0-26.4 21.6-48 48-48l224 0c26.4 0 48 21.6 48 48l0\n 224C964 358.4 942.4 380 916 380zM231.2 860l108.8 0c26.4 0 48 21.6 48\n 48s-21.6 48-48 48l-224 0c-26.4 0-48-21.6-48-48l0-224c0-26.4 21.6-48\n 48-48 26.4 0 48 21.6 48 48L164 792l253.6-253.6c18.4-18.4 48.8-18.4\n 68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z" p-id="1286"></path></svg>',g(i,"class","rr-timeline__time svelte-dxnc1j"),g(h,"class","rr-progress__step svelte-dxnc1j"),b(h,"width",e[12]),g(_,"class","rr-progress__handler svelte-dxnc1j"),b(_,"left",e[12]),g(s,"class","rr-progress svelte-dxnc1j"),w(s,"disabled","skipping"===e[8]),g(E,"class","rr-timeline__time svelte-dxnc1j"),g(n,"class","rr-timeline svelte-dxnc1j"),g(A,"class","svelte-dxnc1j"),g(R,"class","svelte-dxnc1j"),g(N,"class","rr-controller__btns svelte-dxnc1j"),g(t,"class","rr-controller svelte-dxnc1j")},m(r,u){c(r,t,u),l(t,n),l(n,i),l(i,o),l(n,a),l(n,s),l(s,h),e[23](h),l(s,x);for(let e=0;e<X.length;e+=1)X[e].m(s,null);l(s,k),l(s,_),e[24](s),l(n,S),l(n,E),l(E,T),l(t,M),l(t,N),l(N,A),J.m(A,null),l(N,F);for(let e=0;e<ee.length;e+=1)ee[e].m(N,null);l(N,O),q($,N,null),l(N,L),l(N,R),P=!0,B||(j=[v(s,"click",e[25]),v(A,"click",e[4]),v(R,"click",e[28])],B=!0)},p(e,t){if((!P||64&t[0])&&z!==(z=He(e[6])+"")&&y(o,z),(!P||4096&t[0])&&b(h,"width",e[12]),8192&t[0]){let n;for(Y=e[13],n=0;n<Y.length;n+=1){const i=Ge(e,Y,n);X[n]?X[n].p(i,t):(X[n]=Qe(i),X[n].c(),X[n].m(s,k))}for(;n<X.length;n+=1)X[n].d(1);X.length=Y.length}if((!P||4096&t[0])&&b(_,"left",e[12]),256&t[0]&&w(s,"disabled","skipping"===e[8]),(!P||2048&t[0])&&W!==(W=He(e[11].totalTime)+"")&&y(T,W),G!==(G=K(e))&&(J.d(1),J=G(e),J&&(J.c(),J.m(A,null))),298&t[0]){let n;for(Q=e[3],n=0;n<Q.length;n+=1){const i=Ke(e,Q,n);ee[n]?ee[n].p(i,t):(ee[n]=nt(i),ee[n].c(),ee[n].m(N,O))}for(;n<ee.length;n+=1)ee[n].d(1);ee.length=Q.length}const n={};var i;256&t[0]&&(n.disabled="skipping"===e[8]),!D&&1&t[0]&&(D=!0,n.checked=e[0],i=()=>D=!1,I.push(i)),$.$set(n)},i(e){P||(U($.$$.fragment,e),P=!0)},o(e){Z($.$$.fragment,e),P=!1},d(n){n&&u(t),e[23](null),d(X,n),e[24](null),J.d(),d(ee,n),V($),B=!1,r(j)}}}function Qe(e){let t,n;return{c(){t=f("div"),g(t,"title",n=e[36].name),b(t,"width","10px"),b(t,"height","5px"),b(t,"position","absolute"),b(t,"top","2px"),b(t,"transform","translate(-50%, -50%)"),b(t,"background",e[36].background),b(t,"left",e[36].position)},m(e,n){c(e,t,n)},p(e,i){8192&i[0]&&n!==(n=e[36].name)&&g(t,"title",n),8192&i[0]&&b(t,"background",e[36].background),8192&i[0]&&b(t,"left",e[36].position)},d(e){e&&u(t)}}}function et(e){let t,n;return{c(){t=h("svg"),n=h("path"),g(n,"d","M170.65984 896l0-768 640 384zM644.66944\n 512l-388.66944-233.32864 0 466.65728z"),g(t,"class","icon"),g(t,"viewBox","0 0 1024 1024"),g(t,"version","1.1"),g(t,"xmlns","http://www.w3.org/2000/svg"),g(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),g(t,"width","16"),g(t,"height","16")},m(e,i){c(e,t,i),l(t,n)},d(e){e&&u(t)}}}function tt(e){let t,n;return{c(){t=h("svg"),n=h("path"),g(n,"d","M682.65984 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0\n 512q0 53.00224-37.49888 90.50112t-90.50112\n 37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224\n 37.49888-90.50112t90.50112-37.49888zM341.34016 128q53.00224 0\n 90.50112 37.49888t37.49888 90.50112l0 512q0 53.00224-37.49888\n 90.50112t-90.50112\n 37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224\n 37.49888-90.50112t90.50112-37.49888zM341.34016 213.34016q-17.67424\n 0-30.16704 12.4928t-12.4928 30.16704l0 512q0 17.67424 12.4928\n 30.16704t30.16704 12.4928 30.16704-12.4928\n 12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928zM682.65984\n 213.34016q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 512q0\n 17.67424 12.4928 30.16704t30.16704 12.4928 30.16704-12.4928\n 12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z"),g(t,"class","icon"),g(t,"viewBox","0 0 1024 1024"),g(t,"version","1.1"),g(t,"xmlns","http://www.w3.org/2000/svg"),g(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),g(t,"width","16"),g(t,"height","16")},m(e,i){c(e,t,i),l(t,n)},d(e){e&&u(t)}}}function nt(e){let t,n,i,r,o,a,s=e[33]+"";function d(...t){return e[26](e[33],...t)}return{c(){t=f("button"),n=p(s),i=p("x"),t.disabled=r="skipping"===e[8],g(t,"class","svelte-dxnc1j"),w(t,"active",e[33]===e[1]&&"skipping"!==e[8])},m(e,r){c(e,t,r),l(t,n),l(t,i),o||(a=v(t,"click",d),o=!0)},p(i,o){e=i,8&o[0]&&s!==(s=e[33]+"")&&y(n,s),256&o[0]&&r!==(r="skipping"===e[8])&&(t.disabled=r),266&o[0]&&w(t,"active",e[33]===e[1]&&"skipping"!==e[8])},d(e){e&&u(t),o=!1,a()}}}function it(e){let t,n,i=e[2]&&Je(e);return{c(){i&&i.c(),t=p("")},m(e,r){i&&i.m(e,r),c(e,t,r),n=!0},p(e,n){e[2]?i?(i.p(e,n),4&n[0]&&U(i,1)):(i=Je(e),i.c(),U(i,1),i.m(t.parentNode,t)):i&&(j(),Z(i,1,1,()=>{i=null}),z())},i(e){n||(U(i),n=!0)},o(e){Z(i),n=!1},d(e){i&&i.d(e),e&&u(t)}}}function rt(e,t,n){const i=T();let r,o,a,s,l,c,u,d,{replayer:f}=t,{showController:h}=t,{autoPlay:p}=t,{skipInactive:m}=t,{speedOption:v}=t,{speed:g=(v.length?v[0]:1)}=t,{tags:y={}}=t,b=0,w=null;const x=()=>{w&&(cancelAnimationFrame(w),w=null)},k=()=>{"paused"===r&&(l?(f.play(),l=!1):f.play(b))},M=()=>{"playing"===r&&f.pause()},N=e=>{n(6,b=e);const t="playing"===r;f.pause(),f.play(e),t||f.pause()},I=e=>{if("skipping"===o)return;const t=a.getBoundingClientRect();let n=(e.clientX-t.left)/t.width;n<0?n=0:n>1&&(n=1);const i=c.totalTime*n;N(i)},A=e=>{let t="playing"===r;n(1,g=e),t&&f.pause(),f.setConfig({speed:g}),t&&f.play(b)};var F;S(()=>{n(7,r=f.service.state.value),n(8,o=f.speedService.state.value),f.on("state-change",e=>{const{player:t,speed:i}=e;if((null==t?void 0:t.value)&&r!==t.value)switch(n(7,r=t.value),r){case"playing":x(),w=requestAnimationFrame((function e(){n(6,b=f.getCurrentTime()),b<c.totalTime&&(w=requestAnimationFrame(e))}));break;case"paused":x()}(null==i?void 0:i.value)&&o!==i.value&&n(8,o=i.value)}),f.on("finish",()=>{l=!0}),p&&f.play()}),F=()=>{m!==f.config.skipInactive&&f.setConfig({skipInactive:m})},_().$$.after_update.push(F),E(()=>{f.pause(),x()});return e.$set=e=>{"replayer"in e&&n(16,f=e.replayer),"showController"in e&&n(2,h=e.showController),"autoPlay"in e&&n(17,p=e.autoPlay),"skipInactive"in e&&n(0,m=e.skipInactive),"speedOption"in e&&n(3,v=e.speedOption),"speed"in e&&n(1,g=e.speed),"tags"in e&&n(18,y=e.tags)},e.$$.update=()=>{if(64&e.$$.dirty[0]&&i("ui-update-current-time",{payload:b}),128&e.$$.dirty[0]&&i("ui-update-player-state",{payload:r}),65536&e.$$.dirty[0]&&n(11,c=f.getMetaData()),2112&e.$$.dirty[0]){const e=Math.min(1,b/c.totalTime);n(12,u=100*e+"%"),i("ui-update-progress",{payload:e})}327680&e.$$.dirty[0]&&n(13,d=(()=>{const{context:e}=f.service.state,t=e.events.length,n=e.events[0].timestamp,i=e.events[t-1].timestamp,r=[];return e.events.forEach(e=>{if(e.type===K.Custom){const s={name:e.data.tag,background:y[e.data.tag]||"rgb(73, 80, 246)",position:(t=n,o=i,a=e.timestamp,(100-(o-a)/(o-t)*100).toFixed(2))+"%"};r.push(s)}var t,o,a}),r})())},[m,g,h,v,()=>{switch(r){case"playing":M();break;case"paused":k()}},A,b,r,o,a,s,c,u,d,i,I,f,p,y,k,M,N,()=>{n(0,m=!m)},function(e){C[e?"unshift":"push"](()=>{s=e,n(10,s)})},function(e){C[e?"unshift":"push"](()=>{a=e,n(9,a)})},e=>I(e),e=>A(e),function(e){m=e,n(0,m)},()=>i("fullscreen")]}class ot extends X{constructor(e){super(),Y(this,e,rt,it,a,{replayer:16,showController:2,autoPlay:17,skipInactive:0,speedOption:3,speed:1,tags:18,toggle:4,play:19,pause:20,goto:21,setSpeed:5,toggleSkipInactive:22},[-1,-1])}get toggle(){return this.$$.ctx[4]}get play(){return this.$$.ctx[19]}get pause(){return this.$$.ctx[20]}get goto(){return this.$$.ctx[21]}get setSpeed(){return this.$$.ctx[5]}get toggleSkipInactive(){return this.$$.ctx[22]}}function at(e){let t,n,i={replayer:e[8],showController:e[3],autoPlay:e[1],speedOption:e[2],skipInactive:e[0],tags:e[4]};return t=new ot({props:i}),e[29](t),t.$on("fullscreen",e[30]),{c(){H(t.$$.fragment)},m(e,i){q(t,e,i),n=!0},p(e,n){const i={};256&n[0]&&(i.replayer=e[8]),8&n[0]&&(i.showController=e[3]),2&n[0]&&(i.autoPlay=e[1]),4&n[0]&&(i.speedOption=e[2]),1&n[0]&&(i.skipInactive=e[0]),16&n[0]&&(i.tags=e[4]),t.$set(i)},i(e){n||(U(t.$$.fragment,e),n=!0)},o(e){Z(t.$$.fragment,e),n=!1},d(n){e[29](null),V(t,n)}}}function st(e){let t,n,i,r,o=e[8]&&at(e);return{c(){t=f("div"),n=f("div"),i=m(),o&&o.c(),g(n,"class","rr-player__frame"),g(n,"style",e[10]),g(t,"class","rr-player"),g(t,"style",e[11])},m(a,s){c(a,t,s),l(t,n),e[28](n),l(t,i),o&&o.m(t,null),e[31](t),r=!0},p(e,i){(!r||1024&i[0])&&g(n,"style",e[10]),e[8]?o?(o.p(e,i),256&i[0]&&U(o,1)):(o=at(e),o.c(),U(o,1),o.m(t,null)):o&&(j(),Z(o,1,1,()=>{o=null}),z()),(!r||2048&i[0])&&g(t,"style",e[11])},i(e){r||(U(o),r=!0)},o(e){Z(o),r=!1},d(n){n&&u(t),e[28](null),o&&o.d(),e[31](null)}}}function lt(e,n,i){let{width:r=1024}=n,{height:o=576}=n,{events:a=[]}=n,{skipInactive:l=!0}=n,{autoPlay:c=!0}=n,{speedOption:u=[1,2,4,8]}=n,{speed:d=1}=n,{showController:f=!0}=n,{tags:h={}}=n;let p,m,v,g,y,b,w,x=r,k=o;const _=(e,t)=>{const n=r/t.width,i=o/t.height;e.style.transform=`scale(${Math.min(n,i,1)})translate(-50%, -50%)`},T=()=>{var e;p&&(qe()?document.exitFullscreen?document.exitFullscreen():document.mozExitFullscreen?document.mozExitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen():(e=p).requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen())};S(()=>{if(void 0!==u&&"array"!==Ve(u))throw new Error("speedOption must be array");if(u.forEach(e=>{if("number"!==Ve(e))throw new Error("item of speedOption must be number")}),u.indexOf(d)<0)throw new Error(`speed must be one of speedOption,\n current config:\n {\n ...\n speed: ${d},\n speedOption: [${u.toString()}]\n ...\n }\n `);var e;i(8,v=new Pe(a,Object.assign({speed:d,root:m,unpackFn:ze},n))),v.on("resize",e=>{_(v.wrapper,e)}),e=()=>{qe()?setTimeout(()=>{x=r,k=o,i(12,r=p.offsetWidth),i(13,o=p.offsetHeight),_(v.wrapper,{width:v.iframe.offsetWidth,height:v.iframe.offsetHeight})},0):(i(12,r=x),i(13,o=k),_(v.wrapper,{width:v.iframe.offsetWidth,height:v.iframe.offsetHeight}))},document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),g=()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}),E(()=>{g&&g()});return e.$set=e=>{i(36,n=t(t({},n),s(e))),"width"in e&&i(12,r=e.width),"height"in e&&i(13,o=e.height),"events"in e&&i(14,a=e.events),"skipInactive"in e&&i(0,l=e.skipInactive),"autoPlay"in e&&i(1,c=e.autoPlay),"speedOption"in e&&i(2,u=e.speedOption),"speed"in e&&i(15,d=e.speed),"showController"in e&&i(3,f=e.showController),"tags"in e&&i(4,h=e.tags)},e.$$.update=()=>{12288&e.$$.dirty[0]&&i(10,b=Ue({width:r+"px",height:o+"px"})),12296&e.$$.dirty[0]&&i(11,w=Ue({width:r+"px",height:o+(f?80:0)+"px"}))},n=s(n),[l,c,u,f,h,T,p,m,v,y,b,w,r,o,a,d,()=>me,()=>{_(v.wrapper,{width:v.iframe.offsetWidth,height:v.iframe.offsetHeight})},(e,t)=>{switch(v.on(e,t),e){case"ui-update-current-time":case"ui-update-progress":case"ui-update-player-state":y.$on(e,({detail:e})=>t(e))}},e=>{v.addEvent(e)},()=>v.getMetaData(),()=>v,()=>{y.toggle()},e=>{y.setSpeed(e)},()=>{y.toggleSkipInactive()},()=>{y.play()},()=>{y.pause()},e=>{y.goto(e)},function(e){C[e?"unshift":"push"](()=>{m=e,i(7,m)})},function(e){C[e?"unshift":"push"](()=>{y=e,i(9,y)})},()=>T(),function(e){C[e?"unshift":"push"](()=>{p=e,i(6,p)})}]}class ct extends X{constructor(e){super(),Y(this,e,lt,st,a,{width:12,height:13,events:14,skipInactive:0,autoPlay:1,speedOption:2,speed:15,showController:3,tags:4,getMirror:16,triggerResize:17,toggleFullscreen:5,addEventListener:18,addEvent:19,getMetaData:20,getReplayer:21,toggle:22,setSpeed:23,toggleSkipInactive:24,play:25,pause:26,goto:27},[-1,-1])}get getMirror(){return this.$$.ctx[16]}get triggerResize(){return this.$$.ctx[17]}get toggleFullscreen(){return this.$$.ctx[5]}get addEventListener(){return this.$$.ctx[18]}get addEvent(){return this.$$.ctx[19]}get getMetaData(){return this.$$.ctx[20]}get getReplayer(){return this.$$.ctx[21]}get toggle(){return this.$$.ctx[22]}get setSpeed(){return this.$$.ctx[23]}get toggleSkipInactive(){return this.$$.ctx[24]}get play(){return this.$$.ctx[25]}get pause(){return this.$$.ctx[26]}get goto(){return this.$$.ctx[27]}}export default class extends ct{constructor(e){super({target:e.target,props:e.data||e.props})}}