var mementoCore=function(e){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function a(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.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(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"}(t||(t={}));var l=1,c=RegExp("[^a-z1-6-]");function u(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce((function(e,t){return e+(function(e){return"styleSheet"in e}(n=t)?u(n.styleSheet)||"":n.cssText);var n}),""):null}catch(e){return null}}var d=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,f=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,h=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function g(e,t){return(e||"").replace(d,(function(e,n,r,i){var a,o=n||r||i;if(!o)return e;if(!f.test(o))return"url('"+o+"')";if(h.test(o))return"url("+o+")";if("/"===o[0])return"url('"+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+o+"')");var s=t.split("/"),l=o.split("/");s.pop();for(var c=0,u=l;c<u.length;c++){var d=u[c];"."!==d&&(".."===d?s.pop():s.push(d))}return"url('"+s.join("/")+"')"}))}function p(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function m(e,t,n){return"src"===t||"href"===t&&n?p(e,n):"srcset"===t&&n?function(e,t){return""===t.trim()?t:t.split(",").map((function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?p(e,n[0])+" "+n[1]:1===n.length?""+p(e,n[0]):""})).join(", ")}(e,n):"style"===t&&n?g(n,location.href):n}function v(e,n,r,i,a,o,s){switch(void 0===a&&(a={}),void 0===o&&(o=[]),void 0===s&&(s=!1),e.nodeType){case e.DOCUMENT_NODE:return{type:t.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var l=!1,d="";"string"==typeof r?l=e.classList.contains(r):e.classList&&e.classList.forEach&&e.classList.forEach((function(e){r.test(e)&&(l=!0)}));var f=function(e){var t=e.toLowerCase().trim();return c.test(t)?"div":t}(e.tagName);if(!l)for(var h=0,p=o;h<p.length;h++){var v=p[h];if(f===v.tagName){l=!0,v.placeholder&&(d=v.placeholder);break}}for(var y={},I=0,C=Array.from(e.attributes);I<C.length;I++){var b=C[I],A=b.name,w=b.value;y[A]=m(n,A,w);var _="img"===f&&"src"===A||"link"===f&&"href"===A,S=e.rel;!_||("dns-prefetch"===S||"preload"===S)||/^data:image/i.test(y[A])||(y["_memimage_"+A]=y[A])}var k=e.rel;if("link"===f&&!("dns-prefetch"===k||"preload"===k||"prefetch"===k)&&i){var x,E=Array.from(n.styleSheets).find((function(t){return t.href===e.href}));(x=u(E))&&(delete y.rel,delete y.href,"_memimage_href"in y&&delete y._memimage_href,y._cssText=g(x,E.href))}if("style"===f&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(x=u(e.sheet))&&(y._cssText=g(x,location.href));if("input"===f||"textarea"===f||"select"===f){w=e.value;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&w?y.value=a[y.type]||a[f]?"*".repeat(w.length):w:e.checked&&(y.checked=e.checked)}if("option"===f){var N=e.parentElement;y.value===N.value&&(y.selected=e.selected)}if("canvas"===f&&s&&(y.mem_dataURL=e.toDataURL()),e.scrollLeft&&(y.mem_scrollLeft=e.scrollLeft),e.scrollTop&&(y.mem_scrollTop=e.scrollTop),l){var T=e.getBoundingClientRect(),B=T.width,M=T.height;y.mem_width=B+"px",y.mem_height=M+"px",d&&(y.mem_placeholder=d)}return{type:t.Element,tagName:f,attributes:y,childNodes:[],isSVG:(z=e,"svg"===z.tagName||z instanceof SVGElement||void 0),needBlock:l};case e.TEXT_NODE:var R=e.parentNode&&e.parentNode.tagName,D=e.textContent,F="STYLE"===R||void 0;return F&&D&&(D=g(D,location.href)),"SCRIPT"===R&&(D="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:D||"",isStyle:F};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:""};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||""};default:return!1}var z}function y(e,n,r,i,a,o,s,c,u){void 0===a&&(a=!1),void 0===o&&(o=!0),void 0===c&&(c=[]),void 0===u&&(u=!1);var d,f=v(e,n,i,o,s,c,u);if(!f)return console.warn(e,"not serialized"),null;d="__sn"in e?e.__sn.id:l++;var h=Object.assign(f,{id:d});e.__sn=h,r[d]=e;var g=!a;if(h.type===t.Element&&(g=g&&!h.needBlock,delete h.needBlock),(h.type===t.Document||h.type===t.Element)&&g)for(var p=0,m=Array.from(e.childNodes);p<m.length;p++){var I=y(m[p],n,r,i,a,o,s,c,u);I&&h.childNodes.push(I)}return h}var I=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function C(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 a(){var e={line:n,column:r};return function(t){return t.position=new o(e),h(),t}}var o=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};o.prototype.content=e;var s=[];function l(i){var a=new Error(t.source+":"+n+":"+r+": "+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a;s.push(a)}function c(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,n=[];for(h(),g(n);e.length&&"}"!==e.charAt(0)&&(t=x()||E());)!1!==t&&(n.push(t),g(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 g(e){var t;for(void 0===e&&(e=[]);t=p();)!1!==t&&e.push(t),t=p();return e}function p(){var t=a();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 o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:"comment",comment:o})}}function m(){var e=f(/^([^{]+)/);if(e)return b(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 v(){var e=a(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=b(t[0]);if(!f(/^:\s*/))return l("property missing ':'");var r=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(I,""),value:r?b(r[0]).replace(I,""):""});return f(/^[;\s]*/),i}}function y(){var e,t=[];if(!c())return l("missing '{'");for(g(t);e=v();)!1!==e&&(t.push(e),g(t)),e=v();return u()?t:l("missing '}'")}function C(){for(var e,t=[],n=a();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 A,w=k("import"),_=k("charset"),S=k("namespace");function k(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=a(),r=f(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function x(){if("@"===e[0])return function(){var e=a(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=f(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,i=t[1];if(!c())return l("@keyframes missing '{'");for(var o=g();r=C();)o.push(r),o=o.concat(g());return u()?e({type:"keyframes",name:i,vendor:n,keyframes:o}):l("@keyframes missing '}'")}}()||function(){var e=a(),t=f(/^@media *([^{]+)/);if(t){var n=b(t[1]);if(!c())return l("@media missing '{'");var r=g().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=a(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:b(t[1]),media:b(t[2])})}()||function(){var e=a(),t=f(/^@supports *([^{]+)/);if(t){var n=b(t[1]);if(!c())return l("@supports missing '{'");var r=g().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||w()||_()||S()||function(){var e=a(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=b(t[1]),r=b(t[2]);if(!c())return l("@document missing '{'");var i=g().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:i}):l("@document missing '}'")}}()||function(){var e=a();if(f(/^@page */)){var t=m()||[];if(!c())return l("@page missing '{'");for(var n,r=g();n=v();)r.push(n),r=r.concat(g());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=a();if(f(/^@host\s*/)){if(!c())return l("@host missing '{'");var t=g().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=a();if(f(/^@font-face\s*/)){if(!c())return l("@font-face missing '{'");for(var t,n=g();t=v();)n.push(t),n=n.concat(g());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}function E(){var e=a(),t=m();return t?(g(),e({type:"rule",selectors:t,declarations:y()})):l("selector missing")}return function e(t,n){for(var r=t&&"string"==typeof t.type,i=r?t:n,a=0,o=Object.keys(t);a<o.length;a++){var s=o[a],l=t[s];Array.isArray(l)?l.forEach((function(t){e(t,i)})):l&&"object"==typeof l&&e(l,i)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((A=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:A,parsingErrors:s}}))}function b(e){return e?e.replace(/^\s+|\s+$/g,""):""}var A={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 w=/([^\\]):hover/g,_=/(\s|;|\{)inset\s*:([^;}]+)/gi;function S(e){var t=C(e,{silent:!0});return t.stylesheet&&t.stylesheet.rules?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(w.test(t)){var n=t.replace(w,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e.replace(_,"$1top: $2; right: $2; bottom: $2; left: $2;")):e}var k,x,E,N,T,B,M,R,D=/url\((data:image\/svg\+xml;charset=[\w-].*?)\)\s*(;|\}|$)/gi;function F(e){return e?e.replace(D,(function(e,t,n){return'url("'+t+'")'+n})):e}function z(e,n,r,i){switch(void 0===i&&(i=!0),e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var a,o=function(e){var t=A[e.tagName]?A[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",o):n.createElement(o);var s=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";if(e.attributes.hasOwnProperty("_memimage_"+t))return"continue";var s=e.attributes[t];s="boolean"==typeof s||"number"==typeof s?"":s;var l=t;if((t=t.replace("_memimage_","")).startsWith("mem_")){if("canvas"===o&&"mem_dataURL"===t){var c=document.createElement("img");c.src=s,c.onload=function(){var e=a.getContext("2d");e&&e.drawImage(c,0,0,c.width,c.height)}}"mem_imgwidth"===t||"mem_width"===t?a.style.width=s:"mem_imgheight"===t||"mem_height"===t?a.style.height=s:"video"===o&&"mem_placeholder"===l&&(a.style.background="center / cover no-repeat url("+s+") !important")}else{var u="textarea"===o&&"value"===t,d="style"===o&&"_cssText"===t;if(d&&r&&(s=F(s=S(s))),u||d){for(var f=n.createTextNode(s),h=0,g=Array.from(a.childNodes);h<g.length;h++){var p=g[h];p.nodeType===a.TEXT_NODE&&a.removeChild(p)}return a.appendChild(f),"continue"}if("iframe"===o&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?a.setAttributeNS("http://www.w3.org/1999/xlink",t,s):"onload"===t||"onclick"===t||"onmouse"===t.substring(0,7)?a.setAttribute("_"+t,s):(i&&"link"===o&&"_memimage_href"===l&&s&&s.match(/memento\.oss/)&&(s=s.replace(/^http\:\/\//,"https://")),a.setAttribute(t,s))}catch(e){}}};for(var l in e.attributes)s(l);return a;case t.Text:var c=e.isStyle?F(e.textContent):e.textContent;return n.createTextNode(e.isStyle&&r?S(c):c);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function O(e,n,r,i,a,o){void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===o&&(o=!0);var s=z(e,n,a,o);if(!s)return null;if(e.type===t.Document&&(n.close(),n.open(),s=n),s.__sn=e,r[e.id]=s,(e.type===t.Document||e.type===t.Element)&&!i)for(var l=0,c=e.childNodes;l<c.length;l++){var u=c[l],d=O(u,n,r,!1,a,o);d?s.appendChild(d):console.warn("Failed to rebuild",u)}return s}function Z(e,n,r,i){void 0===r&&(r=!0),void 0===i&&(i=!0);var a={},o=O(e,n,a,!1,r,i);return function(e){for(var n in e){var r=e[n],i=r.__sn;if(i.type===t.Element){var a=r;for(var o in i.attributes)if(i.attributes.hasOwnProperty(o)&&o.startsWith("mem_")){var s=i.attributes[o];"mem_scrollLeft"===o&&(a.scrollLeft=s),"mem_scrollTop"===o&&(a.scrollTop=s)}}}}(a),[o,a]}function L(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}e.EventType=void 0,(k=e.EventType||(e.EventType={}))[k.DomContentLoaded=0]="DomContentLoaded",k[k.Load=1]="Load",k[k.FullSnapshot=2]="FullSnapshot",k[k.IncrementalSnapshot=3]="IncrementalSnapshot",k[k.Meta=4]="Meta",k[k.PageChange=5]="PageChange",k[k.Custom=9]="Custom",k[k.Other=99]="Other",e.IncrementalSource=void 0,(x=e.IncrementalSource||(e.IncrementalSource={}))[x.Mutation=0]="Mutation",x[x.MouseMove=1]="MouseMove",x[x.MouseInteraction=2]="MouseInteraction",x[x.Scroll=3]="Scroll",x[x.ViewportResize=4]="ViewportResize",x[x.Input=5]="Input",x[x.TouchMove=6]="TouchMove",x[x.MediaInteraction=7]="MediaInteraction",x[x.StyleSheetRule=8]="StyleSheetRule",x[x.CanvasMutation=9]="CanvasMutation",x[x.Drag=10]="Drag",x[x.UserDefinedEvent=11]="UserDefinedEvent",function(e){e[e.LivePlay=0]="LivePlay"}(E||(E={})),function(e){e[e.Console=1]="Console",e[e.Network=2]="Network"}(N||(N={})),e.MouseInteractions=void 0,(T=e.MouseInteractions||(e.MouseInteractions={}))[T.MouseUp=0]="MouseUp",T[T.MouseDown=1]="MouseDown",T[T.Click=2]="Click",T[T.ContextMenu=3]="ContextMenu",T[T.DblClick=4]="DblClick",T[T.Focus=5]="Focus",T[T.Blur=6]="Blur",T[T.TouchStart=7]="TouchStart",T[T.TouchMove_Departed=8]="TouchMove_Departed",T[T.TouchEnd=9]="TouchEnd",function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(B||(B={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(M||(M={})),e.ReplayerEvents=void 0,(R=e.ReplayerEvents||(e.ReplayerEvents={})).Start="start",R.Pause="pause",R.Resume="resume",R.Resize="resize",R.Finish="finish",R.FullsnapshotRebuilded="fullsnapshot-rebuilded",R.LoadStylesheetStart="load-stylesheet-start",R.LoadStylesheetEnd="load-stylesheet-end",R.SkipStart="skip-start",R.SkipEnd="skip-end",R.MouseInteraction="mouse-interaction",R.EventCast="event-cast",R.CustomEvent="custom-event",R.Flush="flush",R.AddEvents="add-events";var G={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return G.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete G.map[t],e.childNodes&&e.childNodes.forEach((function(e){return G.removeNodeFromMap(e)}))},has:function(e){return G.map.hasOwnProperty(e)}};function W(e,t,n){void 0===n&&(n={});var r=null,i=0;return function(a){var o=Date.now();i||!1!==n.leading||(i=o);var s=t-(o-i),l=this,c=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),i=o,e.apply(l,c)):r||!1===n.trailing||(r=window.setTimeout((function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(l,c)}),s))}}function V(e,t,n,r,i){void 0===i&&(i=window);var a=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),a&&a.set&&a.set.call(this,e)}}),function(){return V(e,t,a||{},!0)}}function U(e,t,n){if(!(t in e))return function(){};var r=e[t],i=n(r);if("function"==typeof i)try{i.prototype=i.prototype||{},Object.defineProperties(i,{__memento_original__:{enumerable:!1,value:r}})}catch(e){}return e[t]=i,function(){e[t]=r}}function H(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function K(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function X(e,t,n){var r,i;if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var o=!1;if("string"==typeof t?o=e.classList.contains(t):e.classList&&e.classList&&e.classList.forEach((function(e){t.test(e)&&(o=!0)})),!o&&e.tagName&&n)try{for(var s=a(n),l=s.next();!l.done;l=s.next()){if(l.value.tagName===e.tagName.toLowerCase()){o=!0;break}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o||X(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,X(e.parentNode,t,n)}function Y(e){var t=G.getId(e);return!G.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Y(e.parentNode))}function P(e){return Boolean(e.changedTouches)}function J(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function j(e,t){var n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};for(var r in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),n)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?n[r]:("00"+n[r]).substr((""+n[r]).length)));return t}function Q(t){switch(t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:case e.EventType.PageChange:case e.EventType.Custom:return!1;case e.EventType.FullSnapshot:case e.EventType.Meta:return!0}switch(t.data.source){case e.IncrementalSource.MouseMove:case e.IncrementalSource.MouseInteraction:case e.IncrementalSource.TouchMove:case e.IncrementalSource.MediaInteraction:return!1;case e.IncrementalSource.ViewportResize:case e.IncrementalSource.StyleSheetRule:case e.IncrementalSource.Scroll:case e.IncrementalSource.Input:return!0}return!0}var q=function(){function t(){this.reset()}return t.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)},t.prototype.remove=function(e){var t=this,n=this.indexes.get(e.parentId),r=this.indexes.get(e.id),i=function(e){t.removeIdSet.add(e);var n=G.getNode(e);null==n||n.childNodes.forEach((function(e){return i(e.__sn.id)}))},a=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return a(e)}));var r=t.indexes.get(n.id);if(r){var i=r.parent;i&&(delete r.parent,delete i.children[r.id],t.indexes.delete(e.id))}};r?n?(delete r.parent,delete n.children[r.id],this.indexes.delete(e.id),a(r)):(delete this.tree[r.id],this.indexes.delete(r.id),a(r)):(this.removeNodeMutations.push(e),i(e.id))},t.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},t.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},t.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},t.prototype.input=function(e){this.inputMap.set(e.id,e)},t.prototype.flush=function(){var t,n,r,i,o=this,s=this.tree,l=this.removeNodeMutations,c=this.textMutations,u=this.attributeMutations,d={source:e.IncrementalSource.Mutation,removes:l,texts:c,attributes:u,adds:[]},f=function(e,t){t&&o.removeIdSet.add(e.id),d.texts=d.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),d.attributes=d.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(d.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(s).forEach((function(e){return f(e,!1)}));try{for(var h=a(this.scrollMap.keys()),g=h.next();!g.done;g=h.next()){var p=g.value;this.removeIdSet.has(p)&&this.scrollMap.delete(p)}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}try{for(var m=a(this.inputMap.keys()),v=m.next();!v.done;v=m.next()){p=v.value;this.removeIdSet.has(p)&&this.inputMap.delete(p)}}catch(e){r={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}var y=new Map(this.scrollMap),I=new Map(this.inputMap);return this.reset(),{mutationData:d,scrollMap:y,inputMap:I}},t.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},t}();function $(e){return"[object Number]"==Object.prototype.toString.call(e)}function ee(e){return"[object String]"==Object.prototype.toString.call(e)}function te(e){return"[object Array]"==Object.prototype.toString.call(e)}function ne(e){return"[object Boolean]"==Object.prototype.toString.call(e)}function re(e){return void 0===e}function ie(e){return null===e}function ae(e){return"[object Symbol]"==Object.prototype.toString.call(e)}function oe(e){return!("[object Object]"!=Object.prototype.toString.call(e)&&($(e)||ee(e)||ne(e)||te(e)||ie(e)||se(e)||re(e)||ae(e)))}function se(e){return"[object Function]"==Object.prototype.toString.call(e)}function le(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function ce(e){var t=Object.prototype.toString.call(e);return"[object global]"==t||"[object Window]"==t||"[object DOMWindow]"==t}function ue(e){var t,n=Object.prototype.hasOwnProperty;if(!e||"object"!=typeof e||e.nodeType||ce(e))return!1;try{if(e.constructor&&!n.call(e,"constructor")&&!n.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}for(t in e);return void 0===t||n.call(e,t)}function de(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 a=i.getBoundingClientRect(),o=de(i,t),s=a.height/i.clientHeight;return{x:a.x*o.relativeScale+o.x,y:a.y*o.relativeScale+o.y,relativeScale:s,absoluteScale:o.absoluteScale*s}}var fe=Object.freeze({__proto__:null,on:L,mirror:G,throttle:W,hookSetter:V,patch:U,getWindowHeight:H,getWindowWidth:K,isBlocked:X,isAncestorRemoved:Y,isTouchEvent:P,polyfill:J,dateFormat:j,needCastInSyncMode:Q,TreeIndex:q,isNumber:$,isString:ee,isArray:te,isBoolean:ne,isUndefined:re,isNull:ie,isSymbol:ae,isObject:oe,isFunction:se,isElement:le,isWindow:ce,isPlainObject:ue,getBaseDimension:de}),he=function(e,t){return e+"@"+t};function ge(e){return"__sn"in e}function pe(e){return"__ln"in e}var me=function(){function e(){this.length=0,this.head=null}return e.prototype.get=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.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&pe(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&&pe(e.nextSibling)&&e.nextSibling.__ln.previous){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=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}(),ve=function(e,t,n,r,i,o){var l=this;void 0===i&&(i=[]),this.texts=[],this.attributes=[],this.removes=[],this.adds=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){var t,n,r,i,o,c,u,d;l.reset(),e.forEach(l.processMutation);var f=l.texts,h=l.attributes,g=l.removes,p=l.adds,m=l.addedSet,v=l.movedSet,I=l.droppedSet,C=s(m,v),b=[],A=new me,w=function(e){var t=e.nextSibling&&G.getId(e.nextSibling);return-1===t&&X(e.nextSibling,l.blockClass)&&(t=null),t},_=!1;if(l.asyncClass){try{for(var S=a(C),k=S.next();!k.done;k=S.next())if(X(k.value.parentNode,l.asyncClass)){_=!0;break}}catch(e){t={error:e}}finally{try{k&&!k.done&&(n=S.return)&&n.call(S)}finally{if(t)throw t.error}}if(!_)try{for(var x=a(h),E=x.next();!E.done;E=x.next())if(X(E.value.node.parentNode,l.asyncClass)){_=!0;break}}catch(e){r={error:e}}finally{try{E&&!E.done&&(i=x.return)&&i.call(x)}finally{if(r)throw r.error}}}var N=function(e){if(e.parentNode){var t=G.getId(e.parentNode),n=w(e);if(-1===t||-1===n)return A.addNode(e);p.push({parentId:t,nextId:n,node:y(e,document,G.map,l.blockClass,!0,l.inlineStylesheet,l.maskInputOptions,l.blockElements)})}},T=function(e){_?b.push(new Promise((function(t){l.requestIdleCallback((function(){N(e),t()}))}))):N(e)};try{for(var B=a(v),M=B.next();!M.done;M=B.next())T(F=M.value)}catch(e){o={error:e}}finally{try{M&&!M.done&&(c=B.return)&&c.call(B)}finally{if(o)throw o.error}}try{for(var R=a(m),D=R.next();!D.done;D=R.next()){var F;Ce(I,F=D.value)||Ie(g,F)?Ce(v,F)?T(F):I.add(F):T(F)}}catch(e){u={error:e}}finally{try{D&&!D.done&&(d=R.return)&&d.call(R)}finally{if(u)throw u.error}}var z=function(){for(var e=null;A.length;){var t=null;if(e){var n=G.getId(e.value.parentNode),r=w(e.value);-1!==n&&-1!==r&&(t=e)}if(!t)for(var i=A.length-1;i>=0;i--){var a=A.get(i);if(n=G.getId(a.value.parentNode),r=w(a.value),-1!==n&&-1!==r){t=a;break}}if(!t){for(;A.head;)A.removeNode(A.head.value);break}e=t.previous,A.removeNode(t.value),N(t.value)}};if(_){var O=Date.now();Promise.all(b).then((function(){z(),l.emit(f,h,g,p,O)}))}else z(),l.emit(f,h,g,p)},this.emit=function(e,t,n,r,i){var a={texts:e.map((function(e){return{id:G.getId(e.node),value:e.value}})).filter((function(e){return G.has(e.id)})),attributes:t.map((function(e){return{id:G.getId(e.node),attributes:e.attributes}})).filter((function(e){return G.has(e.id)})),removes:n,adds:r,timestamp:i};(a.texts.length||a.attributes.length||a.removes.length||a.adds.length)&&l.emissionCallback(a)},this.processMutation=function(e){switch(e.type){case"characterData":var t=e.target.textContent;X(e.target,l.blockClass,l.blockElements)||t===e.oldValue||l.texts.push({value:t,node:e.target});break;case"attributes":if(t=e.target.getAttribute(e.attributeName),X(e.target,l.blockClass,l.blockElements)||t===e.oldValue)return;var n=l.attributes.find((function(t){return t.node===e.target}));n||(n={node:e.target,attributes:{}},l.attributes.push(n)),n.attributes[e.attributeName]=m(document,e.attributeName,t);var r=e.target.tagName.toLowerCase().trim(),i="img"===r&&"src"===e.attributeName||"link"===r&&"href"===e.attributeName,a=e.target.rel;!i||"dns-prefetch"===a||"preload"===a||/^data:image/i.test(n.attributes[e.attributeName])||(n.attributes["_memimage_"+e.attributeName]=n.attributes[e.attributeName]);break;case"childList":e.addedNodes.forEach((function(t){return l.genAdds(t,e.target)})),e.removedNodes.forEach((function(t){var n=G.getId(t),r=G.getId(e.target);X(t,l.blockClass,l.blockElements)||X(e.target,l.blockClass,l.blockElements)||(l.addedSet.has(t)?(ye(l.addedSet,t),l.droppedSet.add(t)):l.addedSet.has(e.target)&&-1===n||Y(e.target)||(l.movedSet.has(t)&&l.movedMap[he(n,r)]?ye(l.movedSet,t):l.removes.push({parentId:r,id:n})),G.removeNodeFromMap(t))}))}},this.genAdds=function(e,t){if(!X(e.parentNode,l.blockClass,l.blockElements)){if(ge(e)){l.movedSet.add(e);var n=null;t&&ge(t)&&(n=t.__sn.id),n&&(l.movedMap[he(e.__sn.id,n)]=!0)}else l.addedSet.add(e),l.droppedSet.delete(e);e.childNodes.forEach((function(e){return l.genAdds(e)}))}},this.reset=function(){l.texts=[],l.attributes=[],l.removes=[],l.adds=[],l.addedSet=new Set,l.movedSet=new Set,l.droppedSet=new Set,l.movedMap={}},this.requestIdleCallback=function(e,t){if(window.requestIdleCallback)window.requestIdleCallback(e,t);else{var n=(t||{timeout:0}).timeout;window.setTimeout(e,n)}},this.blockClass=t,this.blockElements=i,this.asyncClass=o,this.inlineStylesheet=n,this.maskInputOptions=r,this.emissionCallback=e};function ye(e,t){e.delete(t),t.childNodes.forEach((function(t){return ye(e,t)}))}function Ie(e,t){var n=t.parentNode;if(!n)return!1;var r=G.getId(n);return!!e.some((function(e){return e.id===r}))||Ie(e,n)}function Ce(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||Ce(e,n))}var be=window.matchMedia("(orientation: portrait)"),Ae=be.matches;function we(t,n,r,i){if(void 0===i&&(i=[]),!1===r.mouseInteraction)return function(){};var a=!0===r.mouseInteraction||void 0===r.mouseInteraction?{}:r.mouseInteraction,o=[];return Object.keys(e.MouseInteractions).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]})).forEach((function(r){var a=r.toLowerCase(),s=function(r){return function(a){if(!X(a.target,n,i)){var o=G.getId(a.target),s=P(a)?a.changedTouches[0]:a,l=s.clientX,c=s.clientY;t({type:e.MouseInteractions[r],id:o,x:l,y:c})}}}(r);o.push(L(a,s))})),function(){o.forEach((function(e){return e()}))}}var _e=["INPUT","TEXTAREA","SELECT"],Se=new WeakMap;function ke(t,r){void 0===r&&(r={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,a=e.scrollCb,o=e.viewportResizeCb,l=e.inputCb,c=e.mediaInteractionCb,u=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,s(e)),n.apply(void 0,s(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,s(e)),r.apply(void 0,s(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,s(e)),i.apply(void 0,s(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,s(e)),a.apply(void 0,s(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,s(e)),o.apply(void 0,s(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,s(e)),l.apply(void 0,s(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,s(e)),c.apply(void 0,s(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,s(e)),u.apply(void 0,s(e))}}(t,r);var i,a,o,l,c=function(e,t,n,r,i,a){void 0===i&&(i=[]);var o=new ve(e,t,n,r,i,a),s=new MutationObserver(o.processMutations);return s.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}(t.mutationCb,t.blockClass,t.inlineStylesheet,t.maskInputOptions,t.blockElements,t.asyncClass),u=function(t,n){if(!1===n.mousemove)return function(){};var r,i="number"==typeof n.mousemove?n.mousemove:50,a=[],o=W((function(n){var i=Date.now()-r;t(a.map((function(e){return e.timeOffset-=i,e})),n?e.IncrementalSource.TouchMove:e.IncrementalSource.MouseMove),a=[],r=null}),500),s=W((function(e){var t=e.target,n=P(e)?e.changedTouches[0]:e,i=n.clientX,s=n.clientY;r||(r=Date.now()),a.push({x:i,y:s,id:G.getId(t),timeOffset:Date.now()-r}),o(P(e))}),i,{trailing:!1}),l=[L("mousemove",s),L("touchmove",s)];return function(){l.forEach((function(e){return e()}))}}(t.mousemoveCb,t.sampling),d=we(t.mouseInteractionCb,t.blockClass,t.sampling,t.blockElements),f=(i=t.scrollCb,a=t.blockClass,o=t.sampling,void 0===(l=t.blockElements)&&(l=[]),L("scroll",W((function(e){if(e.target&&!X(e.target,a,l)){var t=G.getId(e.target);if(e.target===document){var n=document.scrollingElement||document.documentElement;i({id:t,x:n.scrollLeft,y:n.scrollTop})}else i({id:t,x:e.target.scrollLeft,y:e.target.scrollTop})}}),o.scroll||100))),h=function(e){return L("resize",W((function(){var t=H(),n=K();e({width:Number(n),height:Number(t),rotate:Ae!==be.matches?1:0}),Ae=be.matches}),200),window)}(t.viewportResizeCb),g=function(e,t,r,i,a,o){function l(e){var n=e.target;if(n&&n.tagName&&!(_e.indexOf(n.tagName)<0)&&!X(n,t,o)){var a=n.type;if("password"!==a&&!n.classList.contains(r)){var s=n.value,l=!1;"radio"===a||"checkbox"===a?l=n.checked:(i[n.tagName.toLowerCase()]||i[a])&&(s="*".repeat(s.length)),c(n,{text:s,isChecked:l});var u=n.name;"radio"===a&&u&&l&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach((function(e){e!==n&&c(e,{text:e.value,isChecked:!l})}))}}}function c(t,r){var i=Se.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){Se.set(t,r);var a=G.getId(t);e(n(n({},r),{id:a}))}}void 0===o&&(o=[]);var u=("last"===a.input?["change"]:["input","change"]).map((function(e){return L(e,l)})),d=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),f=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return d&&d.set&&u.push.apply(u,s(f.map((function(e){return V(e[0],e[1],{set:function(){l({target:this})}})})))),function(){u.forEach((function(e){return e()}))}}(t.inputCb,t.blockClass,t.ignoreClass,t.maskInputOptions,t.sampling);!function(e,t,n){void 0===n&&(n=[]);var r=function(r){return function(i){var a=i.target;a&&!X(a,t,n)&&e({type:"play"===r?M.Play:M.Pause,id:G.getId(a)})}},i=[L("play",r("play")),L("pause",r("pause"))]}(t.mediaInteractionCb,t.blockClass,t.blockElements);var p,m,v,y=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,r){var i=G.getId(this.ownerNode);return-1!==i&&e({id:i,adds:[{rule:n,index:r}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var r=G.getId(this.ownerNode);return-1!==r&&e({id:r,removes:[{index:t}]}),n.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=n}}(t.styleSheetRuleCb),I=(p=t.userDefinedEventCb,v=[L("memento-live-play",(m=E.LivePlay,function(e){if("detail"in e&&e.detail){var t=e.detail;p(n({evt:m},t))}}))],function(){v.forEach((function(e){return e()}))});return function(){c.disconnect(),u(),d(),f(),h(),g(),y(),I()}}function xe(e,t){!function(e,t){void 0===t&&(t={});var n=e.consoleCb,r=e.networkCb;e.consoleCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.console&&t.console.apply(t,s(e)),n.apply(void 0,s(e))},e.networkCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.network&&t.network.apply(t,s(e)),r.apply(void 0,s(e))}}(e,t);var n=function(e){var t={},n=["script","img","link","video","audio"],r=["log","info","warn","error"],i=[];window.console?r.map((function(e){t[e]=window.console[e]})):window.console={},r.map((function(n){window.console[n]=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];t[n].apply(window.console,r);for(var a=r,o=0;o<a.length;o++)te(a[o])?a[o]="[Array]":le(a[o])?a[o]="[HTMLElement]":se(a[o])?a[o]="[Function]":ce(a[o])?a[o]="[Window]":oe(a[o])&&(a[o]="[Object]");"__memento__"!==r[0]&&e({logType:n,logs:a})}})),window.addEventListener("error",(function(t){var r=t.target||t.srcElement,a=r.attributes&&r.attributes.src&&r.attributes.src.value||"";if((r.nodeName&&n.indexOf(r.nodeName.toLowerCase())>=0||r.tagName&&n.indexOf(r.tagName.toLowerCase())>=0)&&a&&i.indexOf(a.toLowerCase())<0){i.push(a.toLowerCase());var o=(r.nodeName||r.tagName||"")+" "+(a||"unkonw")+" loaded fail";e({logType:"resourceError",logs:[o]})}}));var a=window.onerror;return window.onerror=function(t,n,r,i,o){return!t||t.indexOf("WeixinJSBridge")>=0||e({logType:"jsError",logs:["pageUrl => "+window.location.href,"errorMsg => "+(t||""),"scriptUrl => "+(n||""),"lineNo => "+r,"columnNo => "+i,"errorType => "+(o?o.name:""),"errorStack => "+(o?o.stack:"")]}),a.apply(this,arguments)},function(){window.console.log=t.log,window.console.info=t.info,window.console.warn=t.warn,window.console.error=t.error,window.onerror=a}}(e.consoleCb),r=function(e){if(!window.XMLHttpRequest)return function(){};var t=window.XMLHttpRequest.prototype.open,n=window.XMLHttpRequest.prototype.send,r=window.XMLHttpRequest.prototype.setRequestHeader,i={};function o(t,n){var r=i[t]||{};for(var a in n)r[a]=n[a];if(i[t]=r,r.hasOwnProperty("getData")||r.hasOwnProperty("postData")||delete i[t],r&&r.requestSize&&r.requestSize>1e4&&(r.postData="Post Request => Too long has been blocked"),r&&r.getSize&&r.getSize>1e4&&(r.getData="Get Request => Too long has been blocked"),r&&r.responseSize&&r.responseSize>31457280)r.response="Post Request => Too long has been blocked";else if(r&&(""===r.responseType||"text"===r.responseType))if(ee(r.response)&&""!==r.response)try{r.response=JSON.parse(r.response)}catch(e){r.response=r.response}else void 0!==r.response&&(""===r.response?r.response="":r.response=Object.prototype.toString.call(r.response));r.readyState&&4===r.readyState&&(r&&0==+r.status?("timeout_error"===r.errorType?(r.errorMsg="request error => timeout ( responseTime > "+(r.timeOut||r.costTime)+"ms )",delete r.timeOut):(r.errorMsg="request error => cross_domain_error",r.errorType="cross_domain_error"),e(r)):e(r||{}))}function s(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}return window.XMLHttpRequest.prototype.setRequestHeader=function(e,t){var n=this,i=e.toLowerCase();return"memento-ignore"===i&&(n._noMementoConsole=1==~~t),r.apply(n,arguments)},window.XMLHttpRequest.prototype.open=function(){var e=this,n=[].slice.call(arguments),r=n[0],a=n[1],l=s(),c=null;e._mockRequestID=l,e._mockMethod=r,e._mockUrl=a;var u=e.onreadystatechange||function(){},d=function(){var t=i[l]||{};if(t.readyState=e.readyState,t.status=0,e.readyState>1&&(t.status=e.status),t.responseType=e.responseType,0==e.readyState)t.startTime||(t.startTime=+new Date);else if(1==e.readyState)t.startTime||(t.startTime=+new Date);else if(2==e.readyState);else if(3==e.readyState);else if(4==e.readyState){clearInterval(c);var n=e._mockUrl.split("?");if(t.url=n.shift()||e._mockUrl,t.endTime=+new Date,t.costTime=t.endTime-(t.startTime||t.endTime),t.ua=window.navigator&&window.navigator.userAgent||"",t.response=e.response,"string"==typeof e.response)t.responseSize=e.response.length;else if(e.response&&"number"==typeof e.response.size)t.responseSize=e.response.size;else if(e.response&&"number"==typeof e.response.byteLength)t.responseSize=e.response.byteLength;else try{t.responseSize=JSON.stringify(e.response).length}catch(e){t.responseSize=0}}else clearInterval(c);return e._noMementoConsole||o(l,t),u.apply(e,arguments)};e.onreadystatechange=d;var f=-1;return c=setInterval((function(){f!=e.readyState&&(f=e.readyState,d.call(e))}),10),t.apply(e,n)},window.XMLHttpRequest.prototype.send=function(){var e,t,r,s,l=this,c=[].slice.call(arguments),u=c[0],d=i[l._mockRequestID]||{};d.method=l._mockMethod.toUpperCase(),d.ck=document.cookie;var f=l._mockUrl.split("?");if(f.shift()&&f.length>0){d.getData={},f=(f=f.join("?")).split("&");try{for(var h=a(f),g=h.next();!g.done;g=h.next()){y=(y=g.value).split("="),d.getData[y[0]]=decodeURIComponent(y[1])}}catch(t){e={error:t}}finally{try{g&&!g.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}d.getData&&(d.getSize=JSON.stringify(d.getData).length)}if("POST"==d.method){if(ee(u)&&""!==u){var p=u.split("&");d.postData={};try{for(var m=a(p),v=m.next();!v.done;v=m.next()){var y;y=(y=v.value).split("="),d.postData[decodeURIComponent(y[0])]=decodeURIComponent(y[1])}}catch(e){r={error:e}}finally{try{v&&!v.done&&(s=m.return)&&s.call(m)}finally{if(r)throw r.error}}}else ue(u)&&(d.postData=u);d.postData&&(d.requestSize=JSON.stringify(d.postData).length)}var I=l.ontimeout||function(){},C=function(){var e=arguments[0].target||arguments[0].srcElement;return d.timeOut=e.timeout,d.errorType="timeout_error",o(l._mockRequestID,d),I.apply(l,arguments)};return l.ontimeout=C,l._noMementoConsole||o(l._mockRequestID,d),n.apply(l,c)},function(){window.XMLHttpRequest.prototype.setRequestHeader=r,window.XMLHttpRequest.prototype.open=t,window.XMLHttpRequest.prototype.send=n}}(e.networkCb);return function(){n(),r()}}for(var Ee=function(){function e(){this.handlerHistory()}return e.getInstance=function(){return this.instance=this.instance||new e,this.instance},e.prototype.handlerHistory=function(){var e=function(){if(window.Event)return new window.Event("__changestate__");if(document){var e=document.createEvent("HTMLEvents");return e.initEvent("__changestate__",!1,!0),e}return null},t=function(t){var n=window.history[t];return function(){var t=n.apply(this,arguments),r=e();return r&&window.dispatchEvent(r),t}};window.history.pushState=t("pushState"),window.history.replaceState=t("replaceState")},e}(),Ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Be=0;Be<Ne.length;Be++)Te[Ne.charCodeAt(Be)]=Be;var Me=function(e){var t,n,r,i,a,o=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var c=new ArrayBuffer(o),u=new Uint8Array(c);for(t=0;t<s;t+=4)n=Te[e.charCodeAt(t)],r=Te[e.charCodeAt(t+1)],i=Te[e.charCodeAt(t+2)],a=Te[e.charCodeAt(t+3)],u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|i>>2,u[l++]=(3&i)<<6|63&a;return c},Re=new Map;var De=function(e,t,n){if(e&&(Oe(e,t)||"object"==typeof e)){var r=function(e,t){var n=Re.get(e);return n||(n=new Map,Re.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 Fe(e,t,n){if(e instanceof Array)return e.map((function(e){return Fe(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){var r=e.constructor.name;return e instanceof Uint8ClampedArray?{rr_type:r,args:[]}:{rr_type:r,args:[Object.values(e)]}}return e instanceof ArrayBuffer?{rr_type:r=e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=Ne[n[t]>>2],i+=Ne[(3&n[t])<<4|n[t+1]>>4],i+=Ne[(15&n[t+1])<<2|n[t+2]>>6],i+=Ne[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e)}:e instanceof DataView?{rr_type:r=e.constructor.name,args:[Fe(e.buffer,t,n),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?{rr_type:r=e.constructor.name,src:e.src}:e instanceof HTMLCanvasElement?{rr_type:r="HTMLImageElement",src:e.toDataURL()}:e instanceof ImageData?{rr_type:r=e.constructor.name,args:[Fe(e.data,t,n),e.width,e.height]}:Oe(e,t)||"object"==typeof e?{rr_type:r=e.constructor.name,index:De(e,t,n)}:e}var ze=function(e,t,n){return s(e).map((function(e){return Fe(e,t,n)}))},Oe=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 Ze(e,t){var n=[];try{var r=U(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return X(this,t)||"__context"in this||(this.__context=n),e.apply(this,s([n],r))}}));n.push(r)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){n.forEach((function(e){return e()}))}}function Le(e,t,n,r,i,o){var l,c,u=[],d=Object.getOwnPropertyNames(e),f=function(a){try{if("function"!=typeof e[a])return"continue";var l=U(e,a,(function(l){return function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var d=l.apply(this,c);if(De(d,o,e),!X(this.canvas,r)){i.getId(this.canvas);var f=ze(s(c),o,e),h={type:t,property:a,args:f};n(this.canvas,h)}return d}}));u.push(l)}catch(r){var c=V(e,a,{set:function(e){n(this.canvas,{type:t,property:a,args:[e],setter:!0})}});u.push(c)}};try{for(var h=a(d),g=h.next();!g.done;g=h.next()){f(g.value)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(c=h.return)&&c.call(h)}finally{if(l)throw l.error}}return u}var Ge=null;try{var We="undefined"!=typeof module&&"function"==typeof module.require&&module.require("worker_threads")||"function"==typeof __non_webpack_require__&&__non_webpack_require__("worker_threads")||"function"==typeof require&&require("worker_threads");Ge=We.Worker}catch(ut){}function Ve(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),a=i.indexOf("\n",10)+1,o=i.substring(a)+(r?"//# sourceMappingURL="+r:"");return function(e){return new Ge(o,Object.assign({},e,{eval:!0}))}}function Ue(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,a=n.length;i<a;++i)r[i]=n.charCodeAt(i);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),a=i.indexOf("\n",10)+1,o=i.substring(a)+(r?"//# sourceMappingURL="+r:""),s=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(s)}var He="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);var Ke,Xe,Ye,Pe,Je=(Ke="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9DQoNCiAgICBmdW5jdGlvbiBfX2dlbmVyYXRvcih0aGlzQXJnLCBib2R5KSB7DQogICAgICAgIHZhciBfID0geyBsYWJlbDogMCwgc2VudDogZnVuY3Rpb24oKSB7IGlmICh0WzBdICYgMSkgdGhyb3cgdFsxXTsgcmV0dXJuIHRbMV07IH0sIHRyeXM6IFtdLCBvcHM6IFtdIH0sIGYsIHksIHQsIGc7DQogICAgICAgIHJldHVybiBnID0geyBuZXh0OiB2ZXJiKDApLCAidGhyb3ciOiB2ZXJiKDEpLCAicmV0dXJuIjogdmVyYigyKSB9LCB0eXBlb2YgU3ltYm9sID09PSAiZnVuY3Rpb24iICYmIChnW1N5bWJvbC5pdGVyYXRvcl0gPSBmdW5jdGlvbigpIHsgcmV0dXJuIHRoaXM7IH0pLCBnOw0KICAgICAgICBmdW5jdGlvbiB2ZXJiKG4pIHsgcmV0dXJuIGZ1bmN0aW9uICh2KSB7IHJldHVybiBzdGVwKFtuLCB2XSk7IH07IH0NCiAgICAgICAgZnVuY3Rpb24gc3RlcChvcCkgew0KICAgICAgICAgICAgaWYgKGYpIHRocm93IG5ldyBUeXBlRXJyb3IoIkdlbmVyYXRvciBpcyBhbHJlYWR5IGV4ZWN1dGluZy4iKTsNCiAgICAgICAgICAgIHdoaWxlIChfKSB0cnkgew0KICAgICAgICAgICAgICAgIGlmIChmID0gMSwgeSAmJiAodCA9IG9wWzBdICYgMiA/IHlbInJldHVybiJdIDogb3BbMF0gPyB5WyJ0aHJvdyJdIHx8ICgodCA9IHlbInJldHVybiJdKSAmJiB0LmNhbGwoeSksIDApIDogeS5uZXh0KSAmJiAhKHQgPSB0LmNhbGwoeSwgb3BbMV0pKS5kb25lKSByZXR1cm4gdDsNCiAgICAgICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07DQogICAgICAgICAgICAgICAgc3dpdGNoIChvcFswXSkgew0KICAgICAgICAgICAgICAgICAgICBjYXNlIDA6IGNhc2UgMTogdCA9IG9wOyBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSA1OiBfLmxhYmVsKys7IHkgPSBvcFsxXTsgb3AgPSBbMF07IGNvbnRpbnVlOw0KICAgICAgICAgICAgICAgICAgICBjYXNlIDc6IG9wID0gXy5vcHMucG9wKCk7IF8udHJ5cy5wb3AoKTsgY29udGludWU7DQogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoISh0ID0gXy50cnlzLCB0ID0gdC5sZW5ndGggPiAwICYmIHRbdC5sZW5ndGggLSAxXSkgJiYgKG9wWzBdID09PSA2IHx8IG9wWzBdID09PSAyKSkgeyBfID0gMDsgY29udGludWU7IH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcFswXSA9PT0gMyAmJiAoIXQgfHwgKG9wWzFdID4gdFswXSAmJiBvcFsxXSA8IHRbM10pKSkgeyBfLmxhYmVsID0gb3BbMV07IGJyZWFrOyB9DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0ICYmIF8ubGFiZWwgPCB0WzJdKSB7IF8ubGFiZWwgPSB0WzJdOyBfLm9wcy5wdXNoKG9wKTsgYnJlYWs7IH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0WzJdKSBfLm9wcy5wb3AoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIF8udHJ5cy5wb3AoKTsgY29udGludWU7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIG9wID0gYm9keS5jYWxsKHRoaXNBcmcsIF8pOw0KICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyBvcCA9IFs2LCBlXTsgeSA9IDA7IH0gZmluYWxseSB7IGYgPSB0ID0gMDsgfQ0KICAgICAgICAgICAgaWYgKG9wWzBdICYgNSkgdGhyb3cgb3BbMV07IHJldHVybiB7IHZhbHVlOiBvcFswXSA/IG9wWzFdIDogdm9pZCAwLCBkb25lOiB0cnVlIH07DQogICAgICAgIH0NCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMiA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMiBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgdmFyIGxhc3RCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIHZhciB0cmFuc3BhcmVudEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgZnVuY3Rpb24gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIFByb21pc2UsIGZ1bmN0aW9uICgpIHsNCiAgICAgICAgICAgIHZhciBpZCwgb2Zmc2NyZWVuLCBibG9iLCBhcnJheUJ1ZmZlciwgYmFzZTY0Ow0KICAgICAgICAgICAgcmV0dXJuIF9fZ2VuZXJhdG9yKHRoaXMsIGZ1bmN0aW9uIChfYSkgew0KICAgICAgICAgICAgICAgIHN3aXRjaCAoX2EubGFiZWwpIHsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOg0KICAgICAgICAgICAgICAgICAgICAgICAgaWQgPSB3aWR0aCArICItIiArIGhlaWdodDsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0cmFuc3BhcmVudEJsb2JNYXAuaGFzKGlkKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzIsIHRyYW5zcGFyZW50QmxvYk1hcC5nZXQoaWQpXTsNCiAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNjcmVlbiA9IG5ldyBPZmZzY3JlZW5DYW52YXMod2lkdGgsIGhlaWdodCk7DQogICAgICAgICAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbNCwgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoKV07DQogICAgICAgICAgICAgICAgICAgIGNhc2UgMToNCiAgICAgICAgICAgICAgICAgICAgICAgIGJsb2IgPSBfYS5zZW50KCk7DQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIGJsb2IuYXJyYXlCdWZmZXIoKV07DQogICAgICAgICAgICAgICAgICAgIGNhc2UgMjoNCiAgICAgICAgICAgICAgICAgICAgICAgIGFycmF5QnVmZmVyID0gX2Euc2VudCgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zcGFyZW50QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzIsIGJhc2U2NF07DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfSk7DQogICAgICAgIH0pOw0KICAgIH0NCiAgICB2YXIgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgdmFyIF9hLCBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCB0cmFuc3BhcmVudEJhc2U2NCwgb2Zmc2NyZWVuLCBjdHgsIGJsb2IsIHR5cGUsIGFycmF5QnVmZmVyLCBiYXNlNjQsIF9iOw0KICAgICAgICAgICAgcmV0dXJuIF9fZ2VuZXJhdG9yKHRoaXMsIGZ1bmN0aW9uIChfYykgew0KICAgICAgICAgICAgICAgIHN3aXRjaCAoX2MubGFiZWwpIHsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOg0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEoJ09mZnNjcmVlbkNhbnZhcycgaW4gZ2xvYmFsVGhpcykpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFsyLCB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZDogZS5kYXRhLmlkIH0pXTsNCiAgICAgICAgICAgICAgICAgICAgICAgIF9hID0gZS5kYXRhLCBpZCA9IF9hLmlkLCBiaXRtYXAgPSBfYS5iaXRtYXAsIHdpZHRoID0gX2Eud2lkdGgsIGhlaWdodCA9IF9hLmhlaWdodDsNCiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgICAgICAgICAgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgICAgICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOw0KICAgICAgICAgICAgICAgICAgICAgICAgYml0bWFwLmNsb3NlKCk7DQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKCldOw0KICAgICAgICAgICAgICAgICAgICBjYXNlIDE6DQogICAgICAgICAgICAgICAgICAgICAgICBibG9iID0gX2Muc2VudCgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA9IGJsb2IudHlwZTsNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbNCwgYmxvYi5hcnJheUJ1ZmZlcigpXTsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSAyOg0KICAgICAgICAgICAgICAgICAgICAgICAgYXJyYXlCdWZmZXIgPSBfYy5zZW50KCk7DQogICAgICAgICAgICAgICAgICAgICAgICBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgX2IgPSAhbGFzdEJsb2JNYXAuaGFzKGlkKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghX2IpIHJldHVybiBbMywgNF07DQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIHRyYW5zcGFyZW50QmFzZTY0XTsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSAzOg0KICAgICAgICAgICAgICAgICAgICAgICAgX2IgPSAoX2Muc2VudCgpKSA9PT0gYmFzZTY0Ow0KICAgICAgICAgICAgICAgICAgICAgICAgX2MubGFiZWwgPSA0Ow0KICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoX2IpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFsyLCB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZDogaWQgfSldOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxhc3RCbG9iTWFwLmdldChpZCkgPT09IGJhc2U2NCkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzIsIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkOiBpZCB9KV07DQogICAgICAgICAgICAgICAgICAgICAgICB3b3JrZXIucG9zdE1lc3NhZ2Uoew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBpZCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiB0eXBlLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhc2U2NDogYmFzZTY0LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiB3aWR0aCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IGhlaWdodCwNCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOw0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFsyXTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9KTsNCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",Xe=null,Ye=!1,He?Ve(Ke,Xe,Ye):function(e,t,n){var r;return function(i){return r=r||Ue(e,t,n),new Worker(r,i)}}(Ke,Xe,Ye)),je=function(){function e(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};var t=e.sampling,n=void 0===t?"all":t,r=e.win,i=e.blockClass,a=e.recordCanvas;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===n&&this.initCanvasMutationObserver(r,i),a&&"number"==typeof n&&this.initCanvasFPSObserver(n,r,i)}return e.prototype.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1},e.prototype.initCanvasFPSObserver=function(e,t,n){var a=this,o=Ze(t,n),s=new Map,l=new Je;l.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,o=n.width,l=n.height;a.mutationCb({id:t,type:B["2D"],commands:[{property:"clearRect",args:[0,0,o,l]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var c,u=1e3/e,d=0,f=function(e){d&&e-d<u||(d=e,t.document.querySelectorAll("canvas:not(."+n+" *)").forEach((function(e){return r(a,void 0,void 0,(function(){var t,n,r,a;return i(this,(function(i){switch(i.label){case 0:return t=this.mirror.getId(e),s.get(t)?[2]:(s.set(t,!0),["webgl","webgl2"].includes(e.__context)&&(n=e.getContext(e.__context),!1===(null===(a=null==n?void 0:n.getContextAttributes())||void 0===a?void 0:a.preserveDrawingBuffer)&&(null==n||n.clear(n.COLOR_BUFFER_BIT))),[4,createImageBitmap(e)]);case 1:return r=i.sent(),l.postMessage({id:t,bitmap:r,width:e.width,height:e.height},[r]),[2]}}))}))}))),c=requestAnimationFrame(f)};c=requestAnimationFrame(f),this.resetObservers=function(){o(),cancelAnimationFrame(c)}},e.prototype.initCanvasMutationObserver=function(e,t){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Ze(e,t),r=function(e,t,n,r){var i,o,l=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=function(r){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[r])return"continue";var i=U(t.CanvasRenderingContext2D.prototype,r,(function(i){return function(){for(var a=this,o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return X(this.canvas,n)||setTimeout((function(){var n=ze(s(o),t,a);e(a.canvas,{type:B["2D"],property:r,args:n})}),0),i.apply(this,o)}}));l.push(i)}catch(n){var a=V(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e(this.canvas,{type:B["2D"],property:r,args:[t],setter:!0})}});l.push(a)}};try{for(var d=a(c),f=d.next();!f.done;f=d.next()){u(f.value)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}return function(){l.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror),i=function(e,t,n,r){var i=[];return i.push.apply(i,s(Le(t.WebGLRenderingContext.prototype,B.WebGL,e,n,r,t))),void 0!==t.WebGL2RenderingContext&&i.push.apply(i,s(Le(t.WebGL2RenderingContext.prototype,B.WebGL2,e,n,r,t))),function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror);this.resetObservers=function(){n(),r(),i()}},e.prototype.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.startRAFTimestamping=function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)},e.prototype.flushPendingCanvasMutations=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()}))},e.prototype.flushPendingCanvasMutationFor=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 e.type,function(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}(e,["type"])})),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}},e}();function Qe(e){return n(n({},e),{timestamp:e.timestamp||Date.now()})}function qe(e,t){return t?e.map((function(e){return n(n({},e),{x:-40,y:-40})})):e}function $e(t,n,r){var i,a,s,l;void 0===t&&(t={}),void 0===n&&(n=!1);var c=t.emit,u=t.blockClass,d=void 0===u?"mem-block":u;t.ignoreClass;var f=t.inlineStylesheet,h=void 0===f||f,g=t.maskAllInputs,p=void 0!==g&&g,m=t.blockElements,v=void 0===m?[]:m,I=t.recordCanvas,C=void 0!==I&&I;if(t.ignoreMousemove,!Pe)throw new Error("please take full snapshot after start recording");Pe(Qe({type:e.EventType.Meta,data:{href:window.location.href,width:K(),height:H(),ratio:window.devicePixelRatio||1}}),n);var b=o(function(e,t,n,r,i,a){void 0===t&&(t="mem-block"),void 0===n&&(n=!0),void 0===i&&(i=[]),void 0===a&&(a=!1);var o={};return[y(e,e,o,t,!1,n,!0===r?{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}:!1===r?{}:r,i,a),o]}(document,d,h,p,v,C),2),A=b[0],w=b[1];if(!A)return console.warn("Failed to snapshot the document");G.map=w;var _={type:e.EventType.FullSnapshot,data:{href:window.location.href,width:K(),height:H(),ratio:window.devicePixelRatio||1,node:A,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(a=null===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.parentElement)||void 0===a?void 0:a.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(l=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.parentElement)||void 0===l?void 0:l.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}};r&&(_.tag=r);var S=Qe(_);Pe(S),c&&c(S,n)}function et(t){void 0===t&&(t={});var r=t.emit,i=t.checkoutEveryNms,o=t.checkoutEveryNth,s=t.blockClass,l=void 0===s?"mem-block":s,c=t.ignoreClass,u=void 0===c?"mem-ignore":c,d=t.asyncClass,f=t.blockElements,h=void 0===f?[]:f,g=t.inlineStylesheet,p=void 0===g||g,m=t.maskAllInputs,v=t.maskInputOptions,y=t.hooks,I=t.packFn,C=t.sampling,b=void 0===C?{}:C,A=t.mousemoveWait,w=t.recordCanvas,_=void 0!==w&&w,S=t.ignoreMousemove,k=void 0!==S&&S,x=t.onlyRecordFullSnapshot,E=void 0!==x&&x;if(!r)throw new Error("emit function is required");void 0!==A&&void 0===b.mousemove&&(b.mousemove=A);var T,B=!0===m?{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}:void 0!==v?v:{};J();var M=0,R=n(n({},t),{emit:function(){}});Pe=function(t,n){if(r(I?I(t):t,n),t.type===e.EventType.FullSnapshot)T=t,M=0;else if(t.type===e.EventType.IncrementalSnapshot){M++;var a=o&&M>=o,s=i&&t.timestamp-T.timestamp>i;(a||s)&&$e(R,!0)}};var D=function(t){return Pe(Qe({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.CanvasMutation},t)}))},F=new je({recordCanvas:_,mutationCb:D,win:window,blockClass:l,mirror:G,sampling:b.canvas});try{Ee.getInstance();var z=[],O=window.location.href,Z=function(t){(t||O!==window.location.href)&&(O=window.location.href,Pe(Qe({type:e.EventType.PageChange,data:{url:O}})))},W=function(){Z(!1)};E||(z.push(L("__changestate__",W,window)),z.push(L("hashchange",W,window)),z.push(L("popstate",W,window)),z.push(L("pageshow",(function(e){e.persisted&&Z(!0)}),window)));var V=[],U=!1;E||z.push(xe({consoleCb:function(t){var n={type:e.EventType.Other,data:{source:N.Console,sourceData:t}};U?Pe(Qe(n)):V.push(n)},networkCb:function(t){var n={type:e.EventType.Other,data:{source:N.Network,sourceData:t}};U?Pe(Qe(n)):V.push(n)}},y)),z.push(L("DOMContentLoaded",(function(){Pe(Qe({type:e.EventType.DomContentLoaded,data:{}}))})));var H=function(){var t,r;$e(R);try{for(var i=a(V),o=i.next();!o.done;o=i.next()){var s=o.value;Pe(Qe(s))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}U=!0,V=[],E||z.push(ke({mutationCb:function(t){return Pe(Qe({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Mutation},t)}))},mousemoveCb:function(t,n){return Pe(Qe({type:e.EventType.IncrementalSnapshot,data:{source:n,positions:qe(t,k)}}))},mouseInteractionCb:function(t){return Pe(Qe(function(t,r){return r&&(t.x=-40,t.y=-40),{type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MouseInteraction},t)}}(t,k)))},scrollCb:function(t){return Pe(Qe({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Scroll},t)}))},viewportResizeCb:function(t){return Pe(Qe({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return Pe(Qe({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Input},t)}))},mediaInteractionCb:function(t){return Pe(Qe({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MediaInteraction},t)}))},canvasMutationCb:D,styleSheetRuleCb:function(t){return Pe(Qe({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.StyleSheetRule},t)}))},userDefinedEventCb:function(t){return Pe(Qe({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.UserDefinedEvent},t)}))},blockClass:l,blockElements:h,ignoreClass:u,asyncClass:d,maskInputOptions:B,inlineStylesheet:p,sampling:b,recordCanvas:_,canvasManager:F},y))};return"interactive"===document.readyState||"complete"===document.readyState?H():z.push(L("load",(function(){Pe(Qe({type:e.EventType.Load,data:{}})),H()}),window)),function(){z.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}function tt(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)}))}}}et.addCustomEvent=function(t,n){if(!Pe)throw new Error("please add custom event after start recording");Pe(Qe({type:e.EventType.Custom,data:{tag:t,payload:n}}))},et.takeFullSnapshot=function(e,t){void 0===e&&(e={}),Pe&&$e(e,!1,t)};var nt=Object.freeze({__proto__:null,default:tt});function rt(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function it(e,t){return e(t={exports:{}},t.exports),t.exports}var at,ot=it((function(e,t){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,o=(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])?g.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):i.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])?i.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):g.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!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;g.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");i.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!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.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!==l(arguments[0])){var n=f(this),r=n.getBoundingClientRect(),a=this.getBoundingClientRect();n!==t.body?(g.call(this,n,n.scrollLeft+a.left-r.left,n.scrollTop+a.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:a.left,top:a.top,behavior:"smooth"})}else i.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+o<e.scrollHeight:"X"===t?e.clientWidth+o<e.scrollWidth:void 0}function u(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}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,r,i,o,s=(a()-t.startTime)/468;o=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*o)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(h.bind(e,t))}function g(n,r,o){var l,c,u,d,f=a();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,d=s),h({scrollable:l,method:d,startTime:f,startX:c,startY:u,x:r,y:o})}}}})).polyfill,st=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}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,s(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.config,r=this;this.raf=requestAnimationFrame((function i(a){for(r.timeOffset+=(a-e)*n.speed,e=a;t.length;){var o=t[0];if(!(r.timeOffset>=o.delay))break;t.shift(),o.doAction()}(t.length>0||r.config.liveMode)&&(r.raf&&cancelAnimationFrame(r.raf),r.raf=requestAnimationFrame(i))}))},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=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;n=r-1}}return t},e}();function lt(t,n){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var r=t.data.positions[0].timeOffset,i=t.timestamp+r;return t.delay=i-n,i-n}return t.delay=t.timestamp-n,t.timestamp-n}
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */function ct(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(at||(at={}));var ut={type:"xstate.init"};function dt(e){return void 0===e?[]:[].concat(e)}function ft(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 pt(e){return"string"==typeof e?{type:e}:e}function mt(e,t){return{value:e,context:t,actions:[],changed:!1,matches:gt(e)}}function vt(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]}var yt=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function It(t,n){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===e.EventType.Meta&&i.timestamp<=n)return t.slice(r)}return t}function Ct(t,r){var i=r.getCastFn,o=r.emitter;return function(e){var t=e.initialState,n=at.NotStarted,r=new Set,i={_machine:e,send:function(i){n===at.Running&&(t=e.transition(t,i),yt(t,pt(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 a="object"==typeof r?r:{context:e.config.context,value:r};t={value:a.value,actions:[],context:a.context,matches:gt(a.value)}}return n=at.Running,yt(t,ut),i},stop:function(){return n=at.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}(function(e,t){void 0===t&&(t={});var n=ct(vt(dt(e.states[e.initial].entry).map((function(e){return ht(e,t.actions)})),e.context,ut),2),r=n[0],i=n[1],a={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:gt(e.initial)},transition:function(t,n){var r,i,o="string"==typeof t?{value:t,context:e.context}:t,s=o.value,l=o.context,c=pt(n),u=e.states[s];if(u.on){var d=dt(u.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 g=h.value;if(void 0===g)return mt(s,l);var p="string"==typeof g?{target:g}:g,m=p.target,v=p.actions,y=void 0===v?[]:v,I=p.cond,C=void 0===I?function(){return!0}:I,b=void 0===m,A=null!=m?m:s,w=e.states[A];if(C(l,c)){var _=ct(vt((b?dt(y):[].concat(u.exit,y,w.entry).filter((function(e){return e}))).map((function(e){return ht(e,a._options.actions)})),l,c),3),S=_[0],k=_[1],x=_[2],E=null!=m?m:s;return{value:E,context:k,actions:S,changed:m!==s||S.length>0||x,matches:gt(E)}}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}return mt(s,l)}};return a}({id:"player",context:t,initial:"inited",states:{inited:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},TO_LIVE:{target:"live",actions:["startLive"]}}},playing:{on:{PAUSE:{target:"paused",actions:["pause"]},PLAY:{target:"playing",actions:["recordTimeOffset","play"]},FAST_FORWARD:"skipping",CAST_EVENT:{target:"playing",actions:"castEvent"},ADD_EVENTS:{target:"playing",actions:["addEvents","recordTimeOffset"]}}},paused:{on:{RESUME:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},ADD_EVENTS:{target:"paused",actions:["addEvents"]}}},skipping:{on:{BACK_TO_NORMAL:"playing"}},ended:{on:{REPLAY:{target:"playing",actions:["recordTimeOffset","play"]},ADD_EVENTS:{target:"playing",actions:["addEvents","recordTimeOffset","play"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:ft({lastPlayedEvent:function(e,n){return"CAST_EVENT"===n.type?n.payload.event:t.lastPlayedEvent}}),recordTimeOffset:ft((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),n(n({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(t){var n,r,s=t.timer,l=t.events,c=t.baselineTime;t.lastPlayedEvent,s.clear();var u=It(l,c),d=new Array,f=function(t){var n=t.timestamp<c;if(n&&!Q(t))return"continue";var r=i(t,n);n?r():d.push({doAction:function(){r(),o.emit(e.ReplayerEvents.EventCast,t)},delay:lt(t,c)})};try{for(var h=a(u),g=h.next();!g.done;g=h.next()){f(g.value)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}o.emit(e.ReplayerEvents.Flush),s.addActions(d),s.start()},pause:function(e){e.timer.clear()},startLive:ft({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:ft((function(t,r){var a=t.baselineTime,s=t.timer,l=t.events;if("ADD_EVENT"===r.type){var c=r.payload.event;l.push(c);var u=c.timestamp<a,d=i(c,u);u?d():s.addAction({doAction:function(){d(),o.emit(e.ReplayerEvents.EventCast,c)},delay:lt(c,a)})}return n(n({},t),{events:l})})),addEvents:ft((function(t,r){var s,l,c=t.timer,u=t.events,d=t.baselineTime,f=t.lastPlayedEvent;if("ADD_EVENTS"===r.type){var h=r.payload.events;if(Array.isArray(h)&&h.length){u=u.concat(h);var g=It(h,d),p=new Array,m=function(t){if(f&&f.timestamp>d&&(t.timestamp<=f.timestamp||t===f))return"continue";var n=t.timestamp<d;if(n&&!Q(t))return"continue";var r=i(t,n);n?r():p.push({doAction:function(){r(),o.emit(e.ReplayerEvents.EventCast,t)},delay:lt(t,d)})};try{for(var v=a(g),y=v.next();!y.done;y=v.next()){m(y.value)}}catch(e){s={error:e}}finally{try{y&&!y.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}o.emit(e.ReplayerEvents.AddEvents),c.addActions(p)}}return n(n({},t),{events:u})}))}}))}var bt=new Map;function At(e,t){var n=bt.get(e);return n||(n=new Map,bt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function wt(e,t,n){var a=this;return function(o){return r(a,void 0,Promise,(function(){var r,a,l,c,u,d,f,h,g,p,m;return i(this,(function(i){switch(i.label){case 0:return o&&"object"==typeof o&&"rr_type"in o?(n&&(n.isUnchanged=!1),"ImageBitmap"===o.rr_type&&"args"in o?[4,wt(e,t,n)(o.args)]:[3,3]):[3,11];case 1:return l=i.sent(),[4,createImageBitmap.apply(null,l)];case 2:return[2,i.sent()];case 3:return"index"in o?n||null===t?[2,o]:(a=o.rr_type,r=o.index,[2,At(t,a)[r]]):[3,4];case 4:return"args"in o?(a=o.rr_type,l=o.args,c=window[a],d=(u=c.bind).apply,f=[c],h=[[void 0]],[4,Promise.all(l.map(wt(e,t,n)))]):[3,6];case 5:return[2,new(d.apply(u,f.concat([s.apply(void 0,h.concat([i.sent()]))])))];case 6:return"base64"in o?[2,Me(o.base64)]:[3,7];case 7:return"src"in o?(g=e.get(o.src))?[2,g]:((p=new Image).src=o.src,e.set(o.src,p),[2,p]):[3,8];case 8:return"data"in o&&"Blob"===o.rr_type?[4,Promise.all(o.data.map(wt(e,t,n)))]:[3,10];case 9:return m=i.sent(),[2,new Blob(m,{type:o.type})];case 10:return[3,13];case 11:return Array.isArray(o)?[4,Promise.all(o.map(wt(e,t,n)))]:[3,13];case 12:return[2,i.sent()];case 13:return[2,o]}}))}))}}var _t=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function St(e){var t=e.mutation,n=e.target,a=e.type,o=e.imageMap,s=e.errorHandler;return r(this,void 0,Promise,(function(){var e,r,l,c,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),(e=function(e,t){try{return t===B.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(e){return null}}(n,a))?t.setter?(e[t.property]=t.args[0],[2]):(r=e[t.property],[4,Promise.all(t.args.map(wt(o,e)))]):[2];case 1:return l=i.sent(),c=r.apply(e,l),function(e,t){if(null==t?void 0:t.constructor){var n=t.constructor.name;if(_t.includes(n)){var r=At(e,n);r.includes(t)||r.push(t)}}}(e,c),!1,[3,3];case 2:return u=i.sent(),s(t,u),[3,3];case 3:return[2]}}))}))}function kt(e){var t=e.event,n=e.mutation,a=e.target,o=e.imageMap,s=e.errorHandler;return r(this,void 0,Promise,(function(){var e,r,l,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),e=a.getContext("2d"),n.setter?(e[n.property]=n.args[0],[2]):(r=e[n.property],"drawImage"!==n.property||"string"!=typeof n.args[0]?[3,1]:(o.get(t),r.apply(e,n.args),[3,3]));case 1:return[4,Promise.all(n.args.map(wt(o,e)))];case 2:l=i.sent(),r.apply(e,l),i.label=3;case 3:return[3,5];case 4:return c=i.sent(),s(n,c),[3,5];case 5:return[2]}}))}))}var xt=tt||nt,Et={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"},Nt={normalSpeed:1,speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"mem-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,mouseTail:Et,forceSkipInactive:!1,mode:"player"},Tt=function(){function s(n,r){var i=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=xt(),this.normalSpeed=-1,this.legacy_missingNodeRetryMap={},this.unloadStylesheetMap={},this.imageMap=new Map,this.canvasEventMap=new Map,!(null==r?void 0:r.liveMode)&&n.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},Nt,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(e.ReplayerEvents.Resize,this.handleResize),ot(),J(),this.setupDom(),this.treeIndex=new q,this.fragmentParentMap=new Map,this.emitter.on(e.ReplayerEvents.Flush,(function(){var e,n,r,s,l,c,u=i.treeIndex.flush(),d=u.scrollMap,f=u.inputMap;try{for(var h=a(d.values()),g=h.next();!g.done;g=h.next()){var p=g.value;i.applyScroll(p)}}catch(t){e={error:t}}finally{try{g&&!g.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}try{for(var m=a(f.values()),v=m.next();!v.done;v=m.next()){p=v.value;i.applyInput(p)}}catch(e){r={error:e}}finally{try{v&&!v.done&&(s=m.return)&&s.call(m)}finally{if(r)throw r.error}}try{for(var y=a(i.fragmentParentMap.entries()),I=y.next();!I.done;I=y.next()){var C=o(I.value,2),b=C[0],A=C[1];G.map[A.__sn.id]=A,A.__sn.type===t.Element&&"textarea"===A.__sn.tagName&&b.textContent&&(A.value=b.textContent),A.appendChild(b)}}catch(e){l={error:e}}finally{try{I&&!I.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}i.fragmentParentMap.clear()})),this.emitter.on(e.ReplayerEvents.EventCast,(function(e){i.timeDisplayer&&(i.timeDisplayer.innerText=j(new Date(e.timestamp),"yyyy/M/d hh:mm:ss"))})),this.service=Ct({events:n.map((function(e){return r&&r.unpackFn?r.unpackFn(e):e})),timer:new st(this.config),speed:(null==r?void 0:r.speed)||Nt.speed,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){e.changed}));var s=this.service.state.context.events,l=s.find((function(t){return t.type===e.EventType.Meta})),c=s.find((function(t){return t.type===e.EventType.FullSnapshot}));if(l){var u=l.data,d=u.width,f=u.height;this.emitter.emit(e.ReplayerEvents.Resize,{width:d,height:f})}c&&this.rebuildFullSnapshot(c)}return Object.defineProperty(s.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),s.prototype.on=function(e,t){this.emitter.on(e,t)},s.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||(this.normalSpeed=-1),!("normalSpeed"in e)&&"speed"in e&&(this.config.normalSpeed=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"))},s.prototype.getMetaData=function(){var e=this.service.state.context.events,t=e[0],n=e[e.length-1];return{startTime:t.timestamp,endTime:n.timestamp,totalTime:n.timestamp-t.timestamp}},s.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},s.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},s.prototype.play=function(t){void 0===t&&(t=0),this.nextUserInteractionEvent=null,this.restoreSpeed(),"ended"===this.service.state.value&&(this.service.state.context.lastPlayedEvent=null,this.service.send({type:"REPLAY",payload:{timeOffset:t}})),"paused"===this.service.state.value?this.service.send({type:"RESUME",payload:{timeOffset:t}}):this.service.send({type:"PLAY",payload:{timeOffset:t}}),this.emitter.emit(e.ReplayerEvents.Start)},s.prototype.pause=function(){this.service.send({type:"PAUSE"}),this.emitter.emit(e.ReplayerEvents.Pause)},s.prototype.resume=function(t){void 0===t&&(t=0),this.service.send({type:"RESUME",payload:{timeOffset:t}}),this.emitter.emit(e.ReplayerEvents.Resume)},s.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},s.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}})}))},s.prototype.addEvents=function(e){var t=this,n=e.map((function(e){return t.config.unpackFn?t.config.unpackFn(e):e}));Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENTS",payload:{events:n}})}))},s.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},s.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},s.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.timeDisplayer=document.createElement("span");var e=document.createElement("div");e.classList.add("replayer-time"),e.appendChild(this.timeDisplayer),this.wrapper.appendChild(e),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 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)},s.prototype.handleResize=function(e){var t,n;this.iframe.style.display="inherit";try{for(var r=a([this.mouseTail,this.iframe]),i=r.next();!i.done;i=r.next()){var o=i.value;o&&(o.setAttribute("width",String(e.width)),o.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},s.prototype.getCastFn=function(t,n){var r,i=this;void 0===n&&(n=!1);var a=function(){if(!n){for(var r=i.service.state.context.events,a=0,o=0,s=r.length;o<s;o++)if(r[o]===t){a=o;break}if(i.config.forceSkipInactive)if(r[a+1]&&r[a+1].timestamp-t.timestamp>3e5)return void i.play(r[a+1].timestamp-r[0].timestamp);if(t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.restoreSpeed()),i.config.skipInactive&&!i.nextUserInteractionEvent){var l=i.service.state.context.events;for(o=a+1,s=l.length;o<s;o++){var c=l[o];if(i.isUserInteraction(c)||c.type===e.EventType.FullSnapshot){c.delay-t.delay>1e4*i.config.speed&&(i.nextUserInteractionEvent=c);break}}if(i.nextUserInteractionEvent){i.normalSpeed=i.config.normalSpeed;var u=i.nextUserInteractionEvent.delay-t.delay,d={speed:Math.min(Math.round(u/5e3),3600),normalSpeed:i.normalSpeed};i.setConfig(d),i.emitter.emit(e.ReplayerEvents.SkipStart,d)}}}};switch(t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:case e.EventType.PageChange:break;case e.EventType.Custom:r=function(){i.emitter.emit(e.ReplayerEvents.CustomEvent,t)};break;case e.EventType.Meta:r=function(){return i.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:r=function(){i.rebuildFullSnapshot(t),i.iframe.contentWindow.scrollTo(t.data.initialOffset),a()};break;case e.EventType.IncrementalSnapshot:r=function(){try{i.applyIncremental(t,n)}catch(e){console.error(e)}a()}}return function(){var n=i.service.state.context.events;r&&r(),i.service.send({type:"CAST_EVENT",payload:{event:t}}),t===n[n.length-1]&&(i.restoreSpeed(),i.service.send("END"),i.emitter.emit(e.ReplayerEvents.Finish))}},s.prototype.rebuildFullSnapshot=function(t){if(!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={},G.map=Z(t.data.node,this.iframe.contentDocument,!0,this.config.cdnHttps)[1];var n=document.createElement("style"),r=this.iframe.contentDocument,i=r.documentElement,a=r.head;i.insertBefore(n,a);for(var o=function(e){var t=["iframe, ."+e.blockClass+" { background: #ccc }","noscript { display: none !important; }"];return"page"===e.mode&&(t.push(".mem-replayer-show { display: block !important; }"),t.push(".mem-replayer-hide { display: none !important; }"),t.push("::-webkit-scrollbar { display: none; }")),t}({blockClass:this.config.blockClass,mode:this.config.mode}).concat(this.config.insertStyleRules),s=0;s<o.length;s++)n.sheet.insertRule(o[s],s);this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded,t),"page"!==this.config.mode&&this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},s.prototype.waitForStylesheetLoad=function(){var t,n=this,r=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.head;if(r){var i,a=new Set,o=this.service.state,s=r.querySelectorAll('link[rel="stylesheet"]');(s=Array.prototype.filter.call(s,(function(e){return!!n.unloadStylesheetMap[e.href]}))).forEach((function(t){t.sheet||(a.add(t),n.unloadStylesheetMap[t.href]=1,t.addEventListener("load",(function(){a.delete(t),0===a.size&&-1!==i&&(o.matches("playing")&&n.resume(n.getCurrentTime()),n.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),i&&window.clearTimeout(i))})))})),a.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),i=window.setTimeout((function(){o.matches("playing")&&n.resume(n.getCurrentTime()),i=-1}),this.config.loadTimeout))}},s.prototype.preloadAllImages=function(){return r(this,void 0,Promise,(function(){var t,n,r,o,s,l,c,u,d,f=this;return i(this,(function(i){this.service.state,t=function(){f.service.state},this.emitter.on(e.ReplayerEvents.Start,t),this.emitter.on(e.ReplayerEvents.Pause,t),n=[],r=function(t){t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.CanvasMutation&&(n.push(o.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach((function(e){f.preloadImages(e,t)})))},o=this;try{for(s=a(this.service.state.context.events),l=s.next();!l.done;l=s.next())c=l.value,r(c)}catch(e){u={error:e}}finally{try{l&&!l.done&&(d=s.return)&&d.call(s)}finally{if(u)throw u.error}}return[2,Promise.all(n)]}))}))},s.prototype.preloadImages=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.createImageData(n.width,n.height);null==i||i.data,JSON.parse(e.args[0]),null==r||r.putImageData(i,0,0)}},s.prototype.deserializeAndPreloadCanvasEvents=function(e,t){return r(this,void 0,void 0,(function(){var a,o,s,l=this;return i(this,(function(c){switch(c.label){case 0:return this.canvasEventMap.has(t)?[3,4]:(a={isUnchanged:!0},"commands"in e?[4,Promise.all(e.commands.map((function(e){return r(l,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return[4,Promise.all(e.args.map(wt(this.imageMap,null,a)))];case 1:return t=r.sent(),[2,n(n({},e),{args:t})]}}))}))})))]:[3,2]);case 1:return o=c.sent(),!1===a.isUnchanged&&this.canvasEventMap.set(t,n(n({},e),{commands:o})),[3,4];case 2:return[4,Promise.all(e.args.map(wt(this.imageMap,null,a)))];case 3:s=c.sent(),!1===a.isUnchanged&&this.canvasEventMap.set(t,n(n({},e),{args:s})),c.label=4;case 4:return[2]}}))}))},s.prototype.applyIncremental=function(t,n){var a=this,o=this.service.state.context.baselineTime,s=t.data;switch(s.source){case e.IncrementalSource.Mutation:n&&(s.adds.forEach((function(e){return a.treeIndex.add(e)})),s.texts.forEach((function(e){return a.treeIndex.text(e)})),s.attributes.forEach((function(e){return a.treeIndex.attribute(e)})),s.removes.forEach((function(e){return a.treeIndex.remove(e)}))),this.applyMutation(s,n);break;case e.IncrementalSource.Drag:case e.IncrementalSource.TouchMove:case e.IncrementalSource.MouseMove:if(n){var l=s.positions[s.positions.length-1];this.moveAndHover(s,l.x,l.y,l.id,n)}else s.positions.forEach((function(e){var r={doAction:function(){a.moveAndHover(s,e.x,e.y,e.id,n)},delay:e.timeOffset+t.timestamp-o};a.timer.addAction(r)}));break;case e.IncrementalSource.MouseInteraction:if(-1===s.id)break;var c=new Event(e.MouseInteractions[s.type].toLowerCase());if(!(f=G.getNode(s.id)))return this.debugNodeNotFound(s,s.id);this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:s.type,target:f});var u=this.config.triggerFocus;switch(s.type){case e.MouseInteractions.Blur:"blur"in f&&f.blur();break;case e.MouseInteractions.Focus:u&&f.focus&&f.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:n||(this.moveAndHover(s,s.x,s.y,s.id,n),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:f.dispatchEvent(c)}break;case e.IncrementalSource.Scroll:if(-1===s.id)break;if(n){this.treeIndex.scroll(s);break}this.applyScroll(s);break;case e.IncrementalSource.ViewportResize:s.rotate&&this.emitter.emit(e.ReplayerEvents.Resize,{width:s.width,height:s.height});break;case e.IncrementalSource.Input:if(-1===s.id)break;if(n){this.treeIndex.input(s);break}this.applyInput(s);break;case e.IncrementalSource.StyleSheetRule:if(!(f=G.getNode(s.id)))return this.debugNodeNotFound(s,s.id);var d=f.sheet;s.adds&&s.adds.forEach((function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,d.rules.length);try{d.insertRule(t,r)}catch(e){}})),s.removes&&s.removes.forEach((function(e){var t=e.index;d.deleteRule(t)}));break;case e.IncrementalSource.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var f;if(!(f=G.getNode(s.id)))return this.debugNodeNotFound(s,s.id);!function(e){var t=e.event,n=e.mutation,a=e.target,o=e.imageMap,s=e.canvasEventMap,l=e.errorHandler;r(this,void 0,Promise,(function(){var e,r,c,u,d;return i(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,10,,11]),e=s.get(t)||n,r="commands"in e?e.commands:[e],![B.WebGL,B.WebGL2].includes(n.type))return[3,5];c=0,i.label=1;case 1:return c<r.length?[4,St({mutation:u=r[c],type:n.type,target:a,imageMap:o,errorHandler:l})]:[3,4];case 2:i.sent(),i.label=3;case 3:return c++,[3,1];case 4:return[2];case 5:c=0,i.label=6;case 6:return c<r.length?(u=r[c],[4,kt({event:t,mutation:u,target:a,imageMap:o,errorHandler:l})]):[3,9];case 7:i.sent(),i.label=8;case 8:return c++,[3,6];case 9:return[3,11];case 10:return d=i.sent(),l(n,d),[3,11];case 11:return[2]}}))}))}({event:t,mutation:s,target:f,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)});break;case e.IncrementalSource.UserDefinedEvent:if(s.evt===E.LivePlay){var h=this.iframe.contentDocument;if(!h||!s.selector||!s.url)return;var g=h.querySelector(s.selector);if(g&&g.tagName&&"video"===g.tagName.toLowerCase()){g.setAttribute("src",s.url),g.play();var p=new CustomEvent("memento-player-live-play",{detail:{target:g},bubbles:!0,cancelable:!0});window.document.dispatchEvent(p)}}}},s.prototype.applyMutation=function(e,t){var r=this;e.removes.forEach((function(t){var n=G.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);var i=G.getNode(t.parentId);if(!i)return r.warnNodeNotFound(e,t.parentId);if(G.removeNodeFromMap(n),i){var a=r.fragmentParentMap.get(i)||i,o=r.fragmentParentMap.get(n)||n;a.contains(o)?a.removeChild(o):console.warn("=====target: "+t.id+" dont exist in parent: "+t.parentId+"======, ")}}));var i=n({},this.legacy_missingNodeRetryMap),a=[],o=function(e){if(!r.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=G.getNode(e.parentId);if(!n)return a.push(e);var o=r.iframe.contentDocument.contains(n);if(t&&o){var s=document.createDocumentFragment();for(G.map[e.parentId]=s,r.fragmentParentMap.set(s,n);n.firstChild;)s.appendChild(n.firstChild);n=s}var l=null,c=null;if(e.previousId&&(l=G.getNode(e.previousId)),e.nextId&&(c=G.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!c)return a.push(e);if(!G.has(e.node.id)){var u=O(e.node,r.iframe.contentDocument,G.map,!0,!0,r.config.cdnHttps);-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(i,n,u,e)):i[e.node.id]={node:u,mutation:e}}};for(e.adds.forEach((function(e){o(e)}));a.length;){if(a.every((function(e){return!Boolean(G.getNode(e.parentId))})))return a.forEach((function(t){return r.warnNodeNotFound(e,t.node.id)}));var s=a.shift();o(s)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),e.texts.forEach((function(t){var n=G.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=G.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){if(t.attributes.hasOwnProperty("_memimage_"+i))continue;var a=t.attributes[i];i=i.replace("_memimage_",""),null!==a?"video"===n.tagName&&"mem_placeholder"===i?n.style.background="center / cover no-repeat url("+a+")":n.setAttribute(i,a):n.removeAttribute(i)}}))},s.prototype.applyScroll=function(e){var t=G.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){}},s.prototype.applyInput=function(e){var t=G.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},s.prototype.legacy_resolveMissingNode=function(e,t,n,r){var i=r.previousId,a=r.nextId,o=i&&e[i],s=a&&e[a];if(o){var l=o,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)}},s.prototype.moveAndHover=function(e,t,n,r,i){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var a=G.getNode(r);if(!a)return this.debugNodeNotFound(e,r);var o=de(a,this.iframe),s=t*o.absoluteScale+o.x,l=n*o.absoluteScale+o.y;this.mouse.style.left=s+"px",this.mouse.style.top=l+"px",i||this.drawMouseTail({x:s,y:l}),this.hoverElements(a)},s.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?Et:Object.assign({},Et,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,a=n.strokeStyle,o=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=a,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()}),o/this.config.speed)}},s.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},s.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},s.prototype.restoreSpeed=function(){if(-1!==this.normalSpeed){var t={speed:this.normalSpeed};this.setConfig(t),this.emitter.emit(e.ReplayerEvents.SkipEnd,t),this.normalSpeed=-1}},s.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},s.prototype.warnCanvasMutationFailed=function(e,t){console.warn("Has error on canvas update",t,"canvas mutation:",e)},s.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},s}(),Bt=it((function(e,t){e.exports=function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){if(!s&&rt)return rt();if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,n,r)}return n[o].exports}for(var a=rt,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(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 r in n)i(n,r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r,i,a,o;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},o={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,a)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(r)},{}],2:[function(e,t,n){var r=e("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var o=new r.Buf8(256),s=0;s<256;s++)o[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&&a||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",o=0;o<t;o++)n+=String.fromCharCode(e[o]);return n}o[254]=o[254]=1,n.string2buf=function(e){var t,n,i,a,o,s=e.length,l=0;for(a=0;a<s;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<s&&56320==(64512&(i=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(l),o=0,a=0;o<l;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<s&&56320==(64512&(i=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,i,a,s=t||e.length,c=new Array(2*s);for(r=0,n=0;n<s;)if((i=e[n++])<128)c[r++]=i;else if((a=o[i])>4)c[r++]=65533,n+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&n<s;)i=i<<6|63&e[n++],a--;a>1?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return l(c,r)},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+o[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{a=a+(i=i+t[r++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}},{}],4:[function(e,t,n){var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}},{}],5:[function(e,t,n){var r,i=e("../utils/common"),a=e("./trees"),o=e("./adler32"),s=e("./crc32"),l=e("./messages");function c(e,t){return e.msg=l[t],t}function u(e){return(e<<1)-(e>4?9:0)}function d(e){for(var t=e.length;--t>=0;)e[t]=0}function f(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function h(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,f(e.strm)}function g(e,t){e.pending_buf[e.pending++]=t}function p(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function m(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,u=e.w_mask,d=e.prev,f=e.strstart+258,h=c[a+o-1],g=c[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+o]===g&&c[n+o-1]===h&&c[n]===c[a]&&c[++n]===c[a+1]){a+=2,n++;do{}while(c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&a<f);if(r=258-(f-a),a=f-258,r>o){if(e.match_start=t,o=r,r>=s)break;h=c[a+o-1],g=c[a+o]}}}while((t=d[t&u])>l&&0!=--i);return o<=e.lookahead?o:e.lookahead}function v(e){var t,n,r,a,l,c,u,d,f,h,g=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=g+(g-262)){i.arraySet(e.window,e.window,g,g,0),e.match_start-=g,e.strstart-=g,e.block_start-=g,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=g?r-g:0}while(--n);t=n=g;do{r=e.prev[--t],e.prev[t]=r>=g?r-g:0}while(--n);a+=g}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,h=void 0,(h=c.avail_in)>f&&(h=f),n=0===h?0:(c.avail_in-=h,i.arraySet(u,c.input,c.next_in,h,d),1===c.state.wrap?c.adler=o(c.adler,u,h,d):2===c.state.wrap&&(c.adler=s(c.adler,u,h,d)),c.next_in+=h,c.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function y(e,t){for(var n,r;;){if(e.lookahead<262){if(v(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=m(e,n)),e.match_length>=3)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(h(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(h(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}function I(e,t){for(var n,r,i;;){if(e.lookahead<262){if(v(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=m(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(h(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=a._tr_tally(e,0,e.window[e.strstart-1]))&&h(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=a._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(h(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function b(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),d(this.dyn_ltree),d(this.dyn_dtree),d(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),d(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),d(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function A(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,a._tr_init(t),0):c(e,-2)}function w(e){var t=A(e);return 0===t&&function(e){e.window_size=2*e.w_size,d(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function _(e,t,n,r,a,o){if(!e)return-2;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),a<1||a>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return c(e,-2);8===r&&(r=9);var l=new b;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=a+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<a+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=o,l.method=n,w(e)}r=[new C(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(v(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,h(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(h(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(h(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(h(e,!1),e.strm.avail_out),1)})),new C(4,4,8,4,y),new C(4,5,16,8,y),new C(4,6,32,32,y),new C(4,4,16,16,I),new C(8,16,32,32,I),new C(8,16,128,128,I),new C(8,32,128,256,I),new C(32,128,258,1024,I),new C(32,258,258,4096,I)],n.deflateInit=function(e,t){return _(e,t,8,15,8,0)},n.deflateInit2=_,n.deflateReset=w,n.deflateResetKeep=A,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},n.deflate=function(e,t){var n,i,o,l;if(!e||!e.state||t>5||t<0)return e?c(e,-2):-2;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return c(e,0===e.avail_out?-5:-2);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,g(i,31),g(i,139),g(i,8),i.gzhead?(g(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),g(i,255&i.gzhead.time),g(i,i.gzhead.time>>8&255),g(i,i.gzhead.time>>16&255),g(i,i.gzhead.time>>24&255),g(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),g(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(g(i,255&i.gzhead.extra.length),g(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(g(i,0),g(i,0),g(i,0),g(i,0),g(i,0),g(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),g(i,3),i.status=113);else{var m=8+(i.w_bits-8<<4)<<8;m|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(m|=32),m+=31-m%31,i.status=113,p(i,m),0!==i.strstart&&(p(i,e.adler>>>16),p(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),f(e),o=i.pending,i.pending!==i.pending_buf_size));)g(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),f(e),o=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,g(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),f(e),o=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,g(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&f(e),i.pending+2<=i.pending_buf_size&&(g(i,255&e.adler),g(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(f(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&u(t)<=u(n)&&4!==t)return c(e,-5);if(666===i.status&&0!==e.avail_in)return c(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var y=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(v(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(h(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(h(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=258){if(v(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){o=e.strstart+258;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=258-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=a._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(h(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(h(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==y&&4!==y||(i.status=666),1===y||3===y)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===y&&(1===t?a._tr_align(i):5!==t&&(a._tr_stored_block(i,0,0,!1),3===t&&(d(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),f(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(g(i,255&e.adler),g(i,e.adler>>8&255),g(i,e.adler>>16&255),g(i,e.adler>>24&255),g(i,255&e.total_in),g(i,e.total_in>>8&255),g(i,e.total_in>>16&255),g(i,e.total_in>>24&255)):(p(i,e.adler>>>16),p(i,65535&e.adler)),f(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},n.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?c(e,-2):(e.state=null,113===t?c(e,-3):0):-2},n.deflateSetDictionary=function(e,t){var n,r,a,s,l,c,u,f,h=t.length;if(!e||!e.state)return-2;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return-2;for(1===s&&(e.adler=o(e.adler,t,h,0)),n.wrap=0,h>=n.w_size&&(0===s&&(d(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new i.Buf8(n.w_size),i.arraySet(f,t,h-n.w_size,n.w_size,0),t=f,h=n.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=h,e.next_in=0,e.input=t,v(n);n.lookahead>=3;){r=n.strstart,a=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--a);n.strstart=r,n.lookahead=2,v(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=c,e.input=u,e.avail_in=l,n.wrap=s,0},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[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"}},{}],7:[function(e,t,n){var r=e("../utils/common");function i(e){for(var t=e.length;--t>=0;)e[t]=0}var a=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var u=new Array(60);i(u);var d=new Array(512);i(d);var f=new Array(256);i(f);var h=new Array(29);i(h);var g,p,m,v=new Array(30);function y(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function I(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function C(e){return e<256?d[e]:d[256+(e>>>7)]}function b(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function A(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,b(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function w(e,t,n){A(e,n[2*t],n[2*t+1])}function _(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function S(e,t,n){var r,i,a=new Array(16),o=0;for(r=1;r<=15;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=_(a[s]++,s))}}function k(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function x(e){e.bi_valid>8?b(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function E(e,t,n,r){var i=2*t,a=2*n;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function N(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&E(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!E(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function T(e,t,n){var r,i,s,l,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],i=e.pending_buf[e.l_buf+c],c++,0===r?w(e,i,t):(w(e,(s=f[i])+256+1,t),0!==(l=a[s])&&A(e,i-=h[s],l),w(e,s=C(--r),n),0!==(l=o[s])&&A(e,r-=v[s],l))}while(c<e.last_lit);w(e,256,t)}function B(e,t){var n,r,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<l;n++)0!==a[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):a[2*n+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;n>=1;n--)N(e,a,n);i=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,N(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,p=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(a=l[2*l[2*(r=e.heap[n])+1]+1]+1)>g&&(a=g,p++),l[2*r+1]=a,r>c||(e.bl_count[a]++,o=0,r>=h&&(o=f[r-h]),s=l[2*r],e.opt_len+=s*(a+o),d&&(e.static_len+=s*(u[2*r+1]+o)));if(0!==p){do{for(a=g-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[g]--,p-=2}while(p>0);for(a=g;0!==a;a--)for(r=e.bl_count[a];0!==r;)(i=e.heap[--n])>c||(l[2*i+1]!==a&&(e.opt_len+=(a-l[2*i+1])*l[2*i],l[2*i+1]=a),r--)}}(e,t),S(a,c,e.bl_count)}function M(e,t,n){var r,i,a=-1,o=t[1],s=0,l=7,c=4;for(0===o&&(l=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++s<l&&i===o||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=i,0===o?(l=138,c=3):i===o?(l=6,c=3):(l=7,c=4))}function R(e,t,n){var r,i,a=-1,o=t[1],s=0,l=7,c=4;for(0===o&&(l=138,c=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++s<l&&i===o)){if(s<c)do{w(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==a&&(w(e,i,e.bl_tree),s--),w(e,16,e.bl_tree),A(e,s-3,2)):s<=10?(w(e,17,e.bl_tree),A(e,s-3,3)):(w(e,18,e.bl_tree),A(e,s-11,7));s=0,a=i,0===o?(l=138,c=3):i===o?(l=6,c=3):(l=7,c=4)}}i(v);var D=!1;function F(e,t,n,i){A(e,0+(i?1:0),3),function(e,t,n,i){x(e),i&&(b(e,n),b(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}n._tr_init=function(e){D||(function(){var e,t,n,r,i,l=new Array(16);for(n=0,r=0;r<28;r++)for(h[r]=n,e=0;e<1<<a[r];e++)f[n++]=r;for(f[n-1]=r,i=0,r=0;r<16;r++)for(v[r]=i,e=0;e<1<<o[r];e++)d[i++]=r;for(i>>=7;r<30;r++)for(v[r]=i<<7,e=0;e<1<<o[r]-7;e++)d[256+i++]=r;for(t=0;t<=15;t++)l[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,l[8]++;for(;e<=255;)c[2*e+1]=9,e++,l[9]++;for(;e<=279;)c[2*e+1]=7,e++,l[7]++;for(;e<=287;)c[2*e+1]=8,e++,l[8]++;for(S(c,287,l),e=0;e<30;e++)u[2*e+1]=5,u[2*e]=_(e,5);g=new y(c,a,257,286,15),p=new y(u,o,0,30,15),m=new y(new Array(0),s,0,19,7)}(),D=!0),e.l_desc=new I(e.dyn_ltree,g),e.d_desc=new I(e.dyn_dtree,p),e.bl_desc=new I(e.bl_tree,m),e.bi_buf=0,e.bi_valid=0,k(e)},n._tr_stored_block=F,n._tr_flush_block=function(e,t,n,r){var i,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),B(e,e.l_desc),B(e,e.d_desc),o=function(e){var t;for(M(e,e.dyn_ltree,e.l_desc.max_code),M(e,e.dyn_dtree,e.d_desc.max_code),B(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?F(e,t,n,r):4===e.strategy||a===i?(A(e,2+(r?1:0),3),T(e,c,u)):(A(e,4+(r?1:0),3),function(e,t,n,r){var i;for(A(e,t-257,5),A(e,n-1,5),A(e,r-4,4),i=0;i<r;i++)A(e,e.bl_tree[2*l[i]+1],3);R(e,e.dyn_ltree,t-1),R(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),T(e,e.dyn_ltree,e.dyn_dtree)),k(e),r&&x(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(f[n]+256+1)]++,e.dyn_dtree[2*C(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){A(e,2,3),w(e,256,c),function(e){16===e.bi_valid?(b(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":1}],8:[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/deflate.js":[function(e,t,n){var r=e("./zlib/deflate"),i=e("./utils/common"),a=e("./utils/strings"),o=e("./zlib/messages"),s=e("./zlib/zstream"),l=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(o[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var u;if(u="string"==typeof t.dictionary?a.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,u)))throw new Error(o[n]);this._dict_set=!0}}function u(e,t){var n=new c(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}c.prototype.push=function(e,t){var n,o,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=a.string2buf(e):"[object ArrayBuffer]"===l.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(c),s.next_out=0,s.avail_out=c),1!==(n=r.deflate(s,o))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(a.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===o?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==o||(this.onEnd(0),s.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=c,n.deflate=u,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,u(e,t)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")})).deflate,Mt=it((function(e,t){e.exports=function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){if(!s&&rt)return rt();if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,n,r)}return n[o].exports}for(var a=rt,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(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 r in n)i(n,r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r,i,a,o;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},o={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,a)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(r)},{}],2:[function(e,t,n){var r=e("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var o=new r.Buf8(256),s=0;s<256;s++)o[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&&a||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",o=0;o<t;o++)n+=String.fromCharCode(e[o]);return n}o[254]=o[254]=1,n.string2buf=function(e){var t,n,i,a,o,s=e.length,l=0;for(a=0;a<s;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<s&&56320==(64512&(i=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(l),o=0,a=0;o<l;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<s&&56320==(64512&(i=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,i,a,s=t||e.length,c=new Array(2*s);for(r=0,n=0;n<s;)if((i=e[n++])<128)c[r++]=i;else if((a=o[i])>4)c[r++]=65533,n+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&n<s;)i=i<<6|63&e[n++],a--;a>1?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return l(c,r)},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+o[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{a=a+(i=i+t[r++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<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 r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[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,r,i,a,o,s,l,c,u,d,f,h,g,p,m,v,y,I,C,b,A,w,_,S,k;n=e.state,r=e.next_in,S=e.input,i=r+(e.avail_in-5),a=e.next_out,k=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,f=n.window,h=n.hold,g=n.bits,p=n.lencode,m=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{g<15&&(h+=S[r++]<<g,g+=8,h+=S[r++]<<g,g+=8),I=p[h&v];t:for(;;){if(h>>>=C=I>>>24,g-=C,0==(C=I>>>16&255))k[a++]=65535&I;else{if(!(16&C)){if(0==(64&C)){I=p[(65535&I)+(h&(1<<C)-1)];continue t}if(32&C){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=65535&I,(C&=15)&&(g<C&&(h+=S[r++]<<g,g+=8),b+=h&(1<<C)-1,h>>>=C,g-=C),g<15&&(h+=S[r++]<<g,g+=8,h+=S[r++]<<g,g+=8),I=m[h&y];n:for(;;){if(h>>>=C=I>>>24,g-=C,!(16&(C=I>>>16&255))){if(0==(64&C)){I=m[(65535&I)+(h&(1<<C)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(A=65535&I,g<(C&=15)&&(h+=S[r++]<<g,(g+=8)<C&&(h+=S[r++]<<g,g+=8)),(A+=h&(1<<C)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=C,g-=C,A>(C=a-o)){if((C=A-C)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(w=0,_=f,0===d){if(w+=c-C,C<b){b-=C;do{k[a++]=f[w++]}while(--C);w=a-A,_=k}}else if(d<C){if(w+=c+d-C,(C-=d)<b){b-=C;do{k[a++]=f[w++]}while(--C);if(w=0,d<b){b-=C=d;do{k[a++]=f[w++]}while(--C);w=a-A,_=k}}}else if(w+=d-C,C<b){b-=C;do{k[a++]=f[w++]}while(--C);w=a-A,_=k}for(;b>2;)k[a++]=_[w++],k[a++]=_[w++],k[a++]=_[w++],b-=3;b&&(k[a++]=_[w++],b>1&&(k[a++]=_[w++]))}else{w=a-A;do{k[a++]=k[w++],k[a++]=k[w++],k[a++]=k[w++],b-=3}while(b>2);b&&(k[a++]=k[w++],b>1&&(k[a++]=k[w++]))}break}}break}}while(r<i&&a<s);r-=b=g>>3,h&=(1<<(g-=b<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=a<s?s-a+257:257-(a-s),n.hold=h,n.bits=g}},{}],8:[function(e,t,n){var r=e("../utils/common"),i=e("./adler32"),a=e("./crc32"),o=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 r.Buf16(320),this.work=new r.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 r.Buf32(852),t.distcode=t.distdyn=new r.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,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,d(e))):-2}function h(e,t){var n,r;return e?(r=new c,e.state=r,r.window=null,0!==(n=f(e,t))&&(e.state=null),n):-2}var g,p,m=!0;function v(e){if(m){var t;for(g=new r.Buf32(512),p=new r.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,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,p,0,e.work,{bits:5}),m=!1}e.lencode=g,e.lenbits=9,e.distcode=p,e.distbits=5}function y(e,t,n,i){var a,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),i>=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),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,g,p,m,I,C,b,A,w,_,S,k,x,E,N,T,B,M,R,D=0,F=new r.Buf8(4),z=[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,g=e.avail_out,d=e.next_in,c=e.input,h=e.avail_in,p=n.hold,m=n.bits,I=h,C=g,B=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;m<16;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}if(2&n.wrap&&35615===p){n.check=0,F[0]=255&p,F[1]=p>>>8&255,n.check=a(n.check,F,2,0),p=0,m=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&p)<<8)+(p>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&p)){e.msg="unknown compression method",n.mode=30;break}if(m-=4,T=8+(15&(p>>>=4)),0===n.wbits)n.wbits=T;else if(T>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<T,e.adler=n.check=1,n.mode=512&p?10:12,p=0,m=0;break;case 2:for(;m<16;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}if(n.flags=p,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=p>>8&1),512&n.flags&&(F[0]=255&p,F[1]=p>>>8&255,n.check=a(n.check,F,2,0)),p=0,m=0,n.mode=3;case 3:for(;m<32;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}n.head&&(n.head.time=p),512&n.flags&&(F[0]=255&p,F[1]=p>>>8&255,F[2]=p>>>16&255,F[3]=p>>>24&255,n.check=a(n.check,F,4,0)),p=0,m=0,n.mode=4;case 4:for(;m<16;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}n.head&&(n.head.xflags=255&p,n.head.os=p>>8),512&n.flags&&(F[0]=255&p,F[1]=p>>>8&255,n.check=a(n.check,F,2,0)),p=0,m=0,n.mode=5;case 5:if(1024&n.flags){for(;m<16;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}n.length=p,n.head&&(n.head.extra_len=p),512&n.flags&&(F[0]=255&p,F[1]=p>>>8&255,n.check=a(n.check,F,2,0)),p=0,m=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((b=n.length)>h&&(b=h),b&&(n.head&&(T=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,c,d,b,T)),512&n.flags&&(n.check=a(n.check,c,b,d)),h-=b,d+=b,n.length-=b),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===h)break e;b=0;do{T=c[d+b++],n.head&&T&&n.length<65536&&(n.head.name+=String.fromCharCode(T))}while(T&&b<h);if(512&n.flags&&(n.check=a(n.check,c,b,d)),h-=b,d+=b,T)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;b=0;do{T=c[d+b++],n.head&&T&&n.length<65536&&(n.head.comment+=String.fromCharCode(T))}while(T&&b<h);if(512&n.flags&&(n.check=a(n.check,c,b,d)),h-=b,d+=b,T)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;m<16;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}if(p!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}p=0,m=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(;m<32;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}e.adler=n.check=l(p),p=0,m=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=f,e.avail_out=g,e.next_in=d,e.avail_in=h,n.hold=p,n.bits=m,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){p>>>=7&m,m-=7&m,n.mode=27;break}for(;m<3;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}switch(n.last=1&p,m-=1,3&(p>>>=1)){case 0:n.mode=14;break;case 1:if(v(n),n.mode=20,6===t){p>>>=2,m-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}p>>>=2,m-=2;break;case 14:for(p>>>=7&m,m-=7&m;m<32;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}if((65535&p)!=(p>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&p,p=0,m=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(b=n.length){if(b>h&&(b=h),b>g&&(b=g),0===b)break e;r.arraySet(u,c,d,b,f),h-=b,d+=b,g-=b,f+=b,n.length-=b;break}n.mode=12;break;case 17:for(;m<14;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}if(n.nlen=257+(31&p),p>>>=5,m-=5,n.ndist=1+(31&p),p>>>=5,m-=5,n.ncode=4+(15&p),p>>>=4,m-=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(;m<3;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}n.lens[z[n.have++]]=7&p,p>>>=3,m-=3}for(;n.have<19;)n.lens[z[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},B=s(0,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,B){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(;S=(D=n.lencode[p&(1<<n.lenbits)-1])>>>16&255,k=65535&D,!((_=D>>>24)<=m);){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}if(k<16)p>>>=_,m-=_,n.lens[n.have++]=k;else{if(16===k){for(R=_+2;m<R;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}if(p>>>=_,m-=_,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}T=n.lens[n.have-1],b=3+(3&p),p>>>=2,m-=2}else if(17===k){for(R=_+3;m<R;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}m-=_,T=0,b=3+(7&(p>>>=_)),p>>>=3,m-=3}else{for(R=_+7;m<R;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}m-=_,T=0,b=11+(127&(p>>>=_)),p>>>=7,m-=7}if(n.have+b>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;b--;)n.lens[n.have++]=T}}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,M={bits:n.lenbits},B=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,B){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},B=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,B){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&&g>=258){e.next_out=f,e.avail_out=g,e.next_in=d,e.avail_in=h,n.hold=p,n.bits=m,o(e,C),f=e.next_out,u=e.output,g=e.avail_out,d=e.next_in,c=e.input,h=e.avail_in,p=n.hold,m=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;S=(D=n.lencode[p&(1<<n.lenbits)-1])>>>16&255,k=65535&D,!((_=D>>>24)<=m);){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}if(S&&0==(240&S)){for(x=_,E=S,N=k;S=(D=n.lencode[N+((p&(1<<x+E)-1)>>x)])>>>16&255,k=65535&D,!(x+(_=D>>>24)<=m);){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}p>>>=x,m-=x,n.back+=x}if(p>>>=_,m-=_,n.back+=_,n.length=k,0===S){n.mode=26;break}if(32&S){n.back=-1,n.mode=12;break}if(64&S){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&S,n.mode=22;case 22:if(n.extra){for(R=n.extra;m<R;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}n.length+=p&(1<<n.extra)-1,p>>>=n.extra,m-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;S=(D=n.distcode[p&(1<<n.distbits)-1])>>>16&255,k=65535&D,!((_=D>>>24)<=m);){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}if(0==(240&S)){for(x=_,E=S,N=k;S=(D=n.distcode[N+((p&(1<<x+E)-1)>>x)])>>>16&255,k=65535&D,!(x+(_=D>>>24)<=m);){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}p>>>=x,m-=x,n.back+=x}if(p>>>=_,m-=_,n.back+=_,64&S){e.msg="invalid distance code",n.mode=30;break}n.offset=k,n.extra=15&S,n.mode=24;case 24:if(n.extra){for(R=n.extra;m<R;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}n.offset+=p&(1<<n.extra)-1,p>>>=n.extra,m-=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===g)break e;if(b=C-g,n.offset>b){if((b=n.offset-b)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}b>n.wnext?(b-=n.wnext,A=n.wsize-b):A=n.wnext-b,b>n.length&&(b=n.length),w=n.window}else w=u,A=f-n.offset,b=n.length;b>g&&(b=g),g-=b,n.length-=b;do{u[f++]=w[A++]}while(--b);0===n.length&&(n.mode=21);break;case 26:if(0===g)break e;u[f++]=n.length,g--,n.mode=21;break;case 27:if(n.wrap){for(;m<32;){if(0===h)break e;h--,p|=c[d++]<<m,m+=8}if(C-=g,e.total_out+=C,n.total+=C,C&&(e.adler=n.check=n.flags?a(n.check,u,C,f-C):i(n.check,u,C,f-C)),C=g,(n.flags?p:l(p))!==n.check){e.msg="incorrect data check",n.mode=30;break}p=0,m=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;m<32;){if(0===h)break e;h--,p+=c[d++]<<m,m+=8}if(p!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}p=0,m=0}n.mode=29;case 29:B=1;break e;case 30:B=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=f,e.avail_out=g,e.next_in=d,e.avail_in=h,n.hold=p,n.bits=m,(n.wsize||C!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&y(e,e.output,e.next_out,C-e.avail_out),I-=e.avail_in,C-=e.avail_out,e.total_in+=I,e.total_out+=C,n.total+=C,n.wrap&&C&&(e.adler=n.check=n.flags?a(n.check,u,C,e.next_out-C):i(n.check,u,C,e.next_out-C)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===I&&0===C||4===t)&&0===B&&(B=-5),B},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,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&i(1,t,r,0)!==n.check?-3:y(e,t,r,r)?(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 r=e("../utils/common"),i=[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],a=[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],o=[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,g,p,m,v,y,I,C,b,A=f.bits,w=0,_=0,S=0,k=0,x=0,E=0,N=0,T=0,B=0,M=0,R=null,D=0,F=new r.Buf16(16),z=new r.Buf16(16),O=null,Z=0;for(w=0;w<=15;w++)F[w]=0;for(_=0;_<l;_++)F[t[n+_]]++;for(x=A,k=15;k>=1&&0===F[k];k--);if(x>k&&(x=k),0===k)return c[u++]=20971520,c[u++]=20971520,f.bits=1,0;for(S=1;S<k&&0===F[S];S++);for(x<S&&(x=S),T=1,w=1;w<=15;w++)if(T<<=1,(T-=F[w])<0)return-1;if(T>0&&(0===e||1!==k))return-1;for(z[1]=0,w=1;w<15;w++)z[w+1]=z[w]+F[w];for(_=0;_<l;_++)0!==t[n+_]&&(d[z[t[n+_]]++]=_);if(0===e?(R=O=d,y=19):1===e?(R=i,D-=257,O=a,Z-=257,y=256):(R=o,O=s,y=-1),M=0,_=0,w=S,v=u,E=x,N=0,p=-1,m=(B=1<<x)-1,1===e&&B>852||2===e&&B>592)return 1;for(;;){I=w-N,d[_]<y?(C=0,b=d[_]):d[_]>y?(C=O[Z+d[_]],b=R[D+d[_]]):(C=96,b=0),h=1<<w-N,S=g=1<<E;do{c[v+(M>>N)+(g-=h)]=I<<24|C<<16|b|0}while(0!==g);for(h=1<<w-1;M&h;)h>>=1;if(0!==h?(M&=h-1,M+=h):M=0,_++,0==--F[w]){if(w===k)break;w=t[n+d[_]]}if(w>x&&(M&m)!==p){for(0===N&&(N=x),v+=S,T=1<<(E=w-N);E+N<k&&!((T-=F[E+N])<=0);)E++,T<<=1;if(B+=1<<E,1===e&&B>852||2===e&&B>592)return 1;c[p=M&m]=x<<24|E<<16|v-u|0}}return 0!==M&&(c[v+M]=w-N<<24|64<<16|0),f.bits=x,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 r=e("./zlib/inflate"),i=e("./utils/common"),a=e("./utils/strings"),o=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=i.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=r.inflateInit2(this.strm,t.windowBits);if(n!==o.Z_OK)throw new Error(s[n]);if(this.header=new c,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==o.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,g=this.options.dictionary,p=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?f.input=a.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 i.Buf8(h),f.next_out=0,f.avail_out=h),(n=r.inflate(f,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&g&&(n=r.inflateSetDictionary(this.strm,g)),n===o.Z_BUF_ERROR&&!0===p&&(n=o.Z_OK,p=!1),n!==o.Z_STREAM_END&&n!==o.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==o.Z_STREAM_END&&(0!==f.avail_in||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(l=a.utf8border(f.output,f.next_out),c=f.next_out-l,d=a.buf2string(f.output,l),f.next_out=c,f.avail_out=h-c,c&&i.arraySet(f.output,f.output,l,c,0),this.onData(d)):this.onData(i.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(p=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==o.Z_STREAM_END);return n===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.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,Rt=et.addCustomEvent,Dt=et.takeFullSnapshot;return e.Replayer=Tt,e.addCustomEvent=Rt,e.mirror=G,e.pack=function(e){var t=n(n({},e),{v:"v1"});return Bt(JSON.stringify(t),{to:"string"})},e.record=et,e.takeFullSnapshot=Dt,e.unpack=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(Mt(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.")}},e.utils=fe,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
//# sourceMappingURL=memento-core.min.js.map
