Socket
Socket
Sign inDemoInstall

rrweb

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrweb - npm Package Compare versions

Comparing version 0.7.30 to 0.7.31

dist/packer/rrweb-pack.js

2

dist/packer/rrweb-packer.min.js

@@ -1,2 +0,2 @@

var rrwebPacker=function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,a=1,i=arguments.length;a<i;a++)for(var n in e=arguments[a])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};var a,i=(function(t,e){var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var n in a)i(a,n)&&(t[n]=a[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,a,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(a,a+i),n);else for(var r=0;r<i;r++)t[n+r]=e[a+r]},flattenChunks:function(t){var e,a,i,n,r,s;for(i=0,e=0,a=t.length;e<a;e++)i+=t[e].length;for(s=new Uint8Array(i),n=0,e=0,a=t.length;e<a;e++)r=t[e],s.set(r,n),n+=r.length;return s}},r={arraySet:function(t,e,a,i,n){for(var r=0;r<i;r++)t[n+r]=e[a+r]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,r))},e.setTyped(a)}(a={exports:{}},a.exports),a.exports),n=(i.assign,i.shrinkBuf,i.setTyped,i.Buf8,i.Buf16,i.Buf32,4),r=0,s=1,o=2;function h(t){for(var e=t.length;--e>=0;)t[e]=0}var l=0,d=1,_=2,f=29,u=256,c=u+1+f,w=30,g=19,b=2*c+1,p=15,m=16,v=7,k=256,y=16,x=17,z=18,B=[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],S=[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],E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Z=new Array(2*(c+2));h(Z);var O=new Array(2*w);h(O);var N=new Array(512);h(N);var R=new Array(256);h(R);var C=new Array(f);h(C);var I,D,T,U=new Array(w);function F(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function L(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function H(t){return t<256?N[t]:N[256+(t>>>7)]}function j(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function K(t,e,a){t.bi_valid>m-a?(t.bi_buf|=e<<t.bi_valid&65535,j(t,t.bi_buf),t.bi_buf=e>>m-t.bi_valid,t.bi_valid+=a-m):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)}function M(t,e,a){K(t,a[2*e],a[2*e+1])}function P(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1}function Y(t,e,a){var i,n,r=new Array(p+1),s=0;for(i=1;i<=p;i++)r[i]=s=s+a[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=P(r[o]++,o))}}function J(t){var e;for(e=0;e<c;e++)t.dyn_ltree[2*e]=0;for(e=0;e<w;e++)t.dyn_dtree[2*e]=0;for(e=0;e<g;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*k]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function G(t){t.bi_valid>8?j(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function X(t,e,a,i){var n=2*e,r=2*a;return t[n]<t[r]||t[n]===t[r]&&i[e]<=i[a]}function W(t,e,a){for(var i=t.heap[a],n=a<<1;n<=t.heap_len&&(n<t.heap_len&&X(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!X(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i}function q(t,e,a){var i,n,r,s,o=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],n=t.pending_buf[t.l_buf+o],o++,0===i?M(t,n,e):(M(t,(r=R[n])+u+1,e),0!==(s=B[r])&&K(t,n-=C[r],s),M(t,r=H(--i),a),0!==(s=S[r])&&K(t,i-=U[r],s))}while(o<t.last_lit);M(t,k,e)}function Q(t,e){var a,i,n,r=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=b,a=0;a<h;a++)0!==r[2*a]?(t.heap[++t.heap_len]=l=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)r[2*(n=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=s[2*n+1]);for(e.max_code=l,a=t.heap_len>>1;a>=1;a--)W(t,r,a);n=h;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],W(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,W(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,i,n,r,s,o,h=e.dyn_tree,l=e.max_code,d=e.stat_desc.static_tree,_=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,w=0;for(r=0;r<=p;r++)t.bl_count[r]=0;for(h[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<b;a++)(r=h[2*h[2*(i=t.heap[a])+1]+1]+1)>c&&(r=c,w++),h[2*i+1]=r,i>l||(t.bl_count[r]++,s=0,i>=u&&(s=f[i-u]),o=h[2*i],t.opt_len+=o*(r+s),_&&(t.static_len+=o*(d[2*i+1]+s)));if(0!==w){do{for(r=c-1;0===t.bl_count[r];)r--;t.bl_count[r]--,t.bl_count[r+1]+=2,t.bl_count[c]--,w-=2}while(w>0);for(r=c;0!==r;r--)for(i=t.bl_count[r];0!==i;)(n=t.heap[--a])>l||(h[2*n+1]!==r&&(t.opt_len+=(r-h[2*n+1])*h[2*n],h[2*n+1]=r),i--)}}(t,e),Y(r,l,t.bl_count)}function V(t,e,a){var i,n,r=-1,s=e[1],o=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=s,s=e[2*(i+1)+1],++o<h&&n===s||(o<l?t.bl_tree[2*n]+=o:0!==n?(n!==r&&t.bl_tree[2*n]++,t.bl_tree[2*y]++):o<=10?t.bl_tree[2*x]++:t.bl_tree[2*z]++,o=0,r=n,0===s?(h=138,l=3):n===s?(h=6,l=3):(h=7,l=4))}function $(t,e,a){var i,n,r=-1,s=e[1],o=0,h=7,l=4;for(0===s&&(h=138,l=3),i=0;i<=a;i++)if(n=s,s=e[2*(i+1)+1],!(++o<h&&n===s)){if(o<l)do{M(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==r&&(M(t,n,t.bl_tree),o--),M(t,y,t.bl_tree),K(t,o-3,2)):o<=10?(M(t,x,t.bl_tree),K(t,o-3,3)):(M(t,z,t.bl_tree),K(t,o-11,7));o=0,r=n,0===s?(h=138,l=3):n===s?(h=6,l=3):(h=7,l=4)}}h(U);var tt=!1;function et(t,e,a,n){K(t,(l<<1)+(n?1:0),3),function(t,e,a,n){G(t),n&&(j(t,a),j(t,~a)),i.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}(t,e,a,!0)}var at={_tr_init:function(t){tt||(function(){var t,e,a,i,n,r=new Array(p+1);for(a=0,i=0;i<f-1;i++)for(C[i]=a,t=0;t<1<<B[i];t++)R[a++]=i;for(R[a-1]=i,n=0,i=0;i<16;i++)for(U[i]=n,t=0;t<1<<S[i];t++)N[n++]=i;for(n>>=7;i<w;i++)for(U[i]=n<<7,t=0;t<1<<S[i]-7;t++)N[256+n++]=i;for(e=0;e<=p;e++)r[e]=0;for(t=0;t<=143;)Z[2*t+1]=8,t++,r[8]++;for(;t<=255;)Z[2*t+1]=9,t++,r[9]++;for(;t<=279;)Z[2*t+1]=7,t++,r[7]++;for(;t<=287;)Z[2*t+1]=8,t++,r[8]++;for(Y(Z,c+1,r),t=0;t<w;t++)O[2*t+1]=5,O[2*t]=P(t,5);I=new F(Z,B,u+1,c,p),D=new F(O,S,0,w,p),T=new F(new Array(0),E,0,g,v)}(),tt=!0),t.l_desc=new L(t.dyn_ltree,I),t.d_desc=new L(t.dyn_dtree,D),t.bl_desc=new L(t.bl_tree,T),t.bi_buf=0,t.bi_valid=0,J(t)},_tr_stored_block:et,_tr_flush_block:function(t,e,a,i){var h,l,f=0;t.level>0?(t.strm.data_type===o&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return r;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return s;for(e=32;e<u;e++)if(0!==t.dyn_ltree[2*e])return s;return r}(t)),Q(t,t.l_desc),Q(t,t.d_desc),f=function(t){var e;for(V(t,t.dyn_ltree,t.l_desc.max_code),V(t,t.dyn_dtree,t.d_desc.max_code),Q(t,t.bl_desc),e=g-1;e>=3&&0===t.bl_tree[2*A[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),h=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=h&&(h=l)):h=l=a+5,a+4<=h&&-1!==e?et(t,e,a,i):t.strategy===n||l===h?(K(t,(d<<1)+(i?1:0),3),q(t,Z,O)):(K(t,(_<<1)+(i?1:0),3),function(t,e,a,i){var n;for(K(t,e-257,5),K(t,a-1,5),K(t,i-4,4),n=0;n<i;n++)K(t,t.bl_tree[2*A[n]+1],3);$(t,t.dyn_ltree,e-1),$(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,f+1),q(t,t.dyn_ltree,t.dyn_dtree)),J(t),i&&G(t)},_tr_tally:function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(R[a]+u+1)]++,t.dyn_dtree[2*H(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){K(t,d<<1,3),M(t,k,Z),function(t){16===t.bi_valid?(j(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}};var it=function(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{r=r+(n=n+e[i++]|0)|0}while(--s);n%=65521,r%=65521}return n|r<<16|0};var nt=function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}();var rt,st=function(t,e,a,i){var n=nt,r=i+a;t^=-1;for(var s=i;s<r;s++)t=t>>>8^n[255&(t^e[s])];return-1^t},ot={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"},ht=0,lt=1,dt=3,_t=4,ft=5,ut=0,ct=1,wt=-2,gt=-3,bt=-5,pt=-1,mt=1,vt=2,kt=3,yt=4,xt=0,zt=2,Bt=8,St=9,Et=15,At=8,Zt=286,Ot=30,Nt=19,Rt=2*Zt+1,Ct=15,It=3,Dt=258,Tt=Dt+It+1,Ut=32,Ft=42,Lt=69,Ht=73,jt=91,Kt=103,Mt=113,Pt=666,Yt=1,Jt=2,Gt=3,Xt=4,Wt=3;function qt(t,e){return t.msg=ot[e],e}function Qt(t){return(t<<1)-(t>4?9:0)}function Vt(t){for(var e=t.length;--e>=0;)t[e]=0}function $t(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(i.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function te(t,e){at._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,$t(t.strm)}function ee(t,e){t.pending_buf[t.pending++]=e}function ae(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function ie(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-Tt?t.strstart-(t.w_size-Tt):0,l=t.window,d=t.w_mask,_=t.prev,f=t.strstart+Dt,u=l[r+s-1],c=l[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===u&&l[a]===l[r]&&l[++a]===l[r+1]){r+=2,a++;do{}while(l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&r<f);if(i=Dt-(f-r),r=f-Dt,i>s){if(t.match_start=e,s=i,i>=o)break;u=l[r+s-1],c=l[r+s]}}}while((e=_[e&d])>h&&0!=--n);return s<=t.lookahead?s:t.lookahead}function ne(t){var e,a,n,r,s,o,h,l,d,_,f=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-Tt)){i.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=f?n-f:0}while(--a);e=a=f;do{n=t.prev[--e],t.prev[e]=n>=f?n-f:0}while(--a);r+=f}if(0===t.strm.avail_in)break;if(o=t.strm,h=t.window,l=t.strstart+t.lookahead,d=r,_=void 0,(_=o.avail_in)>d&&(_=d),a=0===_?0:(o.avail_in-=_,i.arraySet(h,o.input,o.next_in,_,l),1===o.state.wrap?o.adler=it(o.adler,h,_,l):2===o.state.wrap&&(o.adler=st(o.adler,h,_,l)),o.next_in+=_,o.total_in+=_,_),t.lookahead+=a,t.lookahead+t.insert>=It)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+It-1])&t.hash_mask,t.prev[s&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=s,s++,t.insert--,!(t.lookahead+t.insert<It)););}while(t.lookahead<Tt&&0!==t.strm.avail_in)}function re(t,e){for(var a,i;;){if(t.lookahead<Tt){if(ne(t),t.lookahead<Tt&&e===ht)return Yt;if(0===t.lookahead)break}if(a=0,t.lookahead>=It&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+It-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-Tt&&(t.match_length=ie(t,a)),t.match_length>=It)if(i=at._tr_tally(t,t.strstart-t.match_start,t.match_length-It),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=It){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+It-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=at._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(te(t,!1),0===t.strm.avail_out))return Yt}return t.insert=t.strstart<It-1?t.strstart:It-1,e===_t?(te(t,!0),0===t.strm.avail_out?Gt:Xt):t.last_lit&&(te(t,!1),0===t.strm.avail_out)?Yt:Jt}function se(t,e){for(var a,i,n;;){if(t.lookahead<Tt){if(ne(t),t.lookahead<Tt&&e===ht)return Yt;if(0===t.lookahead)break}if(a=0,t.lookahead>=It&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+It-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=It-1,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-Tt&&(t.match_length=ie(t,a),t.match_length<=5&&(t.strategy===mt||t.match_length===It&&t.strstart-t.match_start>4096)&&(t.match_length=It-1)),t.prev_length>=It&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-It,i=at._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-It),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+It-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=It-1,t.strstart++,i&&(te(t,!1),0===t.strm.avail_out))return Yt}else if(t.match_available){if((i=at._tr_tally(t,0,t.window[t.strstart-1]))&&te(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return Yt}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=at._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<It-1?t.strstart:It-1,e===_t?(te(t,!0),0===t.strm.avail_out?Gt:Xt):t.last_lit&&(te(t,!1),0===t.strm.avail_out)?Yt:Jt}function oe(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}function he(){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=Bt,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(2*Rt),this.dyn_dtree=new i.Buf16(2*(2*Ot+1)),this.bl_tree=new i.Buf16(2*(2*Nt+1)),Vt(this.dyn_ltree),Vt(this.dyn_dtree),Vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(Ct+1),this.heap=new i.Buf16(2*Zt+1),Vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*Zt+1),Vt(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 le(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=zt,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?Ft:Mt,t.adler=2===e.wrap?0:1,e.last_flush=ht,at._tr_init(e),ut):qt(t,wt)}function de(t){var e,a=le(t);return a===ut&&((e=t.state).window_size=2*e.w_size,Vt(e.head),e.max_lazy_match=rt[e.level].max_lazy,e.good_match=rt[e.level].good_length,e.nice_match=rt[e.level].nice_length,e.max_chain_length=rt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=It-1,e.match_available=0,e.ins_h=0),a}function _e(t,e,a,n,r,s){if(!t)return wt;var o=1;if(e===pt&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>St||a!==Bt||n<8||n>15||e<0||e>9||s<0||s>yt)return qt(t,wt);8===n&&(n=9);var h=new he;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+It-1)/It),h.window=new i.Buf8(2*h.w_size),h.head=new i.Buf16(h.hash_size),h.prev=new i.Buf16(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new i.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=s,h.method=a,de(t)}rt=[new oe(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ne(t),0===t.lookahead&&e===ht)return Yt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,te(t,!1),0===t.strm.avail_out))return Yt;if(t.strstart-t.block_start>=t.w_size-Tt&&(te(t,!1),0===t.strm.avail_out))return Yt}return t.insert=0,e===_t?(te(t,!0),0===t.strm.avail_out?Gt:Xt):(t.strstart>t.block_start&&(te(t,!1),t.strm.avail_out),Yt)}),new oe(4,4,8,4,re),new oe(4,5,16,8,re),new oe(4,6,32,32,re),new oe(4,4,16,16,se),new oe(8,16,32,32,se),new oe(8,16,128,128,se),new oe(8,32,128,256,se),new oe(32,128,258,1024,se),new oe(32,258,258,4096,se)];var fe={deflateInit:function(t,e){return _e(t,e,Bt,Et,At,xt)},deflateInit2:_e,deflateReset:de,deflateResetKeep:le,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?wt:(t.state.gzhead=e,ut):wt},deflate:function(t,e){var a,i,n,r;if(!t||!t.state||e>ft||e<0)return t?qt(t,wt):wt;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===Pt&&e!==_t)return qt(t,0===t.avail_out?bt:wt);if(i.strm=t,a=i.last_flush,i.last_flush=e,i.status===Ft)if(2===i.wrap)t.adler=0,ee(i,31),ee(i,139),ee(i,8),i.gzhead?(ee(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)),ee(i,255&i.gzhead.time),ee(i,i.gzhead.time>>8&255),ee(i,i.gzhead.time>>16&255),ee(i,i.gzhead.time>>24&255),ee(i,9===i.level?2:i.strategy>=vt||i.level<2?4:0),ee(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(ee(i,255&i.gzhead.extra.length),ee(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=st(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Lt):(ee(i,0),ee(i,0),ee(i,0),ee(i,0),ee(i,0),ee(i,9===i.level?2:i.strategy>=vt||i.level<2?4:0),ee(i,Wt),i.status=Mt);else{var s=Bt+(i.w_bits-8<<4)<<8;s|=(i.strategy>=vt||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(s|=Ut),s+=31-s%31,i.status=Mt,ae(i,s),0!==i.strstart&&(ae(i,t.adler>>>16),ae(i,65535&t.adler)),t.adler=1}if(i.status===Lt)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=st(t.adler,i.pending_buf,i.pending-n,n)),$t(t),n=i.pending,i.pending!==i.pending_buf_size));)ee(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=st(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Ht)}else i.status=Ht;if(i.status===Ht)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=st(t.adler,i.pending_buf,i.pending-n,n)),$t(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,ee(i,r)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(t.adler=st(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=jt)}else i.status=jt;if(i.status===jt)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=st(t.adler,i.pending_buf,i.pending-n,n)),$t(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,ee(i,r)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(t.adler=st(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=Kt)}else i.status=Kt;if(i.status===Kt&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&$t(t),i.pending+2<=i.pending_buf_size&&(ee(i,255&t.adler),ee(i,t.adler>>8&255),t.adler=0,i.status=Mt)):i.status=Mt),0!==i.pending){if($t(t),0===t.avail_out)return i.last_flush=-1,ut}else if(0===t.avail_in&&Qt(e)<=Qt(a)&&e!==_t)return qt(t,bt);if(i.status===Pt&&0!==t.avail_in)return qt(t,bt);if(0!==t.avail_in||0!==i.lookahead||e!==ht&&i.status!==Pt){var o=i.strategy===vt?function(t,e){for(var a;;){if(0===t.lookahead&&(ne(t),0===t.lookahead)){if(e===ht)return Yt;break}if(t.match_length=0,a=at._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(te(t,!1),0===t.strm.avail_out))return Yt}return t.insert=0,e===_t?(te(t,!0),0===t.strm.avail_out?Gt:Xt):t.last_lit&&(te(t,!1),0===t.strm.avail_out)?Yt:Jt}(i,e):i.strategy===kt?function(t,e){for(var a,i,n,r,s=t.window;;){if(t.lookahead<=Dt){if(ne(t),t.lookahead<=Dt&&e===ht)return Yt;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=It&&t.strstart>0&&(i=s[n=t.strstart-1])===s[++n]&&i===s[++n]&&i===s[++n]){r=t.strstart+Dt;do{}while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&n<r);t.match_length=Dt-(r-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=It?(a=at._tr_tally(t,1,t.match_length-It),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=at._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(te(t,!1),0===t.strm.avail_out))return Yt}return t.insert=0,e===_t?(te(t,!0),0===t.strm.avail_out?Gt:Xt):t.last_lit&&(te(t,!1),0===t.strm.avail_out)?Yt:Jt}(i,e):rt[i.level].func(i,e);if(o!==Gt&&o!==Xt||(i.status=Pt),o===Yt||o===Gt)return 0===t.avail_out&&(i.last_flush=-1),ut;if(o===Jt&&(e===lt?at._tr_align(i):e!==ft&&(at._tr_stored_block(i,0,0,!1),e===dt&&(Vt(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),$t(t),0===t.avail_out))return i.last_flush=-1,ut}return e!==_t?ut:i.wrap<=0?ct:(2===i.wrap?(ee(i,255&t.adler),ee(i,t.adler>>8&255),ee(i,t.adler>>16&255),ee(i,t.adler>>24&255),ee(i,255&t.total_in),ee(i,t.total_in>>8&255),ee(i,t.total_in>>16&255),ee(i,t.total_in>>24&255)):(ae(i,t.adler>>>16),ae(i,65535&t.adler)),$t(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?ut:ct)},deflateEnd:function(t){var e;return t&&t.state?(e=t.state.status)!==Ft&&e!==Lt&&e!==Ht&&e!==jt&&e!==Kt&&e!==Mt&&e!==Pt?qt(t,wt):(t.state=null,e===Mt?qt(t,gt):ut):wt},deflateSetDictionary:function(t,e){var a,n,r,s,o,h,l,d,_=e.length;if(!t||!t.state)return wt;if(2===(s=(a=t.state).wrap)||1===s&&a.status!==Ft||a.lookahead)return wt;for(1===s&&(t.adler=it(t.adler,e,_,0)),a.wrap=0,_>=a.w_size&&(0===s&&(Vt(a.head),a.strstart=0,a.block_start=0,a.insert=0),d=new i.Buf8(a.w_size),i.arraySet(d,e,_-a.w_size,a.w_size,0),e=d,_=a.w_size),o=t.avail_in,h=t.next_in,l=t.input,t.avail_in=_,t.next_in=0,t.input=e,ne(a);a.lookahead>=It;){n=a.strstart,r=a.lookahead-(It-1);do{a.ins_h=(a.ins_h<<a.hash_shift^a.window[n+It-1])&a.hash_mask,a.prev[n&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=n,n++}while(--r);a.strstart=n,a.lookahead=It-1,ne(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=It-1,a.match_available=0,t.next_in=h,t.input=l,t.avail_in=o,a.wrap=s,ut},deflateInfo:"pako deflate (from Nodeca project)"},ue=!0,ce=!0;try{String.fromCharCode.apply(null,[0])}catch(t){ue=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){ce=!1}for(var we=new i.Buf8(256),ge=0;ge<256;ge++)we[ge]=ge>=252?6:ge>=248?5:ge>=240?4:ge>=224?3:ge>=192?2:1;we[254]=we[254]=1;function be(t,e){if(e<65534&&(t.subarray&&ce||!t.subarray&&ue))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var a="",n=0;n<e;n++)a+=String.fromCharCode(t[n]);return a}var pe={string2buf:function(t){var e,a,n,r,s,o=t.length,h=0;for(r=0;r<o;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<o&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new i.Buf8(h),s=0,r=0;s<h;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<o&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},buf2binstring:function(t){return be(t,t.length)},binstring2buf:function(t){for(var e=new i.Buf8(t.length),a=0,n=e.length;a<n;a++)e[a]=t.charCodeAt(a);return e},buf2string:function(t,e){var a,i,n,r,s=e||t.length,o=new Array(2*s);for(i=0,a=0;a<s;)if((n=t[a++])<128)o[i++]=n;else if((r=we[n])>4)o[i++]=65533,a+=r-1;else{for(n&=2===r?31:3===r?15:7;r>1&&a<s;)n=n<<6|63&t[a++],r--;r>1?o[i++]=65533:n<65536?o[i++]=n:(n-=65536,o[i++]=55296|n>>10&1023,o[i++]=56320|1023&n)}return be(o,i)},utf8border:function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+we[t[a]]>e?a:e}};var me=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},ve=Object.prototype.toString,ke=0,ye=-1,xe=0,ze=8;function Be(t){if(!(this instanceof Be))return new Be(t);this.options=i.assign({level:ye,method:ze,chunkSize:16384,windowBits:15,memLevel:8,strategy:xe,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new me,this.strm.avail_out=0;var a=fe.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==ke)throw new Error(ot[a]);if(e.header&&fe.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?pe.string2buf(e.dictionary):"[object ArrayBuffer]"===ve.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=fe.deflateSetDictionary(this.strm,n))!==ke)throw new Error(ot[a]);this._dict_set=!0}}function Se(t,e){var a=new Be(e);if(a.push(t,!0),a.err)throw a.msg||ot[a.err];return a.result}Be.prototype.push=function(t,e){var a,n,r=this.strm,s=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:!0===e?4:0,"string"==typeof t?r.input=pe.string2buf(t):"[object ArrayBuffer]"===ve.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new i.Buf8(s),r.next_out=0,r.avail_out=s),1!==(a=fe.deflate(r,n))&&a!==ke)return this.onEnd(a),this.ended=!0,!1;0!==r.avail_out&&(0!==r.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(pe.buf2binstring(i.shrinkBuf(r.output,r.next_out))):this.onData(i.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||0===r.avail_out)&&1!==a);return 4===n?(a=fe.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ke):2!==n||(this.onEnd(ke),r.avail_out=0,!0)},Be.prototype.onData=function(t){this.chunks.push(t)},Be.prototype.onEnd=function(t){t===ke&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Ee={Deflate:Be,deflate:Se,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Se(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Se(t,e)}},Ae=function(t,e){var a,i,n,r,s,o,h,l,d,_,f,u,c,w,g,b,p,m,v,k,y,x,z,B,S;a=t.state,i=t.next_in,B=t.input,n=i+(t.avail_in-5),r=t.next_out,S=t.output,s=r-(e-t.avail_out),o=r+(t.avail_out-257),h=a.dmax,l=a.wsize,d=a.whave,_=a.wnext,f=a.window,u=a.hold,c=a.bits,w=a.lencode,g=a.distcode,b=(1<<a.lenbits)-1,p=(1<<a.distbits)-1;t:do{c<15&&(u+=B[i++]<<c,c+=8,u+=B[i++]<<c,c+=8),m=w[u&b];e:for(;;){if(u>>>=v=m>>>24,c-=v,0===(v=m>>>16&255))S[r++]=65535&m;else{if(!(16&v)){if(0==(64&v)){m=w[(65535&m)+(u&(1<<v)-1)];continue e}if(32&v){a.mode=12;break t}t.msg="invalid literal/length code",a.mode=30;break t}k=65535&m,(v&=15)&&(c<v&&(u+=B[i++]<<c,c+=8),k+=u&(1<<v)-1,u>>>=v,c-=v),c<15&&(u+=B[i++]<<c,c+=8,u+=B[i++]<<c,c+=8),m=g[u&p];a:for(;;){if(u>>>=v=m>>>24,c-=v,!(16&(v=m>>>16&255))){if(0==(64&v)){m=g[(65535&m)+(u&(1<<v)-1)];continue a}t.msg="invalid distance code",a.mode=30;break t}if(y=65535&m,c<(v&=15)&&(u+=B[i++]<<c,(c+=8)<v&&(u+=B[i++]<<c,c+=8)),(y+=u&(1<<v)-1)>h){t.msg="invalid distance too far back",a.mode=30;break t}if(u>>>=v,c-=v,y>(v=r-s)){if((v=y-v)>d&&a.sane){t.msg="invalid distance too far back",a.mode=30;break t}if(x=0,z=f,0===_){if(x+=l-v,v<k){k-=v;do{S[r++]=f[x++]}while(--v);x=r-y,z=S}}else if(_<v){if(x+=l+_-v,(v-=_)<k){k-=v;do{S[r++]=f[x++]}while(--v);if(x=0,_<k){k-=v=_;do{S[r++]=f[x++]}while(--v);x=r-y,z=S}}}else if(x+=_-v,v<k){k-=v;do{S[r++]=f[x++]}while(--v);x=r-y,z=S}for(;k>2;)S[r++]=z[x++],S[r++]=z[x++],S[r++]=z[x++],k-=3;k&&(S[r++]=z[x++],k>1&&(S[r++]=z[x++]))}else{x=r-y;do{S[r++]=S[x++],S[r++]=S[x++],S[r++]=S[x++],k-=3}while(k>2);k&&(S[r++]=S[x++],k>1&&(S[r++]=S[x++]))}break}}break}}while(i<n&&r<o);i-=k=c>>3,u&=(1<<(c-=k<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=r<o?o-r+257:257-(r-o),a.hold=u,a.bits=c},Ze=[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],Oe=[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],Ne=[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],Re=[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],Ce=function(t,e,a,n,r,s,o,h){var l,d,_,f,u,c,w,g,b,p=h.bits,m=0,v=0,k=0,y=0,x=0,z=0,B=0,S=0,E=0,A=0,Z=null,O=0,N=new i.Buf16(16),R=new i.Buf16(16),C=null,I=0;for(m=0;m<=15;m++)N[m]=0;for(v=0;v<n;v++)N[e[a+v]]++;for(x=p,y=15;y>=1&&0===N[y];y--);if(x>y&&(x=y),0===y)return r[s++]=20971520,r[s++]=20971520,h.bits=1,0;for(k=1;k<y&&0===N[k];k++);for(x<k&&(x=k),S=1,m=1;m<=15;m++)if(S<<=1,(S-=N[m])<0)return-1;if(S>0&&(0===t||1!==y))return-1;for(R[1]=0,m=1;m<15;m++)R[m+1]=R[m]+N[m];for(v=0;v<n;v++)0!==e[a+v]&&(o[R[e[a+v]]++]=v);if(0===t?(Z=C=o,c=19):1===t?(Z=Ze,O-=257,C=Oe,I-=257,c=256):(Z=Ne,C=Re,c=-1),A=0,v=0,m=k,u=s,z=x,B=0,_=-1,f=(E=1<<x)-1,1===t&&E>852||2===t&&E>592)return 1;for(;;){w=m-B,o[v]<c?(g=0,b=o[v]):o[v]>c?(g=C[I+o[v]],b=Z[O+o[v]]):(g=96,b=0),l=1<<m-B,k=d=1<<z;do{r[u+(A>>B)+(d-=l)]=w<<24|g<<16|b|0}while(0!==d);for(l=1<<m-1;A&l;)l>>=1;if(0!==l?(A&=l-1,A+=l):A=0,v++,0==--N[m]){if(m===y)break;m=e[a+o[v]]}if(m>x&&(A&f)!==_){for(0===B&&(B=x),u+=k,S=1<<(z=m-B);z+B<y&&!((S-=N[z+B])<=0);)z++,S<<=1;if(E+=1<<z,1===t&&E>852||2===t&&E>592)return 1;r[_=A&f]=x<<24|z<<16|u-s|0}}return 0!==A&&(r[u+A]=m-B<<24|64<<16|0),h.bits=x,0},Ie=0,De=1,Te=2,Ue=4,Fe=5,Le=6,He=0,je=1,Ke=2,Me=-2,Pe=-3,Ye=-4,Je=-5,Ge=8,Xe=1,We=2,qe=3,Qe=4,Ve=5,$e=6,ta=7,ea=8,aa=9,ia=10,na=11,ra=12,sa=13,oa=14,ha=15,la=16,da=17,_a=18,fa=19,ua=20,ca=21,wa=22,ga=23,ba=24,pa=25,ma=26,va=27,ka=28,ya=29,xa=30,za=31,Ba=32,Sa=852,Ea=592,Aa=15;function Za(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function Oa(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Na(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Xe,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(Sa),e.distcode=e.distdyn=new i.Buf32(Ea),e.sane=1,e.back=-1,He):Me}function Ra(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,Na(t)):Me}function Ca(t,e){var a,i;return t&&t.state?(i=t.state,e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Me:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,Ra(t))):Me}function Ia(t,e){var a,i;return t?(i=new Oa,t.state=i,i.window=null,(a=Ca(t,e))!==He&&(t.state=null),a):Me}var Da,Ta,Ua=!0;function Fa(t){if(Ua){var e;for(Da=new i.Buf32(512),Ta=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Ce(De,t.lens,0,288,Da,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Ce(Te,t.lens,0,32,Ta,0,t.work,{bits:5}),Ua=!1}t.lencode=Da,t.lenbits=9,t.distcode=Ta,t.distbits=5}function La(t,e,a,n){var r,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new i.Buf8(s.wsize)),n>=s.wsize?(i.arraySet(s.window,e,a-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((r=s.wsize-s.wnext)>n&&(r=n),i.arraySet(s.window,e,a-n,r,s.wnext),(n-=r)?(i.arraySet(s.window,e,a-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=r))),0}var Ha={inflateReset:Ra,inflateReset2:Ca,inflateResetKeep:Na,inflateInit:function(t){return Ia(t,Aa)},inflateInit2:Ia,inflate:function(t,e){var a,n,r,s,o,h,l,d,_,f,u,c,w,g,b,p,m,v,k,y,x,z,B,S,E=0,A=new i.Buf8(4),Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return Me;(a=t.state).mode===ra&&(a.mode=sa),o=t.next_out,r=t.output,l=t.avail_out,s=t.next_in,n=t.input,h=t.avail_in,d=a.hold,_=a.bits,f=h,u=l,z=He;t:for(;;)switch(a.mode){case Xe:if(0===a.wrap){a.mode=sa;break}for(;_<16;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}if(2&a.wrap&&35615===d){a.check=0,A[0]=255&d,A[1]=d>>>8&255,a.check=st(a.check,A,2,0),d=0,_=0,a.mode=We;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&d)<<8)+(d>>8))%31){t.msg="incorrect header check",a.mode=xa;break}if((15&d)!==Ge){t.msg="unknown compression method",a.mode=xa;break}if(_-=4,x=8+(15&(d>>>=4)),0===a.wbits)a.wbits=x;else if(x>a.wbits){t.msg="invalid window size",a.mode=xa;break}a.dmax=1<<x,t.adler=a.check=1,a.mode=512&d?ia:ra,d=0,_=0;break;case We:for(;_<16;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}if(a.flags=d,(255&a.flags)!==Ge){t.msg="unknown compression method",a.mode=xa;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=xa;break}a.head&&(a.head.text=d>>8&1),512&a.flags&&(A[0]=255&d,A[1]=d>>>8&255,a.check=st(a.check,A,2,0)),d=0,_=0,a.mode=qe;case qe:for(;_<32;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}a.head&&(a.head.time=d),512&a.flags&&(A[0]=255&d,A[1]=d>>>8&255,A[2]=d>>>16&255,A[3]=d>>>24&255,a.check=st(a.check,A,4,0)),d=0,_=0,a.mode=Qe;case Qe:for(;_<16;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}a.head&&(a.head.xflags=255&d,a.head.os=d>>8),512&a.flags&&(A[0]=255&d,A[1]=d>>>8&255,a.check=st(a.check,A,2,0)),d=0,_=0,a.mode=Ve;case Ve:if(1024&a.flags){for(;_<16;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}a.length=d,a.head&&(a.head.extra_len=d),512&a.flags&&(A[0]=255&d,A[1]=d>>>8&255,a.check=st(a.check,A,2,0)),d=0,_=0}else a.head&&(a.head.extra=null);a.mode=$e;case $e:if(1024&a.flags&&((c=a.length)>h&&(c=h),c&&(a.head&&(x=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),i.arraySet(a.head.extra,n,s,c,x)),512&a.flags&&(a.check=st(a.check,n,c,s)),h-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=ta;case ta:if(2048&a.flags){if(0===h)break t;c=0;do{x=n[s+c++],a.head&&x&&a.length<65536&&(a.head.name+=String.fromCharCode(x))}while(x&&c<h);if(512&a.flags&&(a.check=st(a.check,n,c,s)),h-=c,s+=c,x)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=ea;case ea:if(4096&a.flags){if(0===h)break t;c=0;do{x=n[s+c++],a.head&&x&&a.length<65536&&(a.head.comment+=String.fromCharCode(x))}while(x&&c<h);if(512&a.flags&&(a.check=st(a.check,n,c,s)),h-=c,s+=c,x)break t}else a.head&&(a.head.comment=null);a.mode=aa;case aa:if(512&a.flags){for(;_<16;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}if(d!==(65535&a.check)){t.msg="header crc mismatch",a.mode=xa;break}d=0,_=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=ra;break;case ia:for(;_<32;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}t.adler=a.check=Za(d),d=0,_=0,a.mode=na;case na:if(0===a.havedict)return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=h,a.hold=d,a.bits=_,Ke;t.adler=a.check=1,a.mode=ra;case ra:if(e===Fe||e===Le)break t;case sa:if(a.last){d>>>=7&_,_-=7&_,a.mode=va;break}for(;_<3;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}switch(a.last=1&d,_-=1,3&(d>>>=1)){case 0:a.mode=oa;break;case 1:if(Fa(a),a.mode=ua,e===Le){d>>>=2,_-=2;break t}break;case 2:a.mode=da;break;case 3:t.msg="invalid block type",a.mode=xa}d>>>=2,_-=2;break;case oa:for(d>>>=7&_,_-=7&_;_<32;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}if((65535&d)!=(d>>>16^65535)){t.msg="invalid stored block lengths",a.mode=xa;break}if(a.length=65535&d,d=0,_=0,a.mode=ha,e===Le)break t;case ha:a.mode=la;case la:if(c=a.length){if(c>h&&(c=h),c>l&&(c=l),0===c)break t;i.arraySet(r,n,s,c,o),h-=c,s+=c,l-=c,o+=c,a.length-=c;break}a.mode=ra;break;case da:for(;_<14;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}if(a.nlen=257+(31&d),d>>>=5,_-=5,a.ndist=1+(31&d),d>>>=5,_-=5,a.ncode=4+(15&d),d>>>=4,_-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=xa;break}a.have=0,a.mode=_a;case _a:for(;a.have<a.ncode;){for(;_<3;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}a.lens[Z[a.have++]]=7&d,d>>>=3,_-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,B={bits:a.lenbits},z=Ce(Ie,a.lens,0,19,a.lencode,0,a.work,B),a.lenbits=B.bits,z){t.msg="invalid code lengths set",a.mode=xa;break}a.have=0,a.mode=fa;case fa:for(;a.have<a.nlen+a.ndist;){for(;p=(E=a.lencode[d&(1<<a.lenbits)-1])>>>16&255,m=65535&E,!((b=E>>>24)<=_);){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}if(m<16)d>>>=b,_-=b,a.lens[a.have++]=m;else{if(16===m){for(S=b+2;_<S;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}if(d>>>=b,_-=b,0===a.have){t.msg="invalid bit length repeat",a.mode=xa;break}x=a.lens[a.have-1],c=3+(3&d),d>>>=2,_-=2}else if(17===m){for(S=b+3;_<S;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}_-=b,x=0,c=3+(7&(d>>>=b)),d>>>=3,_-=3}else{for(S=b+7;_<S;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}_-=b,x=0,c=11+(127&(d>>>=b)),d>>>=7,_-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=xa;break}for(;c--;)a.lens[a.have++]=x}}if(a.mode===xa)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=xa;break}if(a.lenbits=9,B={bits:a.lenbits},z=Ce(De,a.lens,0,a.nlen,a.lencode,0,a.work,B),a.lenbits=B.bits,z){t.msg="invalid literal/lengths set",a.mode=xa;break}if(a.distbits=6,a.distcode=a.distdyn,B={bits:a.distbits},z=Ce(Te,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,B),a.distbits=B.bits,z){t.msg="invalid distances set",a.mode=xa;break}if(a.mode=ua,e===Le)break t;case ua:a.mode=ca;case ca:if(h>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=h,a.hold=d,a.bits=_,Ae(t,u),o=t.next_out,r=t.output,l=t.avail_out,s=t.next_in,n=t.input,h=t.avail_in,d=a.hold,_=a.bits,a.mode===ra&&(a.back=-1);break}for(a.back=0;p=(E=a.lencode[d&(1<<a.lenbits)-1])>>>16&255,m=65535&E,!((b=E>>>24)<=_);){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}if(p&&0==(240&p)){for(v=b,k=p,y=m;p=(E=a.lencode[y+((d&(1<<v+k)-1)>>v)])>>>16&255,m=65535&E,!(v+(b=E>>>24)<=_);){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}d>>>=v,_-=v,a.back+=v}if(d>>>=b,_-=b,a.back+=b,a.length=m,0===p){a.mode=ma;break}if(32&p){a.back=-1,a.mode=ra;break}if(64&p){t.msg="invalid literal/length code",a.mode=xa;break}a.extra=15&p,a.mode=wa;case wa:if(a.extra){for(S=a.extra;_<S;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}a.length+=d&(1<<a.extra)-1,d>>>=a.extra,_-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=ga;case ga:for(;p=(E=a.distcode[d&(1<<a.distbits)-1])>>>16&255,m=65535&E,!((b=E>>>24)<=_);){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}if(0==(240&p)){for(v=b,k=p,y=m;p=(E=a.distcode[y+((d&(1<<v+k)-1)>>v)])>>>16&255,m=65535&E,!(v+(b=E>>>24)<=_);){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}d>>>=v,_-=v,a.back+=v}if(d>>>=b,_-=b,a.back+=b,64&p){t.msg="invalid distance code",a.mode=xa;break}a.offset=m,a.extra=15&p,a.mode=ba;case ba:if(a.extra){for(S=a.extra;_<S;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}a.offset+=d&(1<<a.extra)-1,d>>>=a.extra,_-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=xa;break}a.mode=pa;case pa:if(0===l)break t;if(c=u-l,a.offset>c){if((c=a.offset-c)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=xa;break}c>a.wnext?(c-=a.wnext,w=a.wsize-c):w=a.wnext-c,c>a.length&&(c=a.length),g=a.window}else g=r,w=o-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{r[o++]=g[w++]}while(--c);0===a.length&&(a.mode=ca);break;case ma:if(0===l)break t;r[o++]=a.length,l--,a.mode=ca;break;case va:if(a.wrap){for(;_<32;){if(0===h)break t;h--,d|=n[s++]<<_,_+=8}if(u-=l,t.total_out+=u,a.total+=u,u&&(t.adler=a.check=a.flags?st(a.check,r,u,o-u):it(a.check,r,u,o-u)),u=l,(a.flags?d:Za(d))!==a.check){t.msg="incorrect data check",a.mode=xa;break}d=0,_=0}a.mode=ka;case ka:if(a.wrap&&a.flags){for(;_<32;){if(0===h)break t;h--,d+=n[s++]<<_,_+=8}if(d!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=xa;break}d=0,_=0}a.mode=ya;case ya:z=je;break t;case xa:z=Pe;break t;case za:return Ye;case Ba:default:return Me}return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=h,a.hold=d,a.bits=_,(a.wsize||u!==t.avail_out&&a.mode<xa&&(a.mode<va||e!==Ue))&&La(t,t.output,t.next_out,u-t.avail_out),f-=t.avail_in,u-=t.avail_out,t.total_in+=f,t.total_out+=u,a.total+=u,a.wrap&&u&&(t.adler=a.check=a.flags?st(a.check,r,u,t.next_out-u):it(a.check,r,u,t.next_out-u)),t.data_type=a.bits+(a.last?64:0)+(a.mode===ra?128:0)+(a.mode===ua||a.mode===ha?256:0),(0===f&&0===u||e===Ue)&&z===He&&(z=Je),z},inflateEnd:function(t){if(!t||!t.state)return Me;var e=t.state;return e.window&&(e.window=null),t.state=null,He},inflateGetHeader:function(t,e){var a;return t&&t.state?0==(2&(a=t.state).wrap)?Me:(a.head=e,e.done=!1,He):Me},inflateSetDictionary:function(t,e){var a,i=e.length;return t&&t.state?0!==(a=t.state).wrap&&a.mode!==na?Me:a.mode===na&&it(1,e,i,0)!==a.check?Pe:La(t,e,i,i)?(a.mode=za,Ye):(a.havedict=1,He):Me},inflateInfo:"pako inflate (from Nodeca project)"},ja={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};var Ka=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},Ma=Object.prototype.toString;function Pa(t){if(!(this instanceof Pa))return new Pa(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new me,this.strm.avail_out=0;var a=Ha.inflateInit2(this.strm,e.windowBits);if(a!==ja.Z_OK)throw new Error(ot[a]);if(this.header=new Ka,Ha.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=pe.string2buf(e.dictionary):"[object ArrayBuffer]"===Ma.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ha.inflateSetDictionary(this.strm,e.dictionary))!==ja.Z_OK))throw new Error(ot[a])}function Ya(t,e){var a=new Pa(e);if(a.push(t,!0),a.err)throw a.msg||ot[a.err];return a.result}Pa.prototype.push=function(t,e){var a,n,r,s,o,h=this.strm,l=this.options.chunkSize,d=this.options.dictionary,_=!1;if(this.ended)return!1;n=e===~~e?e:!0===e?ja.Z_FINISH:ja.Z_NO_FLUSH,"string"==typeof t?h.input=pe.binstring2buf(t):"[object ArrayBuffer]"===Ma.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(l),h.next_out=0,h.avail_out=l),(a=Ha.inflate(h,ja.Z_NO_FLUSH))===ja.Z_NEED_DICT&&d&&(a=Ha.inflateSetDictionary(this.strm,d)),a===ja.Z_BUF_ERROR&&!0===_&&(a=ja.Z_OK,_=!1),a!==ja.Z_STREAM_END&&a!==ja.Z_OK)return this.onEnd(a),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&a!==ja.Z_STREAM_END&&(0!==h.avail_in||n!==ja.Z_FINISH&&n!==ja.Z_SYNC_FLUSH)||("string"===this.options.to?(r=pe.utf8border(h.output,h.next_out),s=h.next_out-r,o=pe.buf2string(h.output,r),h.next_out=s,h.avail_out=l-s,s&&i.arraySet(h.output,h.output,r,s,0),this.onData(o)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(_=!0)}while((h.avail_in>0||0===h.avail_out)&&a!==ja.Z_STREAM_END);return a===ja.Z_STREAM_END&&(n=ja.Z_FINISH),n===ja.Z_FINISH?(a=Ha.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ja.Z_OK):n!==ja.Z_SYNC_FLUSH||(this.onEnd(ja.Z_OK),h.avail_out=0,!0)},Pa.prototype.onData=function(t){this.chunks.push(t)},Pa.prototype.onEnd=function(t){t===ja.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Ja={Inflate:Pa,inflate:Ya,inflateRaw:function(t,e){return(e=e||{}).raw=!0,Ya(t,e)},ungzip:Ya},Ga={};(0,i.assign)(Ga,Ee,Ja,ja);var Xa=Ga.inflate,Wa=Ga.deflate;return t.pack=function(t){return JSON.stringify(t.map(function(t){var a=e({},t,{p:"p1"});return Wa(JSON.stringify(a))}))},t.unpack=function(t){if(Array.isArray(t))return console.info("unpacking unpacked data..."),t;var e,a=JSON.parse(t);if(!a.length)return[];if(a.every(function(t){return"object"==typeof t&&"timestamp"in t}))return console.info("unpacking unpacked data..."),a;try{e=JSON.parse(Xa(a[0],{to:"string"}))}catch(t){throw console.error(t),new Error("Unknown data format.")}if("p1"!==e.p)throw new Error("These events were packed with packer "+e.p+" which is incompatible with current packer p1.");return a.map(function(t){return JSON.parse(Xa(t,{to:"string"}))})},t}({});
var rrwebPacker=function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,a=1,n=arguments.length;a<n;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function n(t,e){return t(e={exports:{}},e.exports),e.exports}var i=n(function(t,e){t.exports=function t(e,n,i){function r(o,l){if(!n[o]){if(!e[o]){var h=a;if(!l&&h)return h(o,!0);if(s)return s(o,!0);var d=new Error("Cannot find module '"+o+"'");throw d.code="MODULE_NOT_FOUND",d}var f=n[o]={exports:{}};e[o][0].call(f.exports,function(t){var a=e[o][1][t];return r(a||t)},f,f.exports,t,e,n,i)}return n[o].exports}for(var s=a,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(t,e,a){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}a.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var n in a)i(a,n)&&(t[n]=a[n])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,a,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(a,a+n),i);else for(var r=0;r<n;r++)t[i+r]=e[a+r]},flattenChunks:function(t){var e,a,n,i,r,s;for(n=0,e=0,a=t.length;e<a;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,a=t.length;e<a;e++)r=t[e],s.set(r,i),i+=r.length;return s}},s={arraySet:function(t,e,a,n,i){for(var r=0;r<n;r++)t[i+r]=e[a+r]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,r)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,s))},a.setTyped(n)},{}],2:[function(t,e,a){var n=t("./common"),i=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){r=!1}for(var s=new n.Buf8(256),o=0;o<256;o++)s[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(t,e){if(e<65534&&(t.subarray&&r||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var a="",s=0;s<e;s++)a+=String.fromCharCode(t[s]);return a}s[254]=s[254]=1,a.string2buf=function(t){var e,a,i,r,s,o=t.length,l=0;for(r=0;r<o;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(i-56320),r++),l+=a<128?1:a<2048?2:a<65536?3:4;for(e=new n.Buf8(l),s=0,r=0;s<l;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(i-56320),r++),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return l(t,t.length)},a.binstring2buf=function(t){for(var e=new n.Buf8(t.length),a=0,i=e.length;a<i;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,n,i,r,o=e||t.length,h=new Array(2*o);for(n=0,a=0;a<o;)if((i=t[a++])<128)h[n++]=i;else if((r=s[i])>4)h[n++]=65533,a+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&a<o;)i=i<<6|63&t[a++],r--;r>1?h[n++]=65533:i<65536?h[n++]=i:(i-=65536,h[n++]=55296|i>>10&1023,h[n++]=56320|1023&i)}return l(h,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+s[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){e.exports=function(t,e,a,n){for(var i=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+e[n++]|0,r=r+i|0}while(--s);i%=65521,r%=65521}return i|r<<16|0}},{}],4:[function(t,e,a){var n=function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,i){var r=n,s=i+a;t^=-1;for(var o=i;o<s;o++)t=t>>>8^r[255&(t^e[o])];return-1^t}},{}],5:[function(t,e,a){var n,i=t("../utils/common"),r=t("./trees"),s=t("./adler32"),o=t("./crc32"),l=t("./messages"),h=0,d=1,f=3,u=4,_=5,c=0,g=1,b=-2,w=-3,m=-5,p=-1,v=1,k=2,y=3,x=4,z=0,B=2,S=8,A=9,E=15,C=8,Z=286,O=30,N=19,R=2*Z+1,U=15,D=3,I=258,T=I+D+1,F=32,j=42,L=69,H=73,K=91,M=103,P=113,Y=666,G=1,J=2,X=3,q=4,W=3;function Q(t,e){return t.msg=l[e],e}function V(t){return(t<<1)-(t>4?9:0)}function $(t){for(var e=t.length;--e>=0;)t[e]=0}function tt(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(i.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function et(t,e){r._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,tt(t.strm)}function at(t,e){t.pending_buf[t.pending++]=e}function nt(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function it(t,e){var a,n,i=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-T?t.strstart-(t.w_size-T):0,h=t.window,d=t.w_mask,f=t.prev,u=t.strstart+I,_=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===_&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<u);if(n=I-(u-r),r=u-I,n>s){if(t.match_start=e,s=n,n>=o)break;_=h[r+s-1],c=h[r+s]}}}while((e=f[e&d])>l&&0!=--i);return s<=t.lookahead?s:t.lookahead}function rt(t){var e,a,n,r,l,h,d,f,u,_,c=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=c+(c-T)){i.arraySet(t.window,t.window,c,c,0),t.match_start-=c,t.strstart-=c,t.block_start-=c,a=t.hash_size,e=a;do{n=t.head[--e],t.head[e]=n>=c?n-c:0}while(--a);e=a=c;do{n=t.prev[--e],t.prev[e]=n>=c?n-c:0}while(--a);r+=c}if(0===t.strm.avail_in)break;if(h=t.strm,d=t.window,f=t.strstart+t.lookahead,u=r,_=void 0,(_=h.avail_in)>u&&(_=u),a=0===_?0:(h.avail_in-=_,i.arraySet(d,h.input,h.next_in,_,f),1===h.state.wrap?h.adler=s(h.adler,d,_,f):2===h.state.wrap&&(h.adler=o(h.adler,d,_,f)),h.next_in+=_,h.total_in+=_,_),t.lookahead+=a,t.lookahead+t.insert>=D)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+D-1])&t.hash_mask,t.prev[l&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=l,l++,t.insert--,!(t.lookahead+t.insert<D)););}while(t.lookahead<T&&0!==t.strm.avail_in)}function st(t,e){for(var a,n;;){if(t.lookahead<T){if(rt(t),t.lookahead<T&&e===h)return G;if(0===t.lookahead)break}if(a=0,t.lookahead>=D&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-T&&(t.match_length=it(t,a)),t.match_length>=D)if(n=r._tr_tally(t,t.strstart-t.match_start,t.match_length-D),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=D){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=r._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(et(t,!1),0===t.strm.avail_out))return G}return t.insert=t.strstart<D-1?t.strstart:D-1,e===u?(et(t,!0),0===t.strm.avail_out?X:q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?G:J}function ot(t,e){for(var a,n,i;;){if(t.lookahead<T){if(rt(t),t.lookahead<T&&e===h)return G;if(0===t.lookahead)break}if(a=0,t.lookahead>=D&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=D-1,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-T&&(t.match_length=it(t,a),t.match_length<=5&&(t.strategy===v||t.match_length===D&&t.strstart-t.match_start>4096)&&(t.match_length=D-1)),t.prev_length>=D&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-D,n=r._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-D),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=D-1,t.strstart++,n&&(et(t,!1),0===t.strm.avail_out))return G}else if(t.match_available){if((n=r._tr_tally(t,0,t.window[t.strstart-1]))&&et(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return G}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=r._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<D-1?t.strstart:D-1,e===u?(et(t,!0),0===t.strm.avail_out?X:q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?G:J}function lt(t,e,a,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=i}function ht(){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=S,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(2*R),this.dyn_dtree=new i.Buf16(2*(2*O+1)),this.bl_tree=new i.Buf16(2*(2*N+1)),$(this.dyn_ltree),$(this.dyn_dtree),$(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(U+1),this.heap=new i.Buf16(2*Z+1),$(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*Z+1),$(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 dt(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=B,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?j:P,t.adler=2===e.wrap?0:1,e.last_flush=h,r._tr_init(e),c):Q(t,b)}function ft(t){var e,a=dt(t);return a===c&&((e=t.state).window_size=2*e.w_size,$(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=D-1,e.match_available=0,e.ins_h=0),a}function ut(t,e,a,n,r,s){if(!t)return b;var o=1;if(e===p&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>A||a!==S||n<8||n>15||e<0||e>9||s<0||s>x)return Q(t,b);8===n&&(n=9);var l=new ht;return t.state=l,l.strm=t,l.wrap=o,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=r+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+D-1)/D),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<<r+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=e,l.strategy=s,l.method=a,ft(t)}n=[new lt(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(rt(t),0===t.lookahead&&e===h)return G;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,et(t,!1),0===t.strm.avail_out))return G;if(t.strstart-t.block_start>=t.w_size-T&&(et(t,!1),0===t.strm.avail_out))return G}return t.insert=0,e===u?(et(t,!0),0===t.strm.avail_out?X:q):(t.strstart>t.block_start&&(et(t,!1),t.strm.avail_out),G)}),new lt(4,4,8,4,st),new lt(4,5,16,8,st),new lt(4,6,32,32,st),new lt(4,4,16,16,ot),new lt(8,16,32,32,ot),new lt(8,16,128,128,ot),new lt(8,32,128,256,ot),new lt(32,128,258,1024,ot),new lt(32,258,258,4096,ot)],a.deflateInit=function(t,e){return ut(t,e,S,E,C,z)},a.deflateInit2=ut,a.deflateReset=ft,a.deflateResetKeep=dt,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?b:(t.state.gzhead=e,c):b},a.deflate=function(t,e){var a,i,s,l;if(!t||!t.state||e>_||e<0)return t?Q(t,b):b;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===Y&&e!==u)return Q(t,0===t.avail_out?m:b);if(i.strm=t,a=i.last_flush,i.last_flush=e,i.status===j)if(2===i.wrap)t.adler=0,at(i,31),at(i,139),at(i,8),i.gzhead?(at(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)),at(i,255&i.gzhead.time),at(i,i.gzhead.time>>8&255),at(i,i.gzhead.time>>16&255),at(i,i.gzhead.time>>24&255),at(i,9===i.level?2:i.strategy>=k||i.level<2?4:0),at(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(at(i,255&i.gzhead.extra.length),at(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=o(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=L):(at(i,0),at(i,0),at(i,0),at(i,0),at(i,0),at(i,9===i.level?2:i.strategy>=k||i.level<2?4:0),at(i,W),i.status=P);else{var w=S+(i.w_bits-8<<4)<<8,p=-1;p=i.strategy>=k||i.level<2?0:i.level<6?1:6===i.level?2:3,w|=p<<6,0!==i.strstart&&(w|=F),w+=31-w%31,i.status=P,nt(i,w),0!==i.strstart&&(nt(i,t.adler>>>16),nt(i,65535&t.adler)),t.adler=1}if(i.status===L)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),tt(t),s=i.pending,i.pending!==i.pending_buf_size));)at(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=H)}else i.status=H;if(i.status===H)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),tt(t),s=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,at(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>s&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.gzindex=0,i.status=K)}else i.status=K;if(i.status===K)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),tt(t),s=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,at(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>s&&(t.adler=o(t.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.status=M)}else i.status=M;if(i.status===M&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&tt(t),i.pending+2<=i.pending_buf_size&&(at(i,255&t.adler),at(i,t.adler>>8&255),t.adler=0,i.status=P)):i.status=P),0!==i.pending){if(tt(t),0===t.avail_out)return i.last_flush=-1,c}else if(0===t.avail_in&&V(e)<=V(a)&&e!==u)return Q(t,m);if(i.status===Y&&0!==t.avail_in)return Q(t,m);if(0!==t.avail_in||0!==i.lookahead||e!==h&&i.status!==Y){var v=i.strategy===k?function(t,e){for(var a;;){if(0===t.lookahead&&(rt(t),0===t.lookahead)){if(e===h)return G;break}if(t.match_length=0,a=r._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(et(t,!1),0===t.strm.avail_out))return G}return t.insert=0,e===u?(et(t,!0),0===t.strm.avail_out?X:q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?G:J}(i,e):i.strategy===y?function(t,e){for(var a,n,i,s,o=t.window;;){if(t.lookahead<=I){if(rt(t),t.lookahead<=I&&e===h)return G;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=D&&t.strstart>0&&(i=t.strstart-1,(n=o[i])===o[++i]&&n===o[++i]&&n===o[++i])){s=t.strstart+I;do{}while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<s);t.match_length=I-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=D?(a=r._tr_tally(t,1,t.match_length-D),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=r._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(et(t,!1),0===t.strm.avail_out))return G}return t.insert=0,e===u?(et(t,!0),0===t.strm.avail_out?X:q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?G:J}(i,e):n[i.level].func(i,e);if(v!==X&&v!==q||(i.status=Y),v===G||v===X)return 0===t.avail_out&&(i.last_flush=-1),c;if(v===J&&(e===d?r._tr_align(i):e!==_&&(r._tr_stored_block(i,0,0,!1),e===f&&($(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),tt(t),0===t.avail_out))return i.last_flush=-1,c}return e!==u?c:i.wrap<=0?g:(2===i.wrap?(at(i,255&t.adler),at(i,t.adler>>8&255),at(i,t.adler>>16&255),at(i,t.adler>>24&255),at(i,255&t.total_in),at(i,t.total_in>>8&255),at(i,t.total_in>>16&255),at(i,t.total_in>>24&255)):(nt(i,t.adler>>>16),nt(i,65535&t.adler)),tt(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?c:g)},a.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==j&&e!==L&&e!==H&&e!==K&&e!==M&&e!==P&&e!==Y?Q(t,b):(t.state=null,e===P?Q(t,w):c):b},a.deflateSetDictionary=function(t,e){var a,n,r,o,l,h,d,f,u=e.length;if(!t||!t.state)return b;if(a=t.state,2===(o=a.wrap)||1===o&&a.status!==j||a.lookahead)return b;for(1===o&&(t.adler=s(t.adler,e,u,0)),a.wrap=0,u>=a.w_size&&(0===o&&($(a.head),a.strstart=0,a.block_start=0,a.insert=0),f=new i.Buf8(a.w_size),i.arraySet(f,e,u-a.w_size,a.w_size,0),e=f,u=a.w_size),l=t.avail_in,h=t.next_in,d=t.input,t.avail_in=u,t.next_in=0,t.input=e,rt(a);a.lookahead>=D;){n=a.strstart,r=a.lookahead-(D-1);do{a.ins_h=(a.ins_h<<a.hash_shift^a.window[n+D-1])&a.hash_mask,a.prev[n&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=n,n++}while(--r);a.strstart=n,a.lookahead=D-1,rt(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=D-1,a.match_available=0,t.next_in=h,t.input=d,t.avail_in=l,a.wrap=o,c},a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(t,e,a){e.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(t,e,a){var n=t("../utils/common"),i=4,r=0,s=1,o=2;function l(t){for(var e=t.length;--e>=0;)t[e]=0}var h=0,d=1,f=2,u=29,_=256,c=_+1+u,g=30,b=19,w=2*c+1,m=15,p=16,v=7,k=256,y=16,x=17,z=18,B=[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],S=[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],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],C=new Array(2*(c+2));l(C);var Z=new Array(2*g);l(Z);var O=new Array(512);l(O);var N=new Array(256);l(N);var R=new Array(u);l(R);var U,D,I,T=new Array(g);function F(t,e,a,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function j(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function L(t){return t<256?O[t]:O[256+(t>>>7)]}function H(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function K(t,e,a){t.bi_valid>p-a?(t.bi_buf|=e<<t.bi_valid&65535,H(t,t.bi_buf),t.bi_buf=e>>p-t.bi_valid,t.bi_valid+=a-p):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)}function M(t,e,a){K(t,a[2*e],a[2*e+1])}function P(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1}function Y(t,e,a){var n,i,r=new Array(m+1),s=0;for(n=1;n<=m;n++)r[n]=s=s+a[n-1]<<1;for(i=0;i<=e;i++){var o=t[2*i+1];0!==o&&(t[2*i]=P(r[o]++,o))}}function G(t){var e;for(e=0;e<c;e++)t.dyn_ltree[2*e]=0;for(e=0;e<g;e++)t.dyn_dtree[2*e]=0;for(e=0;e<b;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*k]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function J(t){t.bi_valid>8?H(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function X(t,e,a,n){var i=2*e,r=2*a;return t[i]<t[r]||t[i]===t[r]&&n[e]<=n[a]}function q(t,e,a){for(var n=t.heap[a],i=a<<1;i<=t.heap_len&&(i<t.heap_len&&X(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!X(e,n,t.heap[i],t.depth));)t.heap[a]=t.heap[i],a=i,i<<=1;t.heap[a]=n}function W(t,e,a){var n,i,r,s,o=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===n?M(t,i,e):(r=N[i],M(t,r+_+1,e),0!==(s=B[r])&&(i-=R[r],K(t,i,s)),r=L(--n),M(t,r,a),0!==(s=S[r])&&(n-=T[r],K(t,n,s)))}while(o<t.last_lit);M(t,k,e)}function Q(t,e){var a,n,i,r=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,l=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=w,a=0;a<l;a++)0!==r[2*a]?(t.heap[++t.heap_len]=h=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)i=t.heap[++t.heap_len]=h<2?++h:0,r[2*i]=1,t.depth[i]=0,t.opt_len--,o&&(t.static_len-=s[2*i+1]);for(e.max_code=h,a=t.heap_len>>1;a>=1;a--)q(t,r,a);i=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],q(t,r,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,r[2*i]=r[2*a]+r[2*n],t.depth[i]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,r[2*a+1]=r[2*n+1]=i,t.heap[1]=i++,q(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,i,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,_=e.stat_desc.extra_base,c=e.stat_desc.max_length,g=0;for(r=0;r<=m;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<w;a++)n=t.heap[a],(r=l[2*l[2*n+1]+1]+1)>c&&(r=c,g++),l[2*n+1]=r,n>h||(t.bl_count[r]++,s=0,n>=_&&(s=u[n-_]),o=l[2*n],t.opt_len+=o*(r+s),f&&(t.static_len+=o*(d[2*n+1]+s)));if(0!==g){do{for(r=c-1;0===t.bl_count[r];)r--;t.bl_count[r]--,t.bl_count[r+1]+=2,t.bl_count[c]--,g-=2}while(g>0);for(r=c;0!==r;r--)for(n=t.bl_count[r];0!==n;)(i=t.heap[--a])>h||(l[2*i+1]!==r&&(t.opt_len+=(r-l[2*i+1])*l[2*i],l[2*i+1]=r),n--)}}(t,e),Y(r,h,t.bl_count)}function V(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)i=s,s=e[2*(n+1)+1],++o<l&&i===s||(o<h?t.bl_tree[2*i]+=o:0!==i?(i!==r&&t.bl_tree[2*i]++,t.bl_tree[2*y]++):o<=10?t.bl_tree[2*x]++:t.bl_tree[2*z]++,o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4))}function $(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),n=0;n<=a;n++)if(i=s,s=e[2*(n+1)+1],!(++o<l&&i===s)){if(o<h)do{M(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==r&&(M(t,i,t.bl_tree),o--),M(t,y,t.bl_tree),K(t,o-3,2)):o<=10?(M(t,x,t.bl_tree),K(t,o-3,3)):(M(t,z,t.bl_tree),K(t,o-11,7));o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4)}}l(T);var tt=!1;function et(t,e,a,i){K(t,(h<<1)+(i?1:0),3),function(t,e,a,i){J(t),i&&(H(t,a),H(t,~a)),n.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}(t,e,a,!0)}a._tr_init=function(t){tt||(function(){var t,e,a,n,i,r=new Array(m+1);for(a=0,n=0;n<u-1;n++)for(R[n]=a,t=0;t<1<<B[n];t++)N[a++]=n;for(N[a-1]=n,i=0,n=0;n<16;n++)for(T[n]=i,t=0;t<1<<S[n];t++)O[i++]=n;for(i>>=7;n<g;n++)for(T[n]=i<<7,t=0;t<1<<S[n]-7;t++)O[256+i++]=n;for(e=0;e<=m;e++)r[e]=0;for(t=0;t<=143;)C[2*t+1]=8,t++,r[8]++;for(;t<=255;)C[2*t+1]=9,t++,r[9]++;for(;t<=279;)C[2*t+1]=7,t++,r[7]++;for(;t<=287;)C[2*t+1]=8,t++,r[8]++;for(Y(C,c+1,r),t=0;t<g;t++)Z[2*t+1]=5,Z[2*t]=P(t,5);U=new F(C,B,_+1,c,m),D=new F(Z,S,0,g,m),I=new F(new Array(0),A,0,b,v)}(),tt=!0),t.l_desc=new j(t.dyn_ltree,U),t.d_desc=new j(t.dyn_dtree,D),t.bl_desc=new j(t.bl_tree,I),t.bi_buf=0,t.bi_valid=0,G(t)},a._tr_stored_block=et,a._tr_flush_block=function(t,e,a,n){var l,h,u=0;t.level>0?(t.strm.data_type===o&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return r;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return s;for(e=32;e<_;e++)if(0!==t.dyn_ltree[2*e])return s;return r}(t)),Q(t,t.l_desc),Q(t,t.d_desc),u=function(t){var e;for(V(t,t.dyn_ltree,t.l_desc.max_code),V(t,t.dyn_dtree,t.d_desc.max_code),Q(t,t.bl_desc),e=b-1;e>=3&&0===t.bl_tree[2*E[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),l=t.opt_len+3+7>>>3,(h=t.static_len+3+7>>>3)<=l&&(l=h)):l=h=a+5,a+4<=l&&-1!==e?et(t,e,a,n):t.strategy===i||h===l?(K(t,(d<<1)+(n?1:0),3),W(t,C,Z)):(K(t,(f<<1)+(n?1:0),3),function(t,e,a,n){var i;for(K(t,e-257,5),K(t,a-1,5),K(t,n-4,4),i=0;i<n;i++)K(t,t.bl_tree[2*E[i]+1],3);$(t,t.dyn_ltree,e-1),$(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,u+1),W(t,t.dyn_ltree,t.dyn_dtree)),G(t),n&&J(t)},a._tr_tally=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(N[a]+_+1)]++,t.dyn_dtree[2*L(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){K(t,d<<1,3),M(t,k,C),function(t){16===t.bi_valid?(H(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":1}],8:[function(t,e,a){e.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(t,e,a){var n=t("./zlib/deflate"),i=t("./utils/common"),r=t("./utils/strings"),s=t("./zlib/messages"),o=t("./zlib/zstream"),l=Object.prototype.toString,h=0,d=-1,f=0,u=8;function _(t){if(!(this instanceof _))return new _(t);this.options=i.assign({level:d,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var a=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==h)throw new Error(s[a]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var c;if(c="string"==typeof e.dictionary?r.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=n.deflateSetDictionary(this.strm,c))!==h)throw new Error(s[a]);this._dict_set=!0}}function c(t,e){var a=new _(e);if(a.push(t,!0),a.err)throw a.msg||s[a.err];return a.result}_.prototype.push=function(t,e){var a,s,o=this.strm,d=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=r.string2buf(t):"[object ArrayBuffer]"===l.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new i.Buf8(d),o.next_out=0,o.avail_out=d),1!==(a=n.deflate(o,s))&&a!==h)return this.onEnd(a),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(r.buf2binstring(i.shrinkBuf(o.output,o.next_out))):this.onData(i.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==a);return 4===s?(a=n.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===h):2!==s||(this.onEnd(h),o.avail_out=0,!0)},_.prototype.onData=function(t){this.chunks.push(t)},_.prototype.onEnd=function(t){t===h&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=_,a.deflate=c,a.deflateRaw=function(t,e){return(e=e||{}).raw=!0,c(t,e)},a.gzip=function(t,e){return(e=e||{}).gzip=!0,c(t,e)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")}).deflate,r=n(function(t,e){t.exports=function t(e,n,i){function r(o,l){if(!n[o]){if(!e[o]){var h=a;if(!l&&h)return h(o,!0);if(s)return s(o,!0);var d=new Error("Cannot find module '"+o+"'");throw d.code="MODULE_NOT_FOUND",d}var f=n[o]={exports:{}};e[o][0].call(f.exports,function(t){var a=e[o][1][t];return r(a||t)},f,f.exports,t,e,n,i)}return n[o].exports}for(var s=a,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(t,e,a){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}a.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var n in a)i(a,n)&&(t[n]=a[n])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,a,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(a,a+n),i);else for(var r=0;r<n;r++)t[i+r]=e[a+r]},flattenChunks:function(t){var e,a,n,i,r,s;for(n=0,e=0,a=t.length;e<a;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,a=t.length;e<a;e++)r=t[e],s.set(r,i),i+=r.length;return s}},s={arraySet:function(t,e,a,n,i){for(var r=0;r<n;r++)t[i+r]=e[a+r]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,r)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,s))},a.setTyped(n)},{}],2:[function(t,e,a){var n=t("./common"),i=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){r=!1}for(var s=new n.Buf8(256),o=0;o<256;o++)s[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(t,e){if(e<65534&&(t.subarray&&r||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var a="",s=0;s<e;s++)a+=String.fromCharCode(t[s]);return a}s[254]=s[254]=1,a.string2buf=function(t){var e,a,i,r,s,o=t.length,l=0;for(r=0;r<o;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(i-56320),r++),l+=a<128?1:a<2048?2:a<65536?3:4;for(e=new n.Buf8(l),s=0,r=0;s<l;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(i-56320),r++),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return l(t,t.length)},a.binstring2buf=function(t){for(var e=new n.Buf8(t.length),a=0,i=e.length;a<i;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,n,i,r,o=e||t.length,h=new Array(2*o);for(n=0,a=0;a<o;)if((i=t[a++])<128)h[n++]=i;else if((r=s[i])>4)h[n++]=65533,a+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&a<o;)i=i<<6|63&t[a++],r--;r>1?h[n++]=65533:i<65536?h[n++]=i:(i-=65536,h[n++]=55296|i>>10&1023,h[n++]=56320|1023&i)}return l(h,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+s[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){e.exports=function(t,e,a,n){for(var i=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+e[n++]|0,r=r+i|0}while(--s);i%=65521,r%=65521}return i|r<<16|0}},{}],4:[function(t,e,a){e.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(t,e,a){var n=function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,i){var r=n,s=i+a;t^=-1;for(var o=i;o<s;o++)t=t>>>8^r[255&(t^e[o])];return-1^t}},{}],6:[function(t,e,a){e.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(t,e,a){e.exports=function(t,e){var a,n,i,r,s,o,l,h,d,f,u,_,c,g,b,w,m,p,v,k,y,x,z,B,S;a=t.state,n=t.next_in,B=t.input,i=n+(t.avail_in-5),r=t.next_out,S=t.output,s=r-(e-t.avail_out),o=r+(t.avail_out-257),l=a.dmax,h=a.wsize,d=a.whave,f=a.wnext,u=a.window,_=a.hold,c=a.bits,g=a.lencode,b=a.distcode,w=(1<<a.lenbits)-1,m=(1<<a.distbits)-1;t:do{c<15&&(_+=B[n++]<<c,c+=8,_+=B[n++]<<c,c+=8),p=g[_&w];e:for(;;){if(_>>>=v=p>>>24,c-=v,0==(v=p>>>16&255))S[r++]=65535&p;else{if(!(16&v)){if(0==(64&v)){p=g[(65535&p)+(_&(1<<v)-1)];continue e}if(32&v){a.mode=12;break t}t.msg="invalid literal/length code",a.mode=30;break t}k=65535&p,(v&=15)&&(c<v&&(_+=B[n++]<<c,c+=8),k+=_&(1<<v)-1,_>>>=v,c-=v),c<15&&(_+=B[n++]<<c,c+=8,_+=B[n++]<<c,c+=8),p=b[_&m];a:for(;;){if(_>>>=v=p>>>24,c-=v,!(16&(v=p>>>16&255))){if(0==(64&v)){p=b[(65535&p)+(_&(1<<v)-1)];continue a}t.msg="invalid distance code",a.mode=30;break t}if(y=65535&p,c<(v&=15)&&(_+=B[n++]<<c,(c+=8)<v&&(_+=B[n++]<<c,c+=8)),(y+=_&(1<<v)-1)>l){t.msg="invalid distance too far back",a.mode=30;break t}if(_>>>=v,c-=v,y>(v=r-s)){if((v=y-v)>d&&a.sane){t.msg="invalid distance too far back",a.mode=30;break t}if(x=0,z=u,0===f){if(x+=h-v,v<k){k-=v;do{S[r++]=u[x++]}while(--v);x=r-y,z=S}}else if(f<v){if(x+=h+f-v,(v-=f)<k){k-=v;do{S[r++]=u[x++]}while(--v);if(x=0,f<k){k-=v=f;do{S[r++]=u[x++]}while(--v);x=r-y,z=S}}}else if(x+=f-v,v<k){k-=v;do{S[r++]=u[x++]}while(--v);x=r-y,z=S}for(;k>2;)S[r++]=z[x++],S[r++]=z[x++],S[r++]=z[x++],k-=3;k&&(S[r++]=z[x++],k>1&&(S[r++]=z[x++]))}else{x=r-y;do{S[r++]=S[x++],S[r++]=S[x++],S[r++]=S[x++],k-=3}while(k>2);k&&(S[r++]=S[x++],k>1&&(S[r++]=S[x++]))}break}}break}}while(n<i&&r<o);n-=k=c>>3,_&=(1<<(c-=k<<3))-1,t.next_in=n,t.next_out=r,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=r<o?o-r+257:257-(r-o),a.hold=_,a.bits=c}},{}],8:[function(t,e,a){var n=t("../utils/common"),i=t("./adler32"),r=t("./crc32"),s=t("./inffast"),o=t("./inftrees"),l=0,h=1,d=2,f=4,u=5,_=6,c=0,g=1,b=2,w=-2,m=-3,p=-4,v=-5,k=8,y=1,x=2,z=3,B=4,S=5,A=6,E=7,C=8,Z=9,O=10,N=11,R=12,U=13,D=14,I=15,T=16,F=17,j=18,L=19,H=20,K=21,M=22,P=23,Y=24,G=25,J=26,X=27,q=28,W=29,Q=30,V=31,$=32,tt=852,et=592,at=15;function nt(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function it(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function rt(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=y,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(tt),e.distcode=e.distdyn=new n.Buf32(et),e.sane=1,e.back=-1,c):w}function st(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,rt(t)):w}function ot(t,e){var a,n;return t&&t.state?(n=t.state,e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?w:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=a,n.wbits=e,st(t))):w}function lt(t,e){var a,n;return t?(n=new it,t.state=n,n.window=null,(a=ot(t,e))!==c&&(t.state=null),a):w}var ht,dt,ft=!0;function ut(t){if(ft){var e;for(ht=new n.Buf32(512),dt=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(o(h,t.lens,0,288,ht,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;o(d,t.lens,0,32,dt,0,t.work,{bits:5}),ft=!1}t.lencode=ht,t.lenbits=9,t.distcode=dt,t.distbits=5}function _t(t,e,a,i){var r,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,e,a-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((r=s.wsize-s.wnext)>i&&(r=i),n.arraySet(s.window,e,a-i,r,s.wnext),(i-=r)?(n.arraySet(s.window,e,a-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=r))),0}a.inflateReset=st,a.inflateReset2=ot,a.inflateResetKeep=rt,a.inflateInit=function(t){return lt(t,at)},a.inflateInit2=lt,a.inflate=function(t,e){var a,tt,et,at,it,rt,st,ot,lt,ht,dt,ft,ct,gt,bt,wt,mt,pt,vt,kt,yt,xt,zt,Bt,St=0,At=new n.Buf8(4),Et=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return w;(a=t.state).mode===R&&(a.mode=U),it=t.next_out,et=t.output,st=t.avail_out,at=t.next_in,tt=t.input,rt=t.avail_in,ot=a.hold,lt=a.bits,ht=rt,dt=st,xt=c;t:for(;;)switch(a.mode){case y:if(0===a.wrap){a.mode=U;break}for(;lt<16;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}if(2&a.wrap&&35615===ot){a.check=0,At[0]=255&ot,At[1]=ot>>>8&255,a.check=r(a.check,At,2,0),ot=0,lt=0,a.mode=x;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&ot)<<8)+(ot>>8))%31){t.msg="incorrect header check",a.mode=Q;break}if((15&ot)!==k){t.msg="unknown compression method",a.mode=Q;break}if(lt-=4,yt=8+(15&(ot>>>=4)),0===a.wbits)a.wbits=yt;else if(yt>a.wbits){t.msg="invalid window size",a.mode=Q;break}a.dmax=1<<yt,t.adler=a.check=1,a.mode=512&ot?O:R,ot=0,lt=0;break;case x:for(;lt<16;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}if(a.flags=ot,(255&a.flags)!==k){t.msg="unknown compression method",a.mode=Q;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=Q;break}a.head&&(a.head.text=ot>>8&1),512&a.flags&&(At[0]=255&ot,At[1]=ot>>>8&255,a.check=r(a.check,At,2,0)),ot=0,lt=0,a.mode=z;case z:for(;lt<32;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}a.head&&(a.head.time=ot),512&a.flags&&(At[0]=255&ot,At[1]=ot>>>8&255,At[2]=ot>>>16&255,At[3]=ot>>>24&255,a.check=r(a.check,At,4,0)),ot=0,lt=0,a.mode=B;case B:for(;lt<16;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}a.head&&(a.head.xflags=255&ot,a.head.os=ot>>8),512&a.flags&&(At[0]=255&ot,At[1]=ot>>>8&255,a.check=r(a.check,At,2,0)),ot=0,lt=0,a.mode=S;case S:if(1024&a.flags){for(;lt<16;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}a.length=ot,a.head&&(a.head.extra_len=ot),512&a.flags&&(At[0]=255&ot,At[1]=ot>>>8&255,a.check=r(a.check,At,2,0)),ot=0,lt=0}else a.head&&(a.head.extra=null);a.mode=A;case A:if(1024&a.flags&&((ft=a.length)>rt&&(ft=rt),ft&&(a.head&&(yt=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),n.arraySet(a.head.extra,tt,at,ft,yt)),512&a.flags&&(a.check=r(a.check,tt,ft,at)),rt-=ft,at+=ft,a.length-=ft),a.length))break t;a.length=0,a.mode=E;case E:if(2048&a.flags){if(0===rt)break t;ft=0;do{yt=tt[at+ft++],a.head&&yt&&a.length<65536&&(a.head.name+=String.fromCharCode(yt))}while(yt&&ft<rt);if(512&a.flags&&(a.check=r(a.check,tt,ft,at)),rt-=ft,at+=ft,yt)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=C;case C:if(4096&a.flags){if(0===rt)break t;ft=0;do{yt=tt[at+ft++],a.head&&yt&&a.length<65536&&(a.head.comment+=String.fromCharCode(yt))}while(yt&&ft<rt);if(512&a.flags&&(a.check=r(a.check,tt,ft,at)),rt-=ft,at+=ft,yt)break t}else a.head&&(a.head.comment=null);a.mode=Z;case Z:if(512&a.flags){for(;lt<16;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}if(ot!==(65535&a.check)){t.msg="header crc mismatch",a.mode=Q;break}ot=0,lt=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=R;break;case O:for(;lt<32;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}t.adler=a.check=nt(ot),ot=0,lt=0,a.mode=N;case N:if(0===a.havedict)return t.next_out=it,t.avail_out=st,t.next_in=at,t.avail_in=rt,a.hold=ot,a.bits=lt,b;t.adler=a.check=1,a.mode=R;case R:if(e===u||e===_)break t;case U:if(a.last){ot>>>=7&lt,lt-=7&lt,a.mode=X;break}for(;lt<3;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}switch(a.last=1&ot,lt-=1,3&(ot>>>=1)){case 0:a.mode=D;break;case 1:if(ut(a),a.mode=H,e===_){ot>>>=2,lt-=2;break t}break;case 2:a.mode=F;break;case 3:t.msg="invalid block type",a.mode=Q}ot>>>=2,lt-=2;break;case D:for(ot>>>=7&lt,lt-=7&lt;lt<32;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}if((65535&ot)!=(ot>>>16^65535)){t.msg="invalid stored block lengths",a.mode=Q;break}if(a.length=65535&ot,ot=0,lt=0,a.mode=I,e===_)break t;case I:a.mode=T;case T:if(ft=a.length){if(ft>rt&&(ft=rt),ft>st&&(ft=st),0===ft)break t;n.arraySet(et,tt,at,ft,it),rt-=ft,at+=ft,st-=ft,it+=ft,a.length-=ft;break}a.mode=R;break;case F:for(;lt<14;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}if(a.nlen=257+(31&ot),ot>>>=5,lt-=5,a.ndist=1+(31&ot),ot>>>=5,lt-=5,a.ncode=4+(15&ot),ot>>>=4,lt-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=Q;break}a.have=0,a.mode=j;case j:for(;a.have<a.ncode;){for(;lt<3;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}a.lens[Et[a.have++]]=7&ot,ot>>>=3,lt-=3}for(;a.have<19;)a.lens[Et[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,zt={bits:a.lenbits},xt=o(l,a.lens,0,19,a.lencode,0,a.work,zt),a.lenbits=zt.bits,xt){t.msg="invalid code lengths set",a.mode=Q;break}a.have=0,a.mode=L;case L:for(;a.have<a.nlen+a.ndist;){for(;St=a.lencode[ot&(1<<a.lenbits)-1],wt=St>>>16&255,mt=65535&St,!((bt=St>>>24)<=lt);){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}if(mt<16)ot>>>=bt,lt-=bt,a.lens[a.have++]=mt;else{if(16===mt){for(Bt=bt+2;lt<Bt;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}if(ot>>>=bt,lt-=bt,0===a.have){t.msg="invalid bit length repeat",a.mode=Q;break}yt=a.lens[a.have-1],ft=3+(3&ot),ot>>>=2,lt-=2}else if(17===mt){for(Bt=bt+3;lt<Bt;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}lt-=bt,yt=0,ft=3+(7&(ot>>>=bt)),ot>>>=3,lt-=3}else{for(Bt=bt+7;lt<Bt;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}lt-=bt,yt=0,ft=11+(127&(ot>>>=bt)),ot>>>=7,lt-=7}if(a.have+ft>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=Q;break}for(;ft--;)a.lens[a.have++]=yt}}if(a.mode===Q)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=Q;break}if(a.lenbits=9,zt={bits:a.lenbits},xt=o(h,a.lens,0,a.nlen,a.lencode,0,a.work,zt),a.lenbits=zt.bits,xt){t.msg="invalid literal/lengths set",a.mode=Q;break}if(a.distbits=6,a.distcode=a.distdyn,zt={bits:a.distbits},xt=o(d,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,zt),a.distbits=zt.bits,xt){t.msg="invalid distances set",a.mode=Q;break}if(a.mode=H,e===_)break t;case H:a.mode=K;case K:if(rt>=6&&st>=258){t.next_out=it,t.avail_out=st,t.next_in=at,t.avail_in=rt,a.hold=ot,a.bits=lt,s(t,dt),it=t.next_out,et=t.output,st=t.avail_out,at=t.next_in,tt=t.input,rt=t.avail_in,ot=a.hold,lt=a.bits,a.mode===R&&(a.back=-1);break}for(a.back=0;St=a.lencode[ot&(1<<a.lenbits)-1],wt=St>>>16&255,mt=65535&St,!((bt=St>>>24)<=lt);){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}if(wt&&0==(240&wt)){for(pt=bt,vt=wt,kt=mt;St=a.lencode[kt+((ot&(1<<pt+vt)-1)>>pt)],wt=St>>>16&255,mt=65535&St,!(pt+(bt=St>>>24)<=lt);){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}ot>>>=pt,lt-=pt,a.back+=pt}if(ot>>>=bt,lt-=bt,a.back+=bt,a.length=mt,0===wt){a.mode=J;break}if(32&wt){a.back=-1,a.mode=R;break}if(64&wt){t.msg="invalid literal/length code",a.mode=Q;break}a.extra=15&wt,a.mode=M;case M:if(a.extra){for(Bt=a.extra;lt<Bt;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}a.length+=ot&(1<<a.extra)-1,ot>>>=a.extra,lt-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=P;case P:for(;St=a.distcode[ot&(1<<a.distbits)-1],wt=St>>>16&255,mt=65535&St,!((bt=St>>>24)<=lt);){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}if(0==(240&wt)){for(pt=bt,vt=wt,kt=mt;St=a.distcode[kt+((ot&(1<<pt+vt)-1)>>pt)],wt=St>>>16&255,mt=65535&St,!(pt+(bt=St>>>24)<=lt);){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}ot>>>=pt,lt-=pt,a.back+=pt}if(ot>>>=bt,lt-=bt,a.back+=bt,64&wt){t.msg="invalid distance code",a.mode=Q;break}a.offset=mt,a.extra=15&wt,a.mode=Y;case Y:if(a.extra){for(Bt=a.extra;lt<Bt;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}a.offset+=ot&(1<<a.extra)-1,ot>>>=a.extra,lt-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=Q;break}a.mode=G;case G:if(0===st)break t;if(ft=dt-st,a.offset>ft){if((ft=a.offset-ft)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=Q;break}ft>a.wnext?(ft-=a.wnext,ct=a.wsize-ft):ct=a.wnext-ft,ft>a.length&&(ft=a.length),gt=a.window}else gt=et,ct=it-a.offset,ft=a.length;ft>st&&(ft=st),st-=ft,a.length-=ft;do{et[it++]=gt[ct++]}while(--ft);0===a.length&&(a.mode=K);break;case J:if(0===st)break t;et[it++]=a.length,st--,a.mode=K;break;case X:if(a.wrap){for(;lt<32;){if(0===rt)break t;rt--,ot|=tt[at++]<<lt,lt+=8}if(dt-=st,t.total_out+=dt,a.total+=dt,dt&&(t.adler=a.check=a.flags?r(a.check,et,dt,it-dt):i(a.check,et,dt,it-dt)),dt=st,(a.flags?ot:nt(ot))!==a.check){t.msg="incorrect data check",a.mode=Q;break}ot=0,lt=0}a.mode=q;case q:if(a.wrap&&a.flags){for(;lt<32;){if(0===rt)break t;rt--,ot+=tt[at++]<<lt,lt+=8}if(ot!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=Q;break}ot=0,lt=0}a.mode=W;case W:xt=g;break t;case Q:xt=m;break t;case V:return p;case $:default:return w}return t.next_out=it,t.avail_out=st,t.next_in=at,t.avail_in=rt,a.hold=ot,a.bits=lt,(a.wsize||dt!==t.avail_out&&a.mode<Q&&(a.mode<X||e!==f))&&_t(t,t.output,t.next_out,dt-t.avail_out),ht-=t.avail_in,dt-=t.avail_out,t.total_in+=ht,t.total_out+=dt,a.total+=dt,a.wrap&&dt&&(t.adler=a.check=a.flags?r(a.check,et,dt,t.next_out-dt):i(a.check,et,dt,t.next_out-dt)),t.data_type=a.bits+(a.last?64:0)+(a.mode===R?128:0)+(a.mode===H||a.mode===I?256:0),(0===ht&&0===dt||e===f)&&xt===c&&(xt=v),xt},a.inflateEnd=function(t){if(!t||!t.state)return w;var e=t.state;return e.window&&(e.window=null),t.state=null,c},a.inflateGetHeader=function(t,e){var a;return t&&t.state?0==(2&(a=t.state).wrap)?w:(a.head=e,e.done=!1,c):w},a.inflateSetDictionary=function(t,e){var a,n=e.length;return t&&t.state?0!==(a=t.state).wrap&&a.mode!==N?w:a.mode===N&&i(1,e,n,0)!==a.check?m:_t(t,e,n,n)?(a.mode=V,p):(a.havedict=1,c):w},a.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(t,e,a){var n=t("../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],r=[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],s=[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],o=[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];e.exports=function(t,e,a,l,h,d,f,u){var _,c,g,b,w,m,p,v,k,y=u.bits,x=0,z=0,B=0,S=0,A=0,E=0,C=0,Z=0,O=0,N=0,R=null,U=0,D=new n.Buf16(16),I=new n.Buf16(16),T=null,F=0;for(x=0;x<=15;x++)D[x]=0;for(z=0;z<l;z++)D[e[a+z]]++;for(A=y,S=15;S>=1&&0===D[S];S--);if(A>S&&(A=S),0===S)return h[d++]=20971520,h[d++]=20971520,u.bits=1,0;for(B=1;B<S&&0===D[B];B++);for(A<B&&(A=B),Z=1,x=1;x<=15;x++)if(Z<<=1,(Z-=D[x])<0)return-1;if(Z>0&&(0===t||1!==S))return-1;for(I[1]=0,x=1;x<15;x++)I[x+1]=I[x]+D[x];for(z=0;z<l;z++)0!==e[a+z]&&(f[I[e[a+z]]++]=z);if(0===t?(R=T=f,m=19):1===t?(R=i,U-=257,T=r,F-=257,m=256):(R=s,T=o,m=-1),N=0,z=0,x=B,w=d,E=A,C=0,g=-1,b=(O=1<<A)-1,1===t&&O>852||2===t&&O>592)return 1;for(;;){p=x-C,f[z]<m?(v=0,k=f[z]):f[z]>m?(v=T[F+f[z]],k=R[U+f[z]]):(v=96,k=0),_=1<<x-C,B=c=1<<E;do{h[w+(N>>C)+(c-=_)]=p<<24|v<<16|k|0}while(0!==c);for(_=1<<x-1;N&_;)_>>=1;if(0!==_?(N&=_-1,N+=_):N=0,z++,0==--D[x]){if(x===S)break;x=e[a+f[z]]}if(x>A&&(N&b)!==g){for(0===C&&(C=A),w+=B,Z=1<<(E=x-C);E+C<S&&!((Z-=D[E+C])<=0);)E++,Z<<=1;if(O+=1<<E,1===t&&O>852||2===t&&O>592)return 1;h[g=N&b]=A<<24|E<<16|w-d|0}}return 0!==N&&(h[w+N]=x-C<<24|64<<16|0),u.bits=A,0}},{"../utils/common":1}],10:[function(t,e,a){e.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(t,e,a){e.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(t,e,a){var n=t("./zlib/inflate"),i=t("./utils/common"),r=t("./utils/strings"),s=t("./zlib/constants"),o=t("./zlib/messages"),l=t("./zlib/zstream"),h=t("./zlib/gzheader"),d=Object.prototype.toString;function f(t){if(!(this instanceof f))return new f(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var a=n.inflateInit2(this.strm,e.windowBits);if(a!==s.Z_OK)throw new Error(o[a]);if(this.header=new h,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=r.string2buf(e.dictionary):"[object ArrayBuffer]"===d.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=n.inflateSetDictionary(this.strm,e.dictionary))!==s.Z_OK))throw new Error(o[a])}function u(t,e){var a=new f(e);if(a.push(t,!0),a.err)throw a.msg||o[a.err];return a.result}f.prototype.push=function(t,e){var a,o,l,h,f,u=this.strm,_=this.options.chunkSize,c=this.options.dictionary,g=!1;if(this.ended)return!1;o=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?u.input=r.binstring2buf(t):"[object ArrayBuffer]"===d.call(t)?u.input=new Uint8Array(t):u.input=t,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new i.Buf8(_),u.next_out=0,u.avail_out=_),(a=n.inflate(u,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&c&&(a=n.inflateSetDictionary(this.strm,c)),a===s.Z_BUF_ERROR&&!0===g&&(a=s.Z_OK,g=!1),a!==s.Z_STREAM_END&&a!==s.Z_OK)return this.onEnd(a),this.ended=!0,!1;u.next_out&&(0!==u.avail_out&&a!==s.Z_STREAM_END&&(0!==u.avail_in||o!==s.Z_FINISH&&o!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=r.utf8border(u.output,u.next_out),h=u.next_out-l,f=r.buf2string(u.output,l),u.next_out=h,u.avail_out=_-h,h&&i.arraySet(u.output,u.output,l,h,0),this.onData(f)):this.onData(i.shrinkBuf(u.output,u.next_out)))),0===u.avail_in&&0===u.avail_out&&(g=!0)}while((u.avail_in>0||0===u.avail_out)&&a!==s.Z_STREAM_END);return a===s.Z_STREAM_END&&(o=s.Z_FINISH),o===s.Z_FINISH?(a=n.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===s.Z_OK):o!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),u.avail_out=0,!0)},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Inflate=f,a.inflate=u,a.inflateRaw=function(t,e){return(e=e||{}).raw=!0,u(t,e)},a.ungzip=u},{"./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;return t.pack=function(t){var a=e({},t,{v:"v1"});return i(JSON.stringify(a),{to:"string"})},t.unpack=function(t){if("string"!=typeof t)return t;try{if((e=JSON.parse(t)).timestamp)return e}catch(t){}try{var e;if("v1"===(e=JSON.parse(r(t,{to:"string"}))).v)return e;throw new Error("These events were packed with packer "+e.v+" which is incompatible with current packer v1.")}catch(t){throw console.error(t),new Error("Unknown data format.")}},t}({});
//# sourceMappingURL=rrweb-packer.min.js.map

@@ -1,2 +0,2 @@

var rrweb=function(e){"use strict";var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(){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 a=1,s=RegExp("[^a-z1-6]");function c(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)?c(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var l=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,u=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,d=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function f(e,t){return(e||"").replace(l,function(e,n,r,o){var i,a=n||r||o;if(!a)return e;if(!u.test(a))return"url('"+a+"')";if(d.test(a))return"url("+a+")";if("/"===a[0])return"url('"+(((i=t).indexOf("//")>-1?i.split("/").slice(0,3).join("/"):i.split("/")[0]).split("?")[0]+a)+"')";var s=t.split("/"),c=a.split("/");s.pop();for(var l=0,f=c;l<f.length;l++){var p=f[l];"."!==p&&(".."===p?s.pop():s.push(p))}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 h(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?f(n,location.href):n}function m(e,n,r,o,i){switch(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 a=!1;"string"==typeof r?a=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(a=!0)});for(var l=function(e){var t=e.toLowerCase().trim();return s.test(t)?"div":t}(e.tagName),u={},d=0,p=Array.from(e.attributes);d<p.length;d++){var m=p[d],v=m.name,y=m.value;u[v]=h(n,v,y)}if("link"===l&&o){var g,b=Array.from(n.styleSheets).find(function(t){return t.href===e.href});(g=c(b))&&(delete u.rel,delete u.href,u._cssText=f(g,b.href))}if("style"===l&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(g=c(e.sheet))&&(u._cssText=f(g,location.href));if("input"===l||"textarea"===l||"select"===l){y=e.value;"radio"!==u.type&&"checkbox"!==u.type&&y?u.value=i?"*".repeat(y.length):y:e.checked&&(u.checked=e.checked)}if("option"===l){var E=e.parentElement;u.value===E.value&&(u.selected=e.selected)}if("canvas"===l&&(u.rr_dataURL=e.toDataURL()),"audio"!==l&&"video"!==l||(u.rr_mediaState=e.paused?"paused":"played"),a){var S=e.getBoundingClientRect(),w=S.width,I=S.height;u.rr_width=w+"px",u.rr_height=I+"px"}return{type:t.Element,tagName:l,attributes:u,childNodes:[],isSVG:(x=e,"svg"===x.tagName||x instanceof SVGElement||void 0),needBlock:a};case e.TEXT_NODE:var T=e.parentNode&&e.parentNode.tagName,C=e.textContent,N="STYLE"===T||void 0;return N&&C&&(C=f(C,location.href)),"SCRIPT"===T&&(C="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:C||"",isStyle:N};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 x}function v(e,n,r,o,i,s,c){void 0===i&&(i=!1),void 0===s&&(s=!0),void 0===c&&(c=!1);var l,u=m(e,n,o,s,c);if(!u)return console.warn(e,"not serialized"),null;l="__sn"in e?e.__sn.id:a++;var d=Object.assign(u,{id:l});e.__sn=d,r[l]=e;var f=!i;if(d.type===t.Element&&(f=f&&!d.needBlock,delete d.needBlock),(d.type===t.Document||d.type===t.Element)&&f)for(var p=0,h=Array.from(e.childNodes);p<h.length;p++){var y=v(h[p],n,r,o,i,s,c);y&&d.childNodes.push(y)}return d}var y=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function g(e,t){void 0===t&&(t={});var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=-1===o?r+e.length:e.length-o}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),p(),t}}var a=function(){return function(e){this.start=e,this.end={line:n,column:r},this.source=t.source}}();a.prototype.content=e;var s=[];function c(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;s.push(i)}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,n=[];for(p(),h(n);e.length&&"}"!==e.charAt(0)&&(t=x()||M());)!1!==t&&(n.push(t),h(n));return n}function f(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function p(){f(/^\s*/)}function h(e){var t;for(void 0===e&&(e=[]);t=m();)!1!==t&&e.push(t),t=m();return e}function m(){var t=i();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 c("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function v(){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 g(){var e=i(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=b(t[0]);if(!f(/^:\s*/))return c("property missing ':'");var r=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(y,""),value:r?b(r[0]).replace(y,""):""});return f(/^[;\s]*/),o}}function E(){var e,t=[];if(!l())return c("missing '{'");for(h(t);e=g();)!1!==e&&(t.push(e),h(t)),e=g();return u()?t:c("missing '}'")}function S(){for(var e,t=[],n=i();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:E()})}var w,I=N("import"),T=N("charset"),C=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=f(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function x(){if("@"===e[0])return function(){var e=i(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=f(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=t[1];if(!l())return c("@keyframes missing '{'");for(var a=h();r=S();)a.push(r),a=a.concat(h());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):c("@keyframes missing '}'")}}()||function(){var e=i(),t=f(/^@media *([^{]+)/);if(t){var n=b(t[1]);if(!l())return c("@media missing '{'");var r=h().concat(d());return u()?e({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var e=i(),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=i(),t=f(/^@supports *([^{]+)/);if(t){var n=b(t[1]);if(!l())return c("@supports missing '{'");var r=h().concat(d());return u()?e({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||I()||T()||C()||function(){var e=i(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=b(t[1]),r=b(t[2]);if(!l())return c("@document missing '{'");var o=h().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var e=i();if(f(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var n,r=h();n=g();)r.push(n),r=r.concat(h());return u()?e({type:"page",selectors:t,declarations:r}):c("@page missing '}'")}}()||function(){var e=i();if(f(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=h().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=i();if(f(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,n=h();t=g();)n.push(t),n=n.concat(h());return u()?e({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function M(){var e=i(),t=v();return t?(h(),e({type:"rule",selectors:t,declarations:E()})):c("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type;var o=r?t:n;for(var i=0,a=Object.keys(t);i<a.length;i++){var s=a[i],c=t[s];Array.isArray(c)?c.forEach(function(t){e(t,o)}):c&&"object"==typeof c&&e(c,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((w=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:w,parsingErrors:s}}))}function b(e){return e?e.replace(/^\s+|\s+$/g,""):""}var E={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 S=/([^\\]):hover/g;function w(e){var t=g(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(S.test(t)){var n=t.replace(S,"$1.\\:hover");e=e.replace(t,t+", "+n)}})}),e):e}function I(e,n,r){switch(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 o,i=function(e){var t=E[e.tagName]?E[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);o=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",i):n.createElement(i);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===i&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=o.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(o.style.width=a),"rr_height"===t&&(o.style.height=a),"rr_mediaState"===t)switch(a){case"played":o.play();case"paused":o.pause()}}else{var c="textarea"===i&&"value"===t,l="style"===i&&"_cssText"===t;if(l&&r&&(a=w(a)),c||l){for(var u=n.createTextNode(a),d=0,f=Array.from(o.childNodes);d<f.length;d++){var p=f[d];p.nodeType===o.TEXT_NODE&&o.removeChild(p)}return o.appendChild(u),"continue"}if("iframe"===i&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?o.setAttributeNS("http://www.w3.org/1999/xlink",t,a):o.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return o;case t.Text:return n.createTextNode(e.isStyle&&r?w(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function T(e,n,r,o,i){void 0===o&&(o=!1),void 0===i&&(i=!0);var a=I(e,n,i);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,r[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!o)for(var s=0,c=e.childNodes;s<c.length;s++){var l=c[s],u=T(l,n,r,!1,i);u?a.appendChild(u):console.warn("Failed to rebuild",l)}return a}function C(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)}}var N,x,M,k,R,D={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return D.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete D.map[t],e.childNodes&&e.childNodes.forEach(function(e){return D.removeNodeFromMap(e)})},has:function(e){return D.map.hasOwnProperty(e)}};function A(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),c=this,l=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(c,l)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,l)},s))}}function L(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function O(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function _(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(n=!0)}),n||_(e.parentNode,t)}return _(e.parentNode,t)}function F(e){return Boolean(e.changedTouches)}function B(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function P(e,t){e.delete(t),t.childNodes.forEach(function(t){return P(e,t)})}function j(e,t){var n=t.parentNode;if(!n)return!1;var r=D.getId(n);return!!e.some(function(e){return e.id===r})||j(e,n)}function z(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||z(e,n))}(N=e.EventType||(e.EventType={}))[N.DomContentLoaded=0]="DomContentLoaded",N[N.Load=1]="Load",N[N.FullSnapshot=2]="FullSnapshot",N[N.IncrementalSnapshot=3]="IncrementalSnapshot",N[N.Meta=4]="Meta",N[N.Custom=5]="Custom",(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",(M=e.MouseInteractions||(e.MouseInteractions={}))[M.MouseUp=0]="MouseUp",M[M.MouseDown=1]="MouseDown",M[M.Click=2]="Click",M[M.ContextMenu=3]="ContextMenu",M[M.DblClick=4]="DblClick",M[M.Focus=5]="Focus",M[M.Blur=6]="Blur",M[M.TouchStart=7]="TouchStart",M[M.TouchMove_Departed=8]="TouchMove_Departed",M[M.TouchEnd=9]="TouchEnd",function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(k||(k={})),(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";var X=function(e,t){return e+"@"+t};function H(e){return"__sn"in e}function U(e,t,n,o){var i=new MutationObserver(function(i){var a,s,c,l,u=[],d=[],f=[],p=[],m=new Set,y=new Set,g=new Set,b={},E=function(e,n){if(!_(e,t)){if(H(e)){y.add(e);var r=null;n&&H(n)&&(r=n.__sn.id),r&&(b[X(e.__sn.id,r)]=!0)}else m.add(e),g.delete(e);e.childNodes.forEach(function(e){return E(e)})}};i.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,i=e.addedNodes,a=e.removedNodes,s=e.attributeName;switch(n){case"characterData":var c=r.textContent;_(r,t)||c===o||u.push({value:c,node:r});break;case"attributes":c=r.getAttribute(s);if(_(r,t)||c===o)return;var l=d.find(function(e){return e.node===r});l||(l={node:r,attributes:{}},d.push(l)),l.attributes[s]=h(document,s,c);break;case"childList":i.forEach(function(e){return E(e,r)}),a.forEach(function(e){var n=D.getId(e),o=D.getId(r);_(e,t)||(m.has(e)?(P(m,e),g.add(e)):m.has(r)&&-1===n||function e(t){var n=D.getId(t);return!D.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(y.has(e)&&b[X(n,o)]?P(y,e):f.push({parentId:o,id:n})),D.removeNodeFromMap(e))})}});var S=[],w=function(e){var r=D.getId(e.parentNode);if(-1===r)return S.push(e);p.push({parentId:r,previousId:e.previousSibling?D.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?D.getId(e.nextSibling):e.nextSibling,node:v(e,document,D.map,t,!0,n,o)})};try{for(var I=r(y),T=I.next();!T.done;T=I.next()){w(x=T.value)}}catch(e){a={error:e}}finally{try{T&&!T.done&&(s=I.return)&&s.call(I)}finally{if(a)throw a.error}}try{for(var C=r(m),N=C.next();!N.done;N=C.next()){var x=N.value;z(g,x)||j(f,x)?z(y,x)?w(x):g.add(x):w(x)}}catch(e){c={error:e}}finally{try{N&&!N.done&&(l=C.return)&&l.call(C)}finally{if(c)throw c.error}}for(;S.length&&!S.every(function(e){return-1===D.getId(e.parentNode)});)w(S.shift());var M={texts:u.map(function(e){return{id:D.getId(e.node),value:e.value}}).filter(function(e){return D.has(e.id)}),attributes:d.map(function(e){return{id:D.getId(e.node),attributes:e.attributes}}).filter(function(e){return D.has(e.id)}),removes:f,adds:p};(M.texts.length||M.attributes.length||M.removes.length||M.adds.length)&&e(M)});return i.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Y(t,n){var r=[];return Object.keys(e.MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(o){var i=o.toLowerCase(),a=function(r){return function(o){if(!_(o.target,n)){var i=D.getId(o.target),a=F(o)?o.changedTouches[0]:o,s=a.clientX,c=a.clientY;t({type:e.MouseInteractions[r],id:i,x:s,y:c})}}}(o);r.push(C(i,a))}),function(){r.forEach(function(e){return e()})}}var V,W=["INPUT","TEXTAREA","SELECT"],G=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],q=new WeakMap;function $(e,t,r,o){function a(e){var n=e.target;if(n&&n.tagName&&!(W.indexOf(n.tagName)<0)&&!_(n,t)){var i=n.type;if("password"!==i&&!n.classList.contains(r)){var a=n.value,c=!1,l=G.includes(i)||"TEXTAREA"===n.tagName;"radio"===i||"checkbox"===i?c=n.checked:l&&o&&(a="*".repeat(a.length)),s(n,{text:a,isChecked:c});var u=n.name;"radio"===i&&u&&c&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==n&&s(e,{text:e.value,isChecked:!c})})}}}function s(t,r){var o=q.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){q.set(t,r);var i=D.getId(t);e(n({},r,{id:i}))}}var c=["input","change"].map(function(e){return C(e,a)}),l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return l&&l.set&&c.push.apply(c,i(u.map(function(e){return function e(t,n,r,o){var i=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),i&&i.set&&i.set.call(this,e)}}),function(){return e(t,n,i||{},!0)}}(e[0],e[1],{set:function(){a({target:this})}})}))),function(){c.forEach(function(e){return e()})}}function Z(t,n){void 0===n&&(n={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,s=e.viewportResizeCb,c=e.inputCb,l=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,i(e)),n.apply(void 0,i(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,i(e)),r.apply(void 0,i(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,i(e)),o.apply(void 0,i(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,i(e)),a.apply(void 0,i(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,i(e)),s.apply(void 0,i(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,i(e)),c.apply(void 0,i(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,i(e)),l.apply(void 0,i(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,i(e)),u.apply(void 0,i(e))}}(t,n);var r,o,a,s,c,l,u,d=U(t.mutationCb,t.blockClass,t.inlineStylesheet,t.maskAllInputs),f=(r=t.mousemoveCb,o=t.mousemoveWait,s=[],c=A(function(t){var n=Date.now()-a;r(s.map(function(e){return e.timeOffset-=n,e}),t?e.IncrementalSource.TouchMove:e.IncrementalSource.MouseMove),s=[],a=null},500),l=A(function(e){var t=e.target,n=F(e)?e.changedTouches[0]:e,r=n.clientX,o=n.clientY;a||(a=Date.now()),s.push({x:r,y:o,id:D.getId(t),timeOffset:Date.now()-a}),c(F(e))},o,{trailing:!1}),u=[C("mousemove",l),C("touchmove",l)],function(){u.forEach(function(e){return e()})}),p=Y(t.mouseInteractionCb,t.blockClass),h=function(e,t){return C("scroll",A(function(n){if(n.target&&!_(n.target,t)){var r=D.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}(t.scrollCb,t.blockClass),m=function(e){return C("resize",A(function(){var t=L(),n=O();e({width:Number(n),height:Number(t)})},200),window)}(t.viewportResizeCb),v=$(t.inputCb,t.blockClass,t.ignoreClass,t.maskAllInputs),y=function(e,t){var n=function(n){return function(r){var o=r.target;o&&!_(o,t)&&e({type:"play"===n?k.Play:k.Pause,id:D.getId(o)})}},r=[C("play",n("play")),C("pause",n("pause"))];return function(){r.forEach(function(e){return e()})}}(t.mediaInteractionCb,t.blockClass),g=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,r){var o=D.getId(this.ownerNode);return-1!==o&&e({id:o,adds:[{rule:n,index:r}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var r=D.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);return function(){d.disconnect(),f(),p(),h(),m(),v(),y(),g()}}function J(e){return n({},e,{timestamp:Date.now()})}function K(t){void 0===t&&(t={});var r,i=t.emit,a=t.checkoutEveryNms,s=t.checkoutEveryNth,c=t.blockClass,l=void 0===c?"rr-block":c,u=t.ignoreClass,d=void 0===u?"rr-ignore":u,f=t.inlineStylesheet,p=void 0===f||f,h=t.maskAllInputs,m=void 0!==h&&h,y=t.hooks,g=t.mousemoveWait,b=void 0===g?50:g;if(!i)throw new Error("emit function is required");B();var E=0;function S(t){void 0===t&&(t=!1),V(J({type:e.EventType.Meta,data:{href:window.location.href,width:O(),height:L()}}),t);var n=o(function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[v(e,e,o,t,!1,n,r),o]}(document,l,p,m),2),r=n[0],i=n[1];if(!r)return console.warn("Failed to snapshot the document");D.map=i,V(J({type:e.EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}V=function(t,n){if(i(t,n),t.type===e.EventType.FullSnapshot)r=t,E=0;else if(t.type===e.EventType.IncrementalSnapshot){E++;var o=s&&E>=s,c=a&&t.timestamp-r.timestamp>a;(o||c)&&S(!0)}};try{var w=[];w.push(C("DOMContentLoaded",function(){V(J({type:e.EventType.DomContentLoaded,data:{}}))}));var I=function(){S(),w.push(Z({mutationCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Mutation},t)}))},mousemoveCb:function(t,n){return V(J({type:e.EventType.IncrementalSnapshot,data:{source:n,positions:t}}))},mouseInteractionCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Scroll},t)}))},viewportResizeCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Input},t)}))},mediaInteractionCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MediaInteraction},t)}))},styleSheetRuleCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.StyleSheetRule},t)}))},blockClass:l,ignoreClass:d,maskAllInputs:m,inlineStylesheet:p,mousemoveWait:b},y))};return"interactive"===document.readyState||"complete"===document.readyState?I():w.push(C("load",function(){V(J({type:e.EventType.Load,data:{}})),I()},window)),function(){w.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function Q(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)})}}}K.addCustomEvent=function(t,n){if(!V)throw new Error("please add custom event after start recording");V(J({type:e.EventType.Custom,data:{tag:t,payload:n}}))};var ee=Object.freeze({default:Q});var te,ne=(function(e,t){!function(){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,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||c,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.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):h.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;h.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=function(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function c(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 u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=u(e,"Y")&&d(e,"Y"),n=u(e,"X")&&d(e,"X");return t||n}function p(t){var n,r,i,s,c=(a()-t.startTime)/o;s=c=c>1?1:c,n=.5*(1-Math.cos(Math.PI*s)),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(p.bind(e,t))}function h(n,r,o){var s,l,u,d,f=a();n===t.body?(s=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=n,l=n.scrollLeft,u=n.scrollTop,d=c),p({scrollable:s,method:d,startTime:f,startX:l,startY:u,x:r,y:o})}}}}()}(te={exports:{}},te.exports),te.exports).polyfill,re=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,i(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 o(i){for(r.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||r.config.liveMode)&&(r.raf=requestAnimationFrame(o))})},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}(),oe=Q||ee,ie=function(){function t(e,t){if(this.events=[],this.emitter=oe(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var n={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0};this.config=Object.assign({},n,t),this.timer=new re(this.config),ne(),B(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return t.prototype.on=function(e,t){this.emitter.on(e,t)},t.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},t.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},t.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},t.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},t.prototype.play=function(t){var n,o,i=this;void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;var a=new Array,s=function(t){var n=t.timestamp<c.baselineTime,r=c.getCastFn(t,n);n?r():a.push({doAction:function(){r(),i.emitter.emit(e.ReplayerEvents.EventCast,t)},delay:c.getDelay(t)})},c=this;try{for(var l=r(this.events),u=l.next();!u.done;u=l.next()){s(u.value)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}this.timer.addActions(a),this.timer.start(),this.emitter.emit(e.ReplayerEvents.Start)},t.prototype.pause=function(){this.timer.clear(),this.emitter.emit(e.ReplayerEvents.Pause)},t.prototype.resume=function(t){var n,o;void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;var i=new Array;try{for(var a=r(this.events),s=a.next();!s.done;s=a.next()){var c=s.value;if(!(c.timestamp<=this.lastPlayedEvent.timestamp||c===this.lastPlayedEvent)){var l=this.getCastFn(c);i.push({doAction:l,delay:this.getDelay(c)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}this.timer.addActions(i),this.timer.start(),this.emitter.emit(e.ReplayerEvents.Resume)},t.prototype.addEvent=function(e){this.getCastFn(e,!0)()},t.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},t.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},t.prototype.getDelay=function(t){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var n=t.data.positions[0].timeOffset,r=t.timestamp+n;return t.delay=r-this.baselineTime,r-this.baselineTime}return t.delay=t.timestamp-this.baselineTime,t.timestamp-this.baselineTime},t.prototype.getCastFn=function(t,n){var o,i=this;switch(void 0===n&&(n=!1),t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Meta:o=function(){return i.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:o=function(){i.rebuildFullSnapshot(t),i.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:o=function(){var o,a;if(i.applyIncremental(t,n),t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.restoreSpeed()),i.config.skipInactive&&!i.nextUserInteractionEvent){try{for(var s=r(i.events),c=s.next();!c.done;c=s.next()){var l=c.value;if(!(l.timestamp<=t.timestamp)&&i.isUserInteraction(l)){l.delay-t.delay>1e4*i.config.speed&&(i.nextUserInteractionEvent=l);break}}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}if(i.nextUserInteractionEvent){i.noramlSpeed=i.config.speed;var u=i.nextUserInteractionEvent.delay-t.delay,d={speed:Math.min(Math.round(u/5e3),360)};i.setConfig(d),i.emitter.emit(e.ReplayerEvents.SkipStart,d)}}}}return function(){o&&o(),i.lastPlayedEvent=t,t===i.events[i.events.length-1]&&(i.restoreSpeed(),i.emitter.emit(e.ReplayerEvents.Finish))}},t.prototype.rebuildFullSnapshot=function(t){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},D.map=function(e,t,n){void 0===n&&(n=!0);var r={};return[T(e,t,r,!1,n),r]}(t.data.node,this.iframe.contentDocument)[1];var n=document.createElement("style"),r=this.iframe.contentDocument,o=r.documentElement,i=r.head;o.insertBefore(n,i);for(var a,s=(a=this.config.blockClass,["iframe, ."+a+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),c=0;c<s.length;c++)n.sheet.insertRule(s[c],c);this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},t.prototype.waitForStylesheetLoad=function(){var t=this,n=this.iframe.contentDocument.head;if(n){var r,o=new Set;n.querySelectorAll('link[rel="stylesheet"]').forEach(function(n){n.sheet||(0===o.size&&(t.pause(),t.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),r=window.setTimeout(function(){t.resume(t.getCurrentTime()),r=-1},t.config.loadTimeout)),o.add(n),n.addEventListener("load",function(){o.delete(n),0===o.size&&-1!==r&&(t.resume(t.getCurrentTime()),t.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))}))})}},t.prototype.applyIncremental=function(t,r){var o=this,i=t.data;switch(i.source){case e.IncrementalSource.Mutation:i.removes.forEach(function(e){var t=D.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);var n=D.getNode(e.parentId);if(!n)return o.warnNodeNotFound(i,e.parentId);D.removeNodeFromMap(t),n&&n.removeChild(t)});var a=n({},this.missingNodeRetryMap),s=[],c=function(e){var t=D.getNode(e.parentId);if(!t)return s.push(e);var n=T(e.node,o.iframe.contentDocument,D.map,!0),r=null,i=null;e.previousId&&(r=D.getNode(e.previousId)),e.nextId&&(i=D.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(r&&r.nextSibling&&r.nextSibling.parentNode?t.insertBefore(n,r.nextSibling):i&&i.parentNode?t.contains(i)?t.insertBefore(n,i):t.insertBefore(n,null):t.appendChild(n),(e.previousId||e.nextId)&&o.resolveMissingNode(a,t,n,e)):a[e.node.id]={node:n,mutation:e}};for(i.adds.forEach(function(e){c(e)});s.length;){if(s.every(function(e){return!Boolean(D.getNode(e.parentId))}))return s.forEach(function(e){return o.warnNodeNotFound(i,e.node.id)});var l=s.shift();c(l)}Object.keys(a).length&&Object.assign(this.missingNodeRetryMap,a),i.texts.forEach(function(e){var t=D.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);t.textContent=e.value}),i.attributes.forEach(function(e){var t=D.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);for(var n in e.attributes)if("string"==typeof n){var r=e.attributes[n];null!==r?t.setAttribute(n,r):t.removeAttribute(n)}});break;case e.IncrementalSource.MouseMove:if(r){var u=i.positions[i.positions.length-1];this.moveAndHover(i,u.x,u.y,u.id)}else i.positions.forEach(function(e){var n={doAction:function(){o.moveAndHover(i,e.x,e.y,e.id)},delay:e.timeOffset+t.timestamp-o.baselineTime};o.timer.addAction(n)});break;case e.IncrementalSource.MouseInteraction:if(-1===i.id)break;var d=new Event(e.MouseInteractions[i.type].toLowerCase());if(!(h=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:i.type,target:h});var f=this.config.triggerFocus;switch(i.type){case e.MouseInteractions.Blur:h.blur&&h.blur();break;case e.MouseInteractions.Focus:f&&h.focus&&h.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:r||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:h.dispatchEvent(d)}break;case e.IncrementalSource.Scroll:if(-1===i.id)break;if(!(h=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);if(h===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:i.y,left:i.x,behavior:r?"auto":"smooth"});else try{h.scrollTop=i.y,h.scrollLeft=i.x}catch(e){}break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:i.width,height:i.height});break;case e.IncrementalSource.Input:if(-1===i.id)break;if(!(h=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);try{h.checked=i.isChecked,h.value=i.text}catch(e){}break;case e.IncrementalSource.MediaInteraction:if(!(h=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var p=h;i.type===k.Pause&&p.pause(),i.type===k.Play&&(p.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?p.play():p.addEventListener("canplay",function(){p.play()}));break;case e.IncrementalSource.StyleSheetRule:var h;if(!(h=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var m=h.sheet;i.adds&&i.adds.forEach(function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,m.rules.length);try{m.insertRule(t,r)}catch(e){}}),i.removes&&i.removes.forEach(function(e){var t=e.index;m.deleteRule(t)})}},t.prototype.resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}if(s){var d=s;l=d.node,u=d.mutation;t.insertBefore(l,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}},t.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var o=D.getNode(r);if(!o)return this.debugNodeNotFound(e,r);this.hoverElements(o)},t.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList&&t.classList.add(":hover"),t=t.parentElement},t.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},t.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var t={speed:this.noramlSpeed};this.setConfig(t),this.emitter.emit(e.ReplayerEvents.SkipEnd,t),this.noramlSpeed=-1}},t.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},t.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},t}(),ae=K.addCustomEvent;return e.record=K,e.addCustomEvent=ae,e.Replayer=ie,e.mirror=D,e}({});
var rrweb=function(e){"use strict";var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(){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 a=1,s=RegExp("[^a-z1-6]");function l(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)?l(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var c=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,u=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,d=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function f(e,t){return(e||"").replace(c,function(e,n,r,o){var i,a=n||r||o;if(!a)return e;if(!u.test(a))return"url('"+a+"')";if(d.test(a))return"url("+a+")";if("/"===a[0])return"url('"+(((i=t).indexOf("//")>-1?i.split("/").slice(0,3).join("/"):i.split("/")[0]).split("?")[0]+a)+"')";var s=t.split("/"),l=a.split("/");s.pop();for(var c=0,f=l;c<f.length;c++){var p=f[c];"."!==p&&(".."===p?s.pop():s.push(p))}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 h(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?f(n,location.href):n}function m(e,n,r,o,i){switch(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 a=!1;"string"==typeof r?a=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(a=!0)});for(var c=function(e){var t=e.toLowerCase().trim();return s.test(t)?"div":t}(e.tagName),u={},d=0,p=Array.from(e.attributes);d<p.length;d++){var m=p[d],v=m.name,y=m.value;u[v]=h(n,v,y)}if("link"===c&&o){var g,b=Array.from(n.styleSheets).find(function(t){return t.href===e.href});(g=l(b))&&(delete u.rel,delete u.href,u._cssText=f(g,b.href))}if("style"===c&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(g=l(e.sheet))&&(u._cssText=f(g,location.href));if("input"===c||"textarea"===c||"select"===c){y=e.value;"radio"!==u.type&&"checkbox"!==u.type&&y?u.value=i?"*".repeat(y.length):y:e.checked&&(u.checked=e.checked)}if("option"===c){var E=e.parentElement;u.value===E.value&&(u.selected=e.selected)}if("canvas"===c&&(u.rr_dataURL=e.toDataURL()),"audio"!==c&&"video"!==c||(u.rr_mediaState=e.paused?"paused":"played"),a){var S=e.getBoundingClientRect(),w=S.width,I=S.height;u.rr_width=w+"px",u.rr_height=I+"px"}return{type:t.Element,tagName:c,attributes:u,childNodes:[],isSVG:(x=e,"svg"===x.tagName||x instanceof SVGElement||void 0),needBlock:a};case e.TEXT_NODE:var T=e.parentNode&&e.parentNode.tagName,C=e.textContent,N="STYLE"===T||void 0;return N&&C&&(C=f(C,location.href)),"SCRIPT"===T&&(C="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:C||"",isStyle:N};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 x}function v(e,n,r,o,i,s,l){void 0===i&&(i=!1),void 0===s&&(s=!0),void 0===l&&(l=!1);var c,u=m(e,n,o,s,l);if(!u)return console.warn(e,"not serialized"),null;c="__sn"in e?e.__sn.id:a++;var d=Object.assign(u,{id:c});e.__sn=d,r[c]=e;var f=!i;if(d.type===t.Element&&(f=f&&!d.needBlock,delete d.needBlock),(d.type===t.Document||d.type===t.Element)&&f)for(var p=0,h=Array.from(e.childNodes);p<h.length;p++){var y=v(h[p],n,r,o,i,s,l);y&&d.childNodes.push(y)}return d}var y=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function g(e,t){void 0===t&&(t={});var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=-1===o?r+e.length:e.length-o}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),p(),t}}var a=function(){return function(e){this.start=e,this.end={line:n,column:r},this.source=t.source}}();a.prototype.content=e;var s=[];function l(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;s.push(i)}function c(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,n=[];for(p(),h(n);e.length&&"}"!==e.charAt(0)&&(t=x()||M());)!1!==t&&(n.push(t),h(n));return n}function f(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function p(){f(/^\s*/)}function h(e){var t;for(void 0===e&&(e=[]);t=m();)!1!==t&&e.push(t),t=m();return e}function m(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return l("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function v(){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 g(){var e=i(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=b(t[0]);if(!f(/^:\s*/))return l("property missing ':'");var r=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(y,""),value:r?b(r[0]).replace(y,""):""});return f(/^[;\s]*/),o}}function E(){var e,t=[];if(!c())return l("missing '{'");for(h(t);e=g();)!1!==e&&(t.push(e),h(t)),e=g();return u()?t:l("missing '}'")}function S(){for(var e,t=[],n=i();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:E()})}var w,I=N("import"),T=N("charset"),C=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=f(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function x(){if("@"===e[0])return function(){var e=i(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=f(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,o=t[1];if(!c())return l("@keyframes missing '{'");for(var a=h();r=S();)a.push(r),a=a.concat(h());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):l("@keyframes missing '}'")}}()||function(){var e=i(),t=f(/^@media *([^{]+)/);if(t){var n=b(t[1]);if(!c())return l("@media missing '{'");var r=h().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=i(),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=i(),t=f(/^@supports *([^{]+)/);if(t){var n=b(t[1]);if(!c())return l("@supports missing '{'");var r=h().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||I()||T()||C()||function(){var e=i(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=b(t[1]),r=b(t[2]);if(!c())return l("@document missing '{'");var o=h().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=i();if(f(/^@page */)){var t=v()||[];if(!c())return l("@page missing '{'");for(var n,r=h();n=g();)r.push(n),r=r.concat(h());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=i();if(f(/^@host\s*/)){if(!c())return l("@host missing '{'");var t=h().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=i();if(f(/^@font-face\s*/)){if(!c())return l("@font-face missing '{'");for(var t,n=h();t=g();)n.push(t),n=n.concat(h());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}function M(){var e=i(),t=v();return t?(h(),e({type:"rule",selectors:t,declarations:E()})):l("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type;var o=r?t:n;for(var i=0,a=Object.keys(t);i<a.length;i++){var s=a[i],l=t[s];Array.isArray(l)?l.forEach(function(t){e(t,o)}):l&&"object"==typeof l&&e(l,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((w=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:w,parsingErrors:s}}))}function b(e){return e?e.replace(/^\s+|\s+$/g,""):""}var E={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 S=/([^\\]):hover/g;function w(e){var t=g(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(S.test(t)){var n=t.replace(S,"$1.\\:hover");e=e.replace(t,t+", "+n)}})}),e):e}function I(e,n,r){switch(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 o,i=function(e){var t=E[e.tagName]?E[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);o=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",i):n.createElement(i);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===i&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=o.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(o.style.width=a),"rr_height"===t&&(o.style.height=a),"rr_mediaState"===t)switch(a){case"played":o.play();case"paused":o.pause()}}else{var l="textarea"===i&&"value"===t,c="style"===i&&"_cssText"===t;if(c&&r&&(a=w(a)),l||c){for(var u=n.createTextNode(a),d=0,f=Array.from(o.childNodes);d<f.length;d++){var p=f[d];p.nodeType===o.TEXT_NODE&&o.removeChild(p)}return o.appendChild(u),"continue"}if("iframe"===i&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?o.setAttributeNS("http://www.w3.org/1999/xlink",t,a):o.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return o;case t.Text:return n.createTextNode(e.isStyle&&r?w(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function T(e,n,r,o,i){void 0===o&&(o=!1),void 0===i&&(i=!0);var a=I(e,n,i);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,r[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!o)for(var s=0,l=e.childNodes;s<l.length;s++){var c=l[s],u=T(c,n,r,!1,i);u?a.appendChild(u):console.warn("Failed to rebuild",c)}return a}function C(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)}}var N,x,M,k,R,D={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return D.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete D.map[t],e.childNodes&&e.childNodes.forEach(function(e){return D.removeNodeFromMap(e)})},has:function(e){return D.map.hasOwnProperty(e)}};function A(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(l,c)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(l,c)},s))}}function L(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function O(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function _(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(n=!0)}),n||_(e.parentNode,t)}return _(e.parentNode,t)}function F(e){return Boolean(e.changedTouches)}function B(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function P(e,t){e.delete(t),t.childNodes.forEach(function(t){return P(e,t)})}function j(e,t){var n=t.parentNode;if(!n)return!1;var r=D.getId(n);return!!e.some(function(e){return e.id===r})||j(e,n)}function z(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||z(e,n))}(N=e.EventType||(e.EventType={}))[N.DomContentLoaded=0]="DomContentLoaded",N[N.Load=1]="Load",N[N.FullSnapshot=2]="FullSnapshot",N[N.IncrementalSnapshot=3]="IncrementalSnapshot",N[N.Meta=4]="Meta",N[N.Custom=5]="Custom",(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",(M=e.MouseInteractions||(e.MouseInteractions={}))[M.MouseUp=0]="MouseUp",M[M.MouseDown=1]="MouseDown",M[M.Click=2]="Click",M[M.ContextMenu=3]="ContextMenu",M[M.DblClick=4]="DblClick",M[M.Focus=5]="Focus",M[M.Blur=6]="Blur",M[M.TouchStart=7]="TouchStart",M[M.TouchMove_Departed=8]="TouchMove_Departed",M[M.TouchEnd=9]="TouchEnd",function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(k||(k={})),(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";var X=function(e,t){return e+"@"+t};function H(e){return"__sn"in e}function U(e,t,n,o){var i=new MutationObserver(function(i){var a,s,l,c,u=[],d=[],f=[],p=[],m=new Set,y=new Set,g=new Set,b={},E=function(e,n){if(!_(e,t)){if(H(e)){y.add(e);var r=null;n&&H(n)&&(r=n.__sn.id),r&&(b[X(e.__sn.id,r)]=!0)}else m.add(e),g.delete(e);e.childNodes.forEach(function(e){return E(e)})}};i.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,i=e.addedNodes,a=e.removedNodes,s=e.attributeName;switch(n){case"characterData":var l=r.textContent;_(r,t)||l===o||u.push({value:l,node:r});break;case"attributes":l=r.getAttribute(s);if(_(r,t)||l===o)return;var c=d.find(function(e){return e.node===r});c||(c={node:r,attributes:{}},d.push(c)),c.attributes[s]=h(document,s,l);break;case"childList":i.forEach(function(e){return E(e,r)}),a.forEach(function(e){var n=D.getId(e),o=D.getId(r);_(e,t)||(m.has(e)?(P(m,e),g.add(e)):m.has(r)&&-1===n||function e(t){var n=D.getId(t);return!D.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(y.has(e)&&b[X(n,o)]?P(y,e):f.push({parentId:o,id:n})),D.removeNodeFromMap(e))})}});var S=[],w=function(e){var r=D.getId(e.parentNode);if(-1===r)return S.push(e);p.push({parentId:r,previousId:e.previousSibling?D.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?D.getId(e.nextSibling):e.nextSibling,node:v(e,document,D.map,t,!0,n,o)})};try{for(var I=r(y),T=I.next();!T.done;T=I.next()){w(x=T.value)}}catch(e){a={error:e}}finally{try{T&&!T.done&&(s=I.return)&&s.call(I)}finally{if(a)throw a.error}}try{for(var C=r(m),N=C.next();!N.done;N=C.next()){var x=N.value;z(g,x)||j(f,x)?z(y,x)?w(x):g.add(x):w(x)}}catch(e){l={error:e}}finally{try{N&&!N.done&&(c=C.return)&&c.call(C)}finally{if(l)throw l.error}}for(;S.length&&!S.every(function(e){return-1===D.getId(e.parentNode)});)w(S.shift());var M={texts:u.map(function(e){return{id:D.getId(e.node),value:e.value}}).filter(function(e){return D.has(e.id)}),attributes:d.map(function(e){return{id:D.getId(e.node),attributes:e.attributes}}).filter(function(e){return D.has(e.id)}),removes:f,adds:p};(M.texts.length||M.attributes.length||M.removes.length||M.adds.length)&&e(M)});return i.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Y(t,n){var r=[];return Object.keys(e.MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(o){var i=o.toLowerCase(),a=function(r){return function(o){if(!_(o.target,n)){var i=D.getId(o.target),a=F(o)?o.changedTouches[0]:o,s=a.clientX,l=a.clientY;t({type:e.MouseInteractions[r],id:i,x:s,y:l})}}}(o);r.push(C(i,a))}),function(){r.forEach(function(e){return e()})}}var V,W=["INPUT","TEXTAREA","SELECT"],G=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],q=new WeakMap;function $(e,t,r,o){function a(e){var n=e.target;if(n&&n.tagName&&!(W.indexOf(n.tagName)<0)&&!_(n,t)){var i=n.type;if("password"!==i&&!n.classList.contains(r)){var a=n.value,l=!1,c=G.includes(i)||"TEXTAREA"===n.tagName;"radio"===i||"checkbox"===i?l=n.checked:c&&o&&(a="*".repeat(a.length)),s(n,{text:a,isChecked:l});var u=n.name;"radio"===i&&u&&l&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==n&&s(e,{text:e.value,isChecked:!l})})}}}function s(t,r){var o=q.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){q.set(t,r);var i=D.getId(t);e(n({},r,{id:i}))}}var l=["input","change"].map(function(e){return C(e,a)}),c=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return c&&c.set&&l.push.apply(l,i(u.map(function(e){return function e(t,n,r,o){var i=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),i&&i.set&&i.set.call(this,e)}}),function(){return e(t,n,i||{},!0)}}(e[0],e[1],{set:function(){a({target:this})}})}))),function(){l.forEach(function(e){return e()})}}function Z(t,n){void 0===n&&(n={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,s=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,i(e)),n.apply(void 0,i(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,i(e)),r.apply(void 0,i(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,i(e)),o.apply(void 0,i(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,i(e)),a.apply(void 0,i(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,i(e)),s.apply(void 0,i(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,i(e)),l.apply(void 0,i(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,i(e)),c.apply(void 0,i(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,i(e)),u.apply(void 0,i(e))}}(t,n);var r,o,a,s,l,c,u,d=U(t.mutationCb,t.blockClass,t.inlineStylesheet,t.maskAllInputs),f=(r=t.mousemoveCb,o=t.mousemoveWait,s=[],l=A(function(t){var n=Date.now()-a;r(s.map(function(e){return e.timeOffset-=n,e}),t?e.IncrementalSource.TouchMove:e.IncrementalSource.MouseMove),s=[],a=null},500),c=A(function(e){var t=e.target,n=F(e)?e.changedTouches[0]:e,r=n.clientX,o=n.clientY;a||(a=Date.now()),s.push({x:r,y:o,id:D.getId(t),timeOffset:Date.now()-a}),l(F(e))},o,{trailing:!1}),u=[C("mousemove",c),C("touchmove",c)],function(){u.forEach(function(e){return e()})}),p=Y(t.mouseInteractionCb,t.blockClass),h=function(e,t){return C("scroll",A(function(n){if(n.target&&!_(n.target,t)){var r=D.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}(t.scrollCb,t.blockClass),m=function(e){return C("resize",A(function(){var t=L(),n=O();e({width:Number(n),height:Number(t)})},200),window)}(t.viewportResizeCb),v=$(t.inputCb,t.blockClass,t.ignoreClass,t.maskAllInputs),y=function(e,t){var n=function(n){return function(r){var o=r.target;o&&!_(o,t)&&e({type:"play"===n?k.Play:k.Pause,id:D.getId(o)})}},r=[C("play",n("play")),C("pause",n("pause"))];return function(){r.forEach(function(e){return e()})}}(t.mediaInteractionCb,t.blockClass),g=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,r){var o=D.getId(this.ownerNode);return-1!==o&&e({id:o,adds:[{rule:n,index:r}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var r=D.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);return function(){d.disconnect(),f(),p(),h(),m(),v(),y(),g()}}function J(e){return n({},e,{timestamp:Date.now()})}function K(t){void 0===t&&(t={});var r,i=t.emit,a=t.checkoutEveryNms,s=t.checkoutEveryNth,l=t.blockClass,c=void 0===l?"rr-block":l,u=t.ignoreClass,d=void 0===u?"rr-ignore":u,f=t.inlineStylesheet,p=void 0===f||f,h=t.maskAllInputs,m=void 0!==h&&h,y=t.hooks,g=t.mousemoveWait,b=void 0===g?50:g;if(!i)throw new Error("emit function is required");B();var E=0;function S(t){void 0===t&&(t=!1),V(J({type:e.EventType.Meta,data:{href:window.location.href,width:O(),height:L()}}),t);var n=o(function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[v(e,e,o,t,!1,n,r),o]}(document,c,p,m),2),r=n[0],i=n[1];if(!r)return console.warn("Failed to snapshot the document");D.map=i,V(J({type:e.EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}V=function(t,n){if(i(t,n),t.type===e.EventType.FullSnapshot)r=t,E=0;else if(t.type===e.EventType.IncrementalSnapshot){E++;var o=s&&E>=s,l=a&&t.timestamp-r.timestamp>a;(o||l)&&S(!0)}};try{var w=[];w.push(C("DOMContentLoaded",function(){V(J({type:e.EventType.DomContentLoaded,data:{}}))}));var I=function(){S(),w.push(Z({mutationCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Mutation},t)}))},mousemoveCb:function(t,n){return V(J({type:e.EventType.IncrementalSnapshot,data:{source:n,positions:t}}))},mouseInteractionCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Scroll},t)}))},viewportResizeCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Input},t)}))},mediaInteractionCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MediaInteraction},t)}))},styleSheetRuleCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.StyleSheetRule},t)}))},blockClass:c,ignoreClass:d,maskAllInputs:m,inlineStylesheet:p,mousemoveWait:b},y))};return"interactive"===document.readyState||"complete"===document.readyState?I():w.push(C("load",function(){V(J({type:e.EventType.Load,data:{}})),I()},window)),function(){w.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function Q(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)})}}}K.addCustomEvent=function(t,n){if(!V)throw new Error("please add custom event after start recording");V(J({type:e.EventType.Custom,data:{tag:t,payload:n}}))};var ee=Object.freeze({default:Q});var te,ne=(function(e,t){!function(){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,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||l,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?h.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]&&(c(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):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.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!==c(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!==c(arguments[0])){var n=function(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=u(e,"Y")&&d(e,"Y"),n=u(e,"X")&&d(e,"X");return t||n}function p(t){var n,r,i,s,l=(a()-t.startTime)/o;s=l=l>1?1:l,n=.5*(1-Math.cos(Math.PI*s)),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(p.bind(e,t))}function h(n,r,o){var s,c,u,d,f=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=n,c=n.scrollLeft,u=n.scrollTop,d=l),p({scrollable:s,method:d,startTime:f,startX:c,startY:u,x:r,y:o})}}}}()}(te={exports:{}},te.exports),te.exports).polyfill,re=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,i(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 o(i){for(r.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||r.config.liveMode)&&(r.raf=requestAnimationFrame(o))})},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}(),oe=Q||ee,ie=function(){function t(e,t){if(this.events=[],this.emitter=oe(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},this.playing=!1,e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var n={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0};this.config=Object.assign({},n,t),this.timer=new re(this.config),ne(),B(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return t.prototype.on=function(e,t){this.emitter.on(e,t)},t.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},t.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},t.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},t.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},t.prototype.play=function(t){var n,o,i=this;void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;var a=new Array,s=function(t){var n=t.timestamp<l.baselineTime,r=l.getCastFn(t,n);n?r():a.push({doAction:function(){r(),i.emitter.emit(e.ReplayerEvents.EventCast,t)},delay:l.getDelay(t)})},l=this;try{for(var c=r(this.events),u=c.next();!u.done;u=c.next()){s(u.value)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}this.timer.addActions(a),this.timer.start(),this.playing=!0,this.emitter.emit(e.ReplayerEvents.Start)},t.prototype.pause=function(){this.timer.clear(),this.playing=!1,this.emitter.emit(e.ReplayerEvents.Pause)},t.prototype.resume=function(t){var n,o;void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;var i=new Array;try{for(var a=r(this.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=this.lastPlayedEvent.timestamp||l===this.lastPlayedEvent)){var c=this.getCastFn(l);i.push({doAction:c,delay:this.getDelay(l)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}this.timer.addActions(i),this.timer.start(),this.playing=!0,this.emitter.emit(e.ReplayerEvents.Resume)},t.prototype.addEvent=function(e){this.getCastFn(e,!0)()},t.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},t.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},t.prototype.getDelay=function(t){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var n=t.data.positions[0].timeOffset,r=t.timestamp+n;return t.delay=r-this.baselineTime,r-this.baselineTime}return t.delay=t.timestamp-this.baselineTime,t.timestamp-this.baselineTime},t.prototype.getCastFn=function(t,n){var o,i=this;switch(void 0===n&&(n=!1),t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Meta:o=function(){return i.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:o=function(){i.rebuildFullSnapshot(t),i.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:o=function(){var o,a;if(i.applyIncremental(t,n),t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.restoreSpeed()),i.config.skipInactive&&!i.nextUserInteractionEvent){try{for(var s=r(i.events),l=s.next();!l.done;l=s.next()){var c=l.value;if(!(c.timestamp<=t.timestamp)&&i.isUserInteraction(c)){c.delay-t.delay>1e4*i.config.speed&&(i.nextUserInteractionEvent=c);break}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}if(i.nextUserInteractionEvent){i.noramlSpeed=i.config.speed;var u=i.nextUserInteractionEvent.delay-t.delay,d={speed:Math.min(Math.round(u/5e3),360)};i.setConfig(d),i.emitter.emit(e.ReplayerEvents.SkipStart,d)}}}}return function(){o&&o(),i.lastPlayedEvent=t,t===i.events[i.events.length-1]&&(i.restoreSpeed(),i.emitter.emit(e.ReplayerEvents.Finish))}},t.prototype.rebuildFullSnapshot=function(t){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},D.map=function(e,t,n){void 0===n&&(n=!0);var r={};return[T(e,t,r,!1,n),r]}(t.data.node,this.iframe.contentDocument)[1];var n=document.createElement("style"),r=this.iframe.contentDocument,o=r.documentElement,i=r.head;o.insertBefore(n,i);for(var a,s=(a=this.config.blockClass,["iframe, ."+a+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),l=0;l<s.length;l++)n.sheet.insertRule(s[l],l);this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},t.prototype.waitForStylesheetLoad=function(){var t=this,n=this.iframe.contentDocument.head;if(n){var r,o=new Set;n.querySelectorAll('link[rel="stylesheet"]').forEach(function(n){n.sheet||(0===o.size&&(t.timer.clear(),t.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),r=window.setTimeout(function(){t.playing&&t.resume(t.getCurrentTime()),r=-1},t.config.loadTimeout)),o.add(n),n.addEventListener("load",function(){o.delete(n),0===o.size&&-1!==r&&(t.playing&&t.resume(t.getCurrentTime()),t.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))}))})}},t.prototype.applyIncremental=function(t,r){var o=this,i=t.data;switch(i.source){case e.IncrementalSource.Mutation:i.removes.forEach(function(e){var t=D.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);var n=D.getNode(e.parentId);if(!n)return o.warnNodeNotFound(i,e.parentId);D.removeNodeFromMap(t),n&&n.removeChild(t)});var a=n({},this.missingNodeRetryMap),s=[],l=function(e){var t=D.getNode(e.parentId);if(!t)return s.push(e);var n=T(e.node,o.iframe.contentDocument,D.map,!0),r=null,i=null;e.previousId&&(r=D.getNode(e.previousId)),e.nextId&&(i=D.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(r&&r.nextSibling&&r.nextSibling.parentNode?t.insertBefore(n,r.nextSibling):i&&i.parentNode?t.contains(i)?t.insertBefore(n,i):t.insertBefore(n,null):t.appendChild(n),(e.previousId||e.nextId)&&o.resolveMissingNode(a,t,n,e)):a[e.node.id]={node:n,mutation:e}};for(i.adds.forEach(function(e){l(e)});s.length;){if(s.every(function(e){return!Boolean(D.getNode(e.parentId))}))return s.forEach(function(e){return o.warnNodeNotFound(i,e.node.id)});var c=s.shift();l(c)}Object.keys(a).length&&Object.assign(this.missingNodeRetryMap,a),i.texts.forEach(function(e){var t=D.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);t.textContent=e.value}),i.attributes.forEach(function(e){var t=D.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);for(var n in e.attributes)if("string"==typeof n){var r=e.attributes[n];null!==r?t.setAttribute(n,r):t.removeAttribute(n)}});break;case e.IncrementalSource.MouseMove:if(r){var u=i.positions[i.positions.length-1];this.moveAndHover(i,u.x,u.y,u.id)}else i.positions.forEach(function(e){var n={doAction:function(){o.moveAndHover(i,e.x,e.y,e.id)},delay:e.timeOffset+t.timestamp-o.baselineTime};o.timer.addAction(n)});break;case e.IncrementalSource.MouseInteraction:if(-1===i.id)break;var d=new Event(e.MouseInteractions[i.type].toLowerCase());if(!(h=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:i.type,target:h});var f=this.config.triggerFocus;switch(i.type){case e.MouseInteractions.Blur:h.blur&&h.blur();break;case e.MouseInteractions.Focus:f&&h.focus&&h.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:r||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:h.dispatchEvent(d)}break;case e.IncrementalSource.Scroll:if(-1===i.id)break;if(!(h=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);if(h===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:i.y,left:i.x,behavior:r?"auto":"smooth"});else try{h.scrollTop=i.y,h.scrollLeft=i.x}catch(e){}break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:i.width,height:i.height});break;case e.IncrementalSource.Input:if(-1===i.id)break;if(!(h=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);try{h.checked=i.isChecked,h.value=i.text}catch(e){}break;case e.IncrementalSource.MediaInteraction:if(!(h=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var p=h;i.type===k.Pause&&p.pause(),i.type===k.Play&&(p.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?p.play():p.addEventListener("canplay",function(){p.play()}));break;case e.IncrementalSource.StyleSheetRule:var h;if(!(h=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var m=h.sheet;i.adds&&i.adds.forEach(function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,m.rules.length);try{m.insertRule(t,r)}catch(e){}}),i.removes&&i.removes.forEach(function(e){var t=e.index;m.deleteRule(t)})}},t.prototype.resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.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.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}},t.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var o=D.getNode(r);if(!o)return this.debugNodeNotFound(e,r);this.hoverElements(o)},t.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList&&t.classList.add(":hover"),t=t.parentElement},t.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},t.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var t={speed:this.noramlSpeed};this.setConfig(t),this.emitter.emit(e.ReplayerEvents.SkipEnd,t),this.noramlSpeed=-1}},t.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},t.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},t}(),ae=K.addCustomEvent;return e.record=K,e.addCustomEvent=ae,e.Replayer=ie,e.mirror=D,e}({});
//# sourceMappingURL=rrweb.min.js.map

@@ -1,2 +0,2 @@

var NodeType,__assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __values(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function __read(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(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"}(NodeType||(NodeType={}));var _id=1,symbolAndNumberRegex=RegExp("[^a-z1-6]");function genId(){return _id++}function getValidTagName(e){var t=e.toLowerCase().trim();return symbolAndNumberRegex.test(t)?"div":t}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+getCssRuleString(t)},""):null}catch(e){return null}}function getCssRuleString(e){return isCSSImportRule(e)?getCssRulesString(e.styleSheet)||"":e.cssText}function isCSSImportRule(e){return"styleSheet"in e}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function absoluteToStylesheet(e,t){return(e||"").replace(URL_IN_CSS_REF,function(e,r,n,o){var i=r||n||o;if(!i)return e;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),s=i.split("/");a.pop();for(var l=0,c=s;l<c.length;l++){var u=c[l];"."!==u&&(".."===u?a.pop():a.push(u))}return"url('"+a.join("/")+"')"})}function getAbsoluteSrcsetString(e,t){return""===t.trim()?t:t.split(",").map(function(t){var r=t.trimLeft().trimRight().split(" ");return 2===r.length?absoluteToDoc(e,r[0])+" "+r[1]:1===r.length?""+absoluteToDoc(e,r[0]):""}).join(",")}function absoluteToDoc(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function transformAttribute(e,t,r){return"src"===t||"href"===t&&r?absoluteToDoc(e,r):"srcset"===t&&r?getAbsoluteSrcsetString(e,r):"style"===t&&r?absoluteToStylesheet(r,location.href):r}function serializeNode(e,t,r,n,o){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var i=!1;"string"==typeof r?i=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(i=!0)});for(var a=getValidTagName(e.tagName),s={},l=0,c=Array.from(e.attributes);l<c.length;l++){var u=c[l],d=u.name,p=u.value;s[d]=transformAttribute(t,d,p)}if("link"===a&&n){var f,m=Array.from(t.styleSheets).find(function(t){return t.href===e.href});(f=getCssRulesString(m))&&(delete s.rel,delete s.href,s._cssText=absoluteToStylesheet(f,m.href))}if("style"===a&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(f=getCssRulesString(e.sheet))&&(s._cssText=absoluteToStylesheet(f,location.href));if("input"===a||"textarea"===a||"select"===a){p=e.value;"radio"!==s.type&&"checkbox"!==s.type&&p?s.value=o?"*".repeat(p.length):p:e.checked&&(s.checked=e.checked)}if("option"===a){var h=e.parentElement;s.value===h.value&&(s.selected=e.selected)}if("canvas"===a&&(s.rr_dataURL=e.toDataURL()),"audio"!==a&&"video"!==a||(s.rr_mediaState=e.paused?"paused":"played"),i){var v=e.getBoundingClientRect(),y=v.width,g=v.height;s.rr_width=y+"px",s.rr_height=g+"px"}return{type:NodeType.Element,tagName:a,attributes:s,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:i};case e.TEXT_NODE:var E=e.parentNode&&e.parentNode.tagName,b=e.textContent,S="STYLE"===E||void 0;return S&&b&&(b=absoluteToStylesheet(b,location.href)),"SCRIPT"===E&&(b="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:b||"",isStyle:S};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,r,n,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var s,l=serializeNode(e,t,n,i,a);if(!l)return console.warn(e,"not serialized"),null;s="__sn"in e?e.__sn.id:genId();var c=Object.assign(l,{id:s});e.__sn=c,r[s]=e;var u=!o;if(c.type===NodeType.Element&&(u=u&&!c.needBlock,delete c.needBlock),(c.type===NodeType.Document||c.type===NodeType.Element)&&u)for(var d=0,p=Array.from(e.childNodes);d<p.length;d++){var f=serializeNodeWithId(p[d],t,r,n,o,i,a);f&&c.childNodes.push(f)}return c}function snapshot(e,t,r,n){void 0===t&&(t="rr-block"),void 0===r&&(r=!0),void 0===n&&(n=!1);var o={};return[serializeNodeWithId(e,e,o,t,!1,r,n),o]}var commentre=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function parse(e,t){void 0===t&&(t={});var r=1,n=1;function o(e){var t=e.match(/\n/g);t&&(r+=t.length);var o=e.lastIndexOf("\n");n=-1===o?n+e.length:e.length-o}function i(){var e={line:r,column:n};return function(t){return t.position=new a(e),f(),t}}var a=function(){return function(e){this.start=e,this.end={line:r,column:n},this.source=t.source}}();a.prototype.content=e;var s=[];function l(o){var i=new Error(t.source+":"+r+":"+n+": "+o);if(i.reason=o,i.filename=t.source,i.line=r,i.column=n,i.source=e,!t.silent)throw i;s.push(i)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,r=[];for(f(),m(r);e.length&&"}"!==e.charAt(0)&&(t=N()||_());)!1!==t&&(r.push(t),m(r));return r}function p(t){var r=t.exec(e);if(r){var n=r[0];return o(n),e=e.slice(n.length),r}}function f(){p(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return l("End of comment missing");var a=e.slice(2,r-2);return n+=2,o(a),e=e.slice(r),n+=2,t({type:"comment",comment:a})}}function v(){var e=p(/^([^{]+)/);if(e)return trim(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 y(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=trim(t[0]);if(!p(/^:\s*/))return l("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:r.replace(commentre,""),value:n?trim(n[0]).replace(commentre,""):""});return p(/^[;\s]*/),o}}function g(){var e,t=[];if(!c())return l("missing '{'");for(m(t);e=y();)!1!==e&&(t.push(e),m(t)),e=y();return u()?t:l("missing '}'")}function E(){for(var e,t=[],r=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:g()})}var b,S=w("import"),I=w("charset"),T=w("namespace");function w(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=i(),n=p(t);if(n){var o={type:e};return o[e]=n[1].trim(),r(o)}}}function N(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=p(/^([-\w]+)\s*/)))return l("@keyframes missing name");var n,o=t[1];if(!c())return l("@keyframes missing '{'");for(var a=m();n=E();)a.push(n),a=a.concat(m());return u()?e({type:"keyframes",name:o,vendor:r,keyframes:a}):l("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var r=trim(t[1]);if(!c())return l("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):l("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:trim(t[1]),media:trim(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var r=trim(t[1]);if(!c())return l("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):l("@supports missing '}'")}}()||S()||I()||T()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var r=trim(t[1]),n=trim(t[2]);if(!c())return l("@document missing '{'");var o=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:o}):l("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!c())return l("@page missing '{'");for(var r,n=m();r=y();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):l("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!c())return l("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!c())return l("@font-face missing '{'");for(var t,r=m();t=y();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):l("@font-face missing '}'")}}()}function _(){var e=i(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:g()})):l("selector missing")}return addParent((b=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:b,parsingErrors:s}}))}function trim(e){return e?e.replace(/^\s+|\s+$/g,""):""}function addParent(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=e[i[o]];Array.isArray(a)?a.forEach(function(e){addParent(e,n)}):a&&"object"==typeof a&&addParent(a,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var tagMap={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function getTagName(e){var t=tagMap[e.tagName]?tagMap[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var HOVER_SELECTOR=/([^\\]):hover/g;function addHoverClass(e){var t=parse(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(HOVER_SELECTOR.test(t)){var r=t.replace(HOVER_SELECTOR,"$1.\\:hover");e=e.replace(t,t+", "+r)}})}),e):e}function buildNode(e,t,r){switch(e.type){case NodeType.Document:return t.implementation.createDocument(null,"",null);case NodeType.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case NodeType.Element:var n,o=getTagName(e);n=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",o):t.createElement(o);var i=function(i){if(!e.attributes.hasOwnProperty(i))return"continue";var a=e.attributes[i];if(a="boolean"==typeof a?"":a,i.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===i){var s=document.createElement("img");s.src=a,s.onload=function(){var e=n.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===i&&(n.style.width=a),"rr_height"===i&&(n.style.height=a),"rr_mediaState"===i)switch(a){case"played":n.play();case"paused":n.pause()}}else{var l="textarea"===o&&"value"===i,c="style"===o&&"_cssText"===i;if(c&&r&&(a=addHoverClass(a)),l||c){for(var u=t.createTextNode(a),d=0,p=Array.from(n.childNodes);d<p.length;d++){var f=p[d];f.nodeType===n.TEXT_NODE&&n.removeChild(f)}return n.appendChild(u),"continue"}if("iframe"===o&&"src"===i)return"continue";try{e.isSVG&&"xlink:href"===i?n.setAttributeNS("http://www.w3.org/1999/xlink",i,a):n.setAttribute(i,a)}catch(e){}}};for(var a in e.attributes)i(a);return n;case NodeType.Text:return t.createTextNode(e.isStyle&&r?addHoverClass(e.textContent):e.textContent);case NodeType.CDATA:return t.createCDATASection(e.textContent);case NodeType.Comment:return t.createComment(e.textContent);default:return null}}function buildNodeWithSN(e,t,r,n,o){void 0===n&&(n=!1),void 0===o&&(o=!0);var i=buildNode(e,t,o);if(!i)return null;if(e.type===NodeType.Document&&(t.close(),t.open(),i=t),i.__sn=e,r[e.id]=i,(e.type===NodeType.Document||e.type===NodeType.Element)&&!n)for(var a=0,s=e.childNodes;a<s.length;a++){var l=s[a],c=buildNodeWithSN(l,t,r,!1,o);c?i.appendChild(c):console.warn("Failed to rebuild",l)}return i}function rebuild(e,t,r){void 0===r&&(r=!0);var n={};return[buildNodeWithSN(e,t,n,!1,r),n]}function on(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),function(){return r.removeEventListener(e,t,n)}}var EventType,IncrementalSource,MouseInteractions,MediaInteractions,ReplayerEvents,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,r){void 0===r&&(r={});var n=null,o=0;return function(i){var a=Date.now();o||!1!==r.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(n&&(window.clearTimeout(n),n=null),o=a,e.apply(l,c)):n||!1===r.trailing||(n=window.setTimeout(function(){o=!1===r.leading?0:Date.now(),n=null,e.apply(l,c)},s))}}function hookSetter(e,t,r,n){var o=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,n?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var r=!1;return"string"==typeof t?r=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(r=!0)}),r||isBlocked(e.parentNode,t)}return isBlocked(e.parentNode,t)}function isAncestorRemoved(e){var t=mirror.getId(e);return!mirror.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode))}function isTouchEvent(e){return Boolean(e.changedTouches)}function polyfill(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function deepDelete(e,t){e.delete(t),t.childNodes.forEach(function(t){return deepDelete(e,t)})}function isParentRemoved(e,t){var r=t.parentNode;if(!r)return!1;var n=mirror.getId(r);return!!e.some(function(e){return e.id===n})||isParentRemoved(e,r)}function isAncestorInSet(e,t){var r=t.parentNode;return!!r&&(!!e.has(r)||isAncestorInSet(e,r))}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(EventType||(EventType={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule"}(IncrementalSource||(IncrementalSource={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(MouseInteractions||(MouseInteractions={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(MediaInteractions||(MediaInteractions={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast"}(ReplayerEvents||(ReplayerEvents={}));var moveKey=function(e,t){return e+"@"+t};function isINode(e){return"__sn"in e}function initMutationObserver(e,t,r,n){var o=new MutationObserver(function(o){var i,a,s,l,c=[],u=[],d=[],p=[],f=new Set,m=new Set,h=new Set,v={},y=function(e,r){if(!isBlocked(e,t)){if(isINode(e)){m.add(e);var n=null;r&&isINode(r)&&(n=r.__sn.id),n&&(v[moveKey(e.__sn.id,n)]=!0)}else f.add(e),h.delete(e);e.childNodes.forEach(function(e){return y(e)})}};o.forEach(function(e){var r=e.type,n=e.target,o=e.oldValue,i=e.addedNodes,a=e.removedNodes,s=e.attributeName;switch(r){case"characterData":var l=n.textContent;isBlocked(n,t)||l===o||c.push({value:l,node:n});break;case"attributes":l=n.getAttribute(s);if(isBlocked(n,t)||l===o)return;var p=u.find(function(e){return e.node===n});p||(p={node:n,attributes:{}},u.push(p)),p.attributes[s]=transformAttribute(document,s,l);break;case"childList":i.forEach(function(e){return y(e,n)}),a.forEach(function(e){var r=mirror.getId(e),o=mirror.getId(n);isBlocked(e,t)||(f.has(e)?(deepDelete(f,e),h.add(e)):f.has(n)&&-1===r||isAncestorRemoved(n)||(m.has(e)&&v[moveKey(r,o)]?deepDelete(m,e):d.push({parentId:o,id:r})),mirror.removeNodeFromMap(e))})}});var g=[],E=function(e){var o=mirror.getId(e.parentNode);if(-1===o)return g.push(e);p.push({parentId:o,previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,t,!0,r,n)})};try{for(var b=__values(m),S=b.next();!S.done;S=b.next()){E(w=S.value)}}catch(e){i={error:e}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}try{for(var I=__values(f),T=I.next();!T.done;T=I.next()){var w=T.value;isAncestorInSet(h,w)||isParentRemoved(d,w)?isAncestorInSet(m,w)?E(w):h.add(w):E(w)}}catch(e){s={error:e}}finally{try{T&&!T.done&&(l=I.return)&&l.call(I)}finally{if(s)throw s.error}}for(;g.length&&!g.every(function(e){return-1===mirror.getId(e.parentNode)});)E(g.shift());var N={texts:c.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:u.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:d,adds:p};(N.texts.length||N.attributes.length||N.removes.length||N.adds.length)&&e(N)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function initMoveObserver(e,t){var r,n=[],o=throttle(function(t){var o=Date.now()-r;e(n.map(function(e){return e.timeOffset-=o,e}),t?IncrementalSource.TouchMove:IncrementalSource.MouseMove),n=[],r=null},500),i=throttle(function(e){var t=e.target,i=isTouchEvent(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;r||(r=Date.now()),n.push({x:a,y:s,id:mirror.getId(t),timeOffset:Date.now()-r}),o(isTouchEvent(e))},t,{trailing:!1}),a=[on("mousemove",i),on("touchmove",i)];return function(){a.forEach(function(e){return e()})}}function initMouseInteractionObserver(e,t){var r=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(n){var o=n.toLowerCase(),i=function(r){return function(n){if(!isBlocked(n.target,t)){var o=mirror.getId(n.target),i=isTouchEvent(n)?n.changedTouches[0]:n,a=i.clientX,s=i.clientY;e({type:MouseInteractions[r],id:o,x:a,y:s})}}}(n);r.push(on(o,i))}),function(){r.forEach(function(e){return e()})}}function initScrollObserver(e,t){return on("scroll",throttle(function(r){if(r.target&&!isBlocked(r.target,t)){var n=mirror.getId(r.target);if(r.target===document){var o=document.scrollingElement||document.documentElement;e({id:n,x:o.scrollLeft,y:o.scrollTop})}else e({id:n,x:r.target.scrollLeft,y:r.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),r=getWindowWidth();e({width:Number(r),height:Number(t)})},200),window)}var wrappedEmit,INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],MASK_TYPES=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],lastInputValueMap=new WeakMap;function initInputObserver(e,t,r,n){function o(e){var o=e.target;if(o&&o.tagName&&!(INPUT_TAGS.indexOf(o.tagName)<0)&&!isBlocked(o,t)){var a=o.type;if("password"!==a&&!o.classList.contains(r)){var s=o.value,l=!1,c=MASK_TYPES.includes(a)||"TEXTAREA"===o.tagName;"radio"===a||"checkbox"===a?l=o.checked:c&&n&&(s="*".repeat(s.length)),i(o,{text:s,isChecked:l});var u=o.name;"radio"===a&&u&&l&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==o&&i(e,{text:e.value,isChecked:!l})})}}}function i(t,r){var n=lastInputValueMap.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){lastInputValueMap.set(t,r);var o=mirror.getId(t);e(__assign({},r,{id:o}))}}var a=["input","change"].map(function(e){return on(e,o)}),s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),l=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return s&&s.set&&a.push.apply(a,__spread(l.map(function(e){return hookSetter(e[0],e[1],{set:function(){o({target:this})}})}))),function(){a.forEach(function(e){return e()})}}function initStyleSheetObserver(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(r,n){var o=mirror.getId(this.ownerNode);return-1!==o&&e({id:o,adds:[{rule:r,index:n}]}),t.apply(this,arguments)};var r=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var n=mirror.getId(this.ownerNode);return-1!==n&&e({id:n,removes:[{index:t}]}),r.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=r}}function initMediaInteractionObserver(e,t){var r=function(r){return function(n){var o=n.target;o&&!isBlocked(o,t)&&e({type:"play"===r?MediaInteractions.Play:MediaInteractions.Pause,id:mirror.getId(o)})}},n=[on("play",r("play")),on("pause",r("pause"))];return function(){n.forEach(function(e){return e()})}}function mergeHooks(e,t){var r=e.mutationCb,n=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mutation&&t.mutation.apply(t,__spread(e)),r.apply(void 0,__spread(e))},e.mousemoveCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mousemove&&t.mousemove.apply(t,__spread(e)),n.apply(void 0,__spread(e))},e.mouseInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mouseInteraction&&t.mouseInteraction.apply(t,__spread(e)),o.apply(void 0,__spread(e))},e.scrollCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.scroll&&t.scroll.apply(t,__spread(e)),i.apply(void 0,__spread(e))},e.viewportResizeCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.viewportResize&&t.viewportResize.apply(t,__spread(e)),a.apply(void 0,__spread(e))},e.inputCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.input&&t.input.apply(t,__spread(e)),s.apply(void 0,__spread(e))},e.mediaInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mediaInteaction&&t.mediaInteaction.apply(t,__spread(e)),l.apply(void 0,__spread(e))},e.styleSheetRuleCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleSheetRule&&t.styleSheetRule.apply(t,__spread(e)),c.apply(void 0,__spread(e))}}function initObservers(e,t){void 0===t&&(t={}),mergeHooks(e,t);var r=initMutationObserver(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),n=initMoveObserver(e.mousemoveCb,e.mousemoveWait),o=initMouseInteractionObserver(e.mouseInteractionCb,e.blockClass),i=initScrollObserver(e.scrollCb,e.blockClass),a=initViewportResizeObserver(e.viewportResizeCb),s=initInputObserver(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs),l=initMediaInteractionObserver(e.mediaInteractionCb,e.blockClass),c=initStyleSheetObserver(e.styleSheetRuleCb);return function(){r.disconnect(),n(),o(),i(),a(),s(),l(),c()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function record(e){void 0===e&&(e={});var t,r=e.emit,n=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,a=void 0===i?"rr-block":i,s=e.ignoreClass,l=void 0===s?"rr-ignore":s,c=e.inlineStylesheet,u=void 0===c||c,d=e.maskAllInputs,p=void 0!==d&&d,f=e.hooks,m=e.mousemoveWait,h=void 0===m?50:m;if(!r)throw new Error("emit function is required");polyfill();var v=0;function y(e){void 0===e&&(e=!1),wrappedEmit(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e);var t=__read(snapshot(document,a,u,p),2),r=t[0],n=t[1];if(!r)return console.warn("Failed to snapshot the document");mirror.map=n,wrappedEmit(wrapEvent({type:EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}wrappedEmit=function(e,i){if(r(e,i),e.type===EventType.FullSnapshot)t=e,v=0;else if(e.type===EventType.IncrementalSnapshot){v++;var a=o&&v>=o,s=n&&e.timestamp-t.timestamp>n;(a||s)&&y(!0)}};try{var g=[];g.push(on("DOMContentLoaded",function(){wrappedEmit(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var E=function(){y(),g.push(initObservers({mutationCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e,t){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))},mediaInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.StyleSheetRule},e)}))},blockClass:a,ignoreClass:l,maskAllInputs:p,inlineStylesheet:u,mousemoveWait:h},f))};return"interactive"===document.readyState||"complete"===document.readyState?E():g.push(on("load",function(){wrappedEmit(wrapEvent({type:EventType.Load,data:{}})),E()},window)),function(){g.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function mitt(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map(function(e){e(r)}),(e["*"]||[]).slice().map(function(e){e(t,r)})}}}record.addCustomEvent=function(e,t){if(!wrappedEmit)throw new Error("please add custom event after start recording");wrappedEmit(wrapEvent({type:EventType.Custom,data:{tag:e,payload:t}}))};var mittProxy=Object.freeze({default:mitt});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var smoothscroll=createCommonjsModule(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var r,n=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?m.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]&&(c(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):m.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;m.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)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):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))},n.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var r=function(e){for(;e!==t.body&&!1===p(e);)e=e.parentNode||e.host;return e}(this),n=r.getBoundingClientRect(),o=this.getBoundingClientRect();r!==t.body?(m.call(this,r,r.scrollLeft+o.left-n.left,r.scrollTop+o.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function p(e){var t=u(e,"Y")&&d(e,"Y"),r=u(e,"X")&&d(e,"X");return t||r}function f(t){var r,n,i,s,l=(a()-t.startTime)/o;s=l=l>1?1:l,r=.5*(1-Math.cos(Math.PI*s)),n=t.startX+(t.x-t.startX)*r,i=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,i),n===t.x&&i===t.y||e.requestAnimationFrame(f.bind(e,t))}function m(r,n,o){var s,c,u,d,p=a();r===t.body?(s=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=r,c=r.scrollLeft,u=r.scrollTop,d=l),f({scrollable:s,method:d,startTime:p,startX:c,startY:u,x:n,y:o})}}}}()}),smoothscroll_1=smoothscroll.polyfill,Timer=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,__spread(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,r=this.config,n=this;this.raf=requestAnimationFrame(function o(i){for(n.timeOffset+=(i-e)*r.speed,e=i;t.length;){var a=t[0];if(!(n.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||n.config.liveMode)&&(n.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,r=this.actions.length-1;t<=r;){var n=Math.floor((t+r)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n;r=n-1}}return t},e}(),rules=function(e){return["iframe, ."+e+" { background: #ccc }","noscript { display: none !important; }"]},SKIP_TIME_THRESHOLD=1e4,SKIP_TIME_INTERVAL=5e3,mitt$1=mitt||mittProxy,REPLAY_CONSOLE_PREFIX="[replayer]",Replayer=function(){function e(e,t){if(this.events=[],this.emitter=mitt$1(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var r={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0};this.config=Object.assign({},r,t),this.timer=new Timer(this.config),smoothscroll_1(),polyfill(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(r){t.config[r]=e[r]}),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},e.prototype.play=function(e){var t,r,n=this;void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;var o=new Array,i=function(e){var t=e.timestamp<a.baselineTime,r=a.getCastFn(e,t);t?r():o.push({doAction:function(){r(),n.emitter.emit(ReplayerEvents.EventCast,e)},delay:a.getDelay(e)})},a=this;try{for(var s=__values(this.events),l=s.next();!l.done;l=s.next()){i(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}this.timer.addActions(o),this.timer.start(),this.emitter.emit(ReplayerEvents.Start)},e.prototype.pause=function(){this.timer.clear(),this.emitter.emit(ReplayerEvents.Pause)},e.prototype.resume=function(e){var t,r;void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;var n=new Array;try{for(var o=__values(this.events),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(a.timestamp<=this.lastPlayedEvent.timestamp||a===this.lastPlayedEvent)){var s=this.getCastFn(a);n.push({doAction:s,delay:this.getDelay(a)})}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this.timer.addActions(n),this.timer.start(),this.emitter.emit(ReplayerEvents.Resume)},e.prototype.addEvent=function(e){this.getCastFn(e,!0)()},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},e.prototype.getDelay=function(e){if(e.type===EventType.IncrementalSnapshot&&e.data.source===IncrementalSource.MouseMove){var t=e.data.positions[0].timeOffset,r=e.timestamp+t;return e.delay=r-this.baselineTime,r-this.baselineTime}return e.delay=e.timestamp-this.baselineTime,e.timestamp-this.baselineTime},e.prototype.getCastFn=function(e,t){var r,n=this;switch(void 0===t&&(t=!1),e.type){case EventType.DomContentLoaded:case EventType.Load:break;case EventType.Meta:r=function(){return n.emitter.emit(ReplayerEvents.Resize,{width:e.data.width,height:e.data.height})};break;case EventType.FullSnapshot:r=function(){n.rebuildFullSnapshot(e),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case EventType.IncrementalSnapshot:r=function(){var r,o;if(n.applyIncremental(e,t),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.restoreSpeed()),n.config.skipInactive&&!n.nextUserInteractionEvent){try{for(var i=__values(n.events),a=i.next();!a.done;a=i.next()){var s=a.value;if(!(s.timestamp<=e.timestamp)&&n.isUserInteraction(s)){s.delay-e.delay>SKIP_TIME_THRESHOLD*n.config.speed&&(n.nextUserInteractionEvent=s);break}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}if(n.nextUserInteractionEvent){n.noramlSpeed=n.config.speed;var l=n.nextUserInteractionEvent.delay-e.delay,c={speed:Math.min(Math.round(l/SKIP_TIME_INTERVAL),360)};n.setConfig(c),n.emitter.emit(ReplayerEvents.SkipStart,c)}}}}return function(){r&&r(),n.lastPlayedEvent=e,e===n.events[n.events.length-1]&&(n.restoreSpeed(),n.emitter.emit(ReplayerEvents.Finish))}},e.prototype.rebuildFullSnapshot=function(e){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},mirror.map=rebuild(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),r=this.iframe.contentDocument,n=r.documentElement,o=r.head;n.insertBefore(t,o);for(var i=rules(this.config.blockClass).concat(this.config.insertStyleRules),a=0;a<i.length;a++)t.sheet.insertRule(i[a],a);this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var r,n=new Set;t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t){t.sheet||(0===n.size&&(e.pause(),e.emitter.emit(ReplayerEvents.LoadStylesheetStart),r=window.setTimeout(function(){e.resume(e.getCurrentTime()),r=-1},e.config.loadTimeout)),n.add(t),t.addEventListener("load",function(){n.delete(t),0===n.size&&-1!==r&&(e.resume(e.getCurrentTime()),e.emitter.emit(ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))}))})}},e.prototype.applyIncremental=function(e,t){var r=this,n=e.data;switch(n.source){case IncrementalSource.Mutation:n.removes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);var o=mirror.getNode(e.parentId);if(!o)return r.warnNodeNotFound(n,e.parentId);mirror.removeNodeFromMap(t),o&&o.removeChild(t)});var o=__assign({},this.missingNodeRetryMap),i=[],a=function(e){var t=mirror.getNode(e.parentId);if(!t)return i.push(e);var n=buildNodeWithSN(e.node,r.iframe.contentDocument,mirror.map,!0),a=null,s=null;e.previousId&&(a=mirror.getNode(e.previousId)),e.nextId&&(s=mirror.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(a&&a.nextSibling&&a.nextSibling.parentNode?t.insertBefore(n,a.nextSibling):s&&s.parentNode?t.contains(s)?t.insertBefore(n,s):t.insertBefore(n,null):t.appendChild(n),(e.previousId||e.nextId)&&r.resolveMissingNode(o,t,n,e)):o[e.node.id]={node:n,mutation:e}};for(n.adds.forEach(function(e){a(e)});i.length;){if(i.every(function(e){return!Boolean(mirror.getNode(e.parentId))}))return i.forEach(function(e){return r.warnNodeNotFound(n,e.node.id)});var s=i.shift();a(s)}Object.keys(o).length&&Object.assign(this.missingNodeRetryMap,o),n.texts.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);t.textContent=e.value}),n.attributes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);for(var o in e.attributes)if("string"==typeof o){var i=e.attributes[o];null!==i?t.setAttribute(o,i):t.removeAttribute(o)}});break;case IncrementalSource.MouseMove:if(t){var l=n.positions[n.positions.length-1];this.moveAndHover(n,l.x,l.y,l.id)}else n.positions.forEach(function(t){var o={doAction:function(){r.moveAndHover(n,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-r.baselineTime};r.timer.addAction(o)});break;case IncrementalSource.MouseInteraction:if(-1===n.id)break;var c=new Event(MouseInteractions[n.type].toLowerCase());if(!(p=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);this.emitter.emit(ReplayerEvents.MouseInteraction,{type:n.type,target:p});var u=this.config.triggerFocus;switch(n.type){case MouseInteractions.Blur:p.blur&&p.blur();break;case MouseInteractions.Focus:u&&p.focus&&p.focus({preventScroll:!0});break;case MouseInteractions.Click:case MouseInteractions.TouchStart:case MouseInteractions.TouchEnd:t||(this.moveAndHover(n,n.x,n.y,n.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:p.dispatchEvent(c)}break;case IncrementalSource.Scroll:if(-1===n.id)break;if(!(p=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);if(p===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:n.y,left:n.x,behavior:t?"auto":"smooth"});else try{p.scrollTop=n.y,p.scrollLeft=n.x}catch(e){}break;case IncrementalSource.ViewportResize:this.emitter.emit(ReplayerEvents.Resize,{width:n.width,height:n.height});break;case IncrementalSource.Input:if(-1===n.id)break;if(!(p=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);try{p.checked=n.isChecked,p.value=n.text}catch(e){}break;case IncrementalSource.MediaInteraction:if(!(p=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);var d=p;n.type===MediaInteractions.Pause&&d.pause(),n.type===MediaInteractions.Play&&(d.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?d.play():d.addEventListener("canplay",function(){d.play()}));break;case IncrementalSource.StyleSheetRule:var p;if(!(p=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);var f=p.sheet;n.adds&&n.adds.forEach(function(e){var t=e.rule,r=e.index,n=void 0===r?void 0:Math.min(r,f.rules.length);try{f.insertRule(t,n)}catch(e){}}),n.removes&&n.removes.forEach(function(e){var t=e.index;f.deleteRule(t)})}},e.prototype.resolveMissingNode=function(e,t,r,n){var o=n.previousId,i=n.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,r),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,r,n){this.mouse.style.left=t+"px",this.mouse.style.top=r+"px";var o=mirror.getNode(n);if(!o)return this.debugNodeNotFound(e,n);this.hoverElements(o)},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList&&t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===EventType.IncrementalSnapshot&&(e.data.source>IncrementalSource.Mutation&&e.data.source<=IncrementalSource.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(ReplayerEvents.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e}(),addCustomEvent=record.addCustomEvent;export{record,addCustomEvent,Replayer,mirror,EventType,IncrementalSource,MouseInteractions,ReplayerEvents};
var NodeType,__assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __values(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function __read(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(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"}(NodeType||(NodeType={}));var _id=1,symbolAndNumberRegex=RegExp("[^a-z1-6]");function genId(){return _id++}function getValidTagName(e){var t=e.toLowerCase().trim();return symbolAndNumberRegex.test(t)?"div":t}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+getCssRuleString(t)},""):null}catch(e){return null}}function getCssRuleString(e){return isCSSImportRule(e)?getCssRulesString(e.styleSheet)||"":e.cssText}function isCSSImportRule(e){return"styleSheet"in e}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function absoluteToStylesheet(e,t){return(e||"").replace(URL_IN_CSS_REF,function(e,r,n,o){var i=r||n||o;if(!i)return e;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),s=i.split("/");a.pop();for(var l=0,c=s;l<c.length;l++){var u=c[l];"."!==u&&(".."===u?a.pop():a.push(u))}return"url('"+a.join("/")+"')"})}function getAbsoluteSrcsetString(e,t){return""===t.trim()?t:t.split(",").map(function(t){var r=t.trimLeft().trimRight().split(" ");return 2===r.length?absoluteToDoc(e,r[0])+" "+r[1]:1===r.length?""+absoluteToDoc(e,r[0]):""}).join(",")}function absoluteToDoc(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function transformAttribute(e,t,r){return"src"===t||"href"===t&&r?absoluteToDoc(e,r):"srcset"===t&&r?getAbsoluteSrcsetString(e,r):"style"===t&&r?absoluteToStylesheet(r,location.href):r}function serializeNode(e,t,r,n,o){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var i=!1;"string"==typeof r?i=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(i=!0)});for(var a=getValidTagName(e.tagName),s={},l=0,c=Array.from(e.attributes);l<c.length;l++){var u=c[l],d=u.name,p=u.value;s[d]=transformAttribute(t,d,p)}if("link"===a&&n){var f,m=Array.from(t.styleSheets).find(function(t){return t.href===e.href});(f=getCssRulesString(m))&&(delete s.rel,delete s.href,s._cssText=absoluteToStylesheet(f,m.href))}if("style"===a&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(f=getCssRulesString(e.sheet))&&(s._cssText=absoluteToStylesheet(f,location.href));if("input"===a||"textarea"===a||"select"===a){p=e.value;"radio"!==s.type&&"checkbox"!==s.type&&p?s.value=o?"*".repeat(p.length):p:e.checked&&(s.checked=e.checked)}if("option"===a){var h=e.parentElement;s.value===h.value&&(s.selected=e.selected)}if("canvas"===a&&(s.rr_dataURL=e.toDataURL()),"audio"!==a&&"video"!==a||(s.rr_mediaState=e.paused?"paused":"played"),i){var v=e.getBoundingClientRect(),y=v.width,g=v.height;s.rr_width=y+"px",s.rr_height=g+"px"}return{type:NodeType.Element,tagName:a,attributes:s,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:i};case e.TEXT_NODE:var E=e.parentNode&&e.parentNode.tagName,b=e.textContent,S="STYLE"===E||void 0;return S&&b&&(b=absoluteToStylesheet(b,location.href)),"SCRIPT"===E&&(b="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:b||"",isStyle:S};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,r,n,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var s,l=serializeNode(e,t,n,i,a);if(!l)return console.warn(e,"not serialized"),null;s="__sn"in e?e.__sn.id:genId();var c=Object.assign(l,{id:s});e.__sn=c,r[s]=e;var u=!o;if(c.type===NodeType.Element&&(u=u&&!c.needBlock,delete c.needBlock),(c.type===NodeType.Document||c.type===NodeType.Element)&&u)for(var d=0,p=Array.from(e.childNodes);d<p.length;d++){var f=serializeNodeWithId(p[d],t,r,n,o,i,a);f&&c.childNodes.push(f)}return c}function snapshot(e,t,r,n){void 0===t&&(t="rr-block"),void 0===r&&(r=!0),void 0===n&&(n=!1);var o={};return[serializeNodeWithId(e,e,o,t,!1,r,n),o]}var commentre=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function parse(e,t){void 0===t&&(t={});var r=1,n=1;function o(e){var t=e.match(/\n/g);t&&(r+=t.length);var o=e.lastIndexOf("\n");n=-1===o?n+e.length:e.length-o}function i(){var e={line:r,column:n};return function(t){return t.position=new a(e),f(),t}}var a=function(){return function(e){this.start=e,this.end={line:r,column:n},this.source=t.source}}();a.prototype.content=e;var s=[];function l(o){var i=new Error(t.source+":"+r+":"+n+": "+o);if(i.reason=o,i.filename=t.source,i.line=r,i.column=n,i.source=e,!t.silent)throw i;s.push(i)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,r=[];for(f(),m(r);e.length&&"}"!==e.charAt(0)&&(t=N()||_());)!1!==t&&(r.push(t),m(r));return r}function p(t){var r=t.exec(e);if(r){var n=r[0];return o(n),e=e.slice(n.length),r}}function f(){p(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return l("End of comment missing");var a=e.slice(2,r-2);return n+=2,o(a),e=e.slice(r),n+=2,t({type:"comment",comment:a})}}function v(){var e=p(/^([^{]+)/);if(e)return trim(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 y(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=trim(t[0]);if(!p(/^:\s*/))return l("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:r.replace(commentre,""),value:n?trim(n[0]).replace(commentre,""):""});return p(/^[;\s]*/),o}}function g(){var e,t=[];if(!c())return l("missing '{'");for(m(t);e=y();)!1!==e&&(t.push(e),m(t)),e=y();return u()?t:l("missing '}'")}function E(){for(var e,t=[],r=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:g()})}var b,S=w("import"),I=w("charset"),T=w("namespace");function w(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=i(),n=p(t);if(n){var o={type:e};return o[e]=n[1].trim(),r(o)}}}function N(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=p(/^([-\w]+)\s*/)))return l("@keyframes missing name");var n,o=t[1];if(!c())return l("@keyframes missing '{'");for(var a=m();n=E();)a.push(n),a=a.concat(m());return u()?e({type:"keyframes",name:o,vendor:r,keyframes:a}):l("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var r=trim(t[1]);if(!c())return l("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):l("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:trim(t[1]),media:trim(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var r=trim(t[1]);if(!c())return l("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):l("@supports missing '}'")}}()||S()||I()||T()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var r=trim(t[1]),n=trim(t[2]);if(!c())return l("@document missing '{'");var o=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:o}):l("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!c())return l("@page missing '{'");for(var r,n=m();r=y();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):l("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!c())return l("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!c())return l("@font-face missing '{'");for(var t,r=m();t=y();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):l("@font-face missing '}'")}}()}function _(){var e=i(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:g()})):l("selector missing")}return addParent((b=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:b,parsingErrors:s}}))}function trim(e){return e?e.replace(/^\s+|\s+$/g,""):""}function addParent(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=e[i[o]];Array.isArray(a)?a.forEach(function(e){addParent(e,n)}):a&&"object"==typeof a&&addParent(a,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var tagMap={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function getTagName(e){var t=tagMap[e.tagName]?tagMap[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var HOVER_SELECTOR=/([^\\]):hover/g;function addHoverClass(e){var t=parse(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(HOVER_SELECTOR.test(t)){var r=t.replace(HOVER_SELECTOR,"$1.\\:hover");e=e.replace(t,t+", "+r)}})}),e):e}function buildNode(e,t,r){switch(e.type){case NodeType.Document:return t.implementation.createDocument(null,"",null);case NodeType.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case NodeType.Element:var n,o=getTagName(e);n=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",o):t.createElement(o);var i=function(i){if(!e.attributes.hasOwnProperty(i))return"continue";var a=e.attributes[i];if(a="boolean"==typeof a?"":a,i.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===i){var s=document.createElement("img");s.src=a,s.onload=function(){var e=n.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===i&&(n.style.width=a),"rr_height"===i&&(n.style.height=a),"rr_mediaState"===i)switch(a){case"played":n.play();case"paused":n.pause()}}else{var l="textarea"===o&&"value"===i,c="style"===o&&"_cssText"===i;if(c&&r&&(a=addHoverClass(a)),l||c){for(var u=t.createTextNode(a),d=0,p=Array.from(n.childNodes);d<p.length;d++){var f=p[d];f.nodeType===n.TEXT_NODE&&n.removeChild(f)}return n.appendChild(u),"continue"}if("iframe"===o&&"src"===i)return"continue";try{e.isSVG&&"xlink:href"===i?n.setAttributeNS("http://www.w3.org/1999/xlink",i,a):n.setAttribute(i,a)}catch(e){}}};for(var a in e.attributes)i(a);return n;case NodeType.Text:return t.createTextNode(e.isStyle&&r?addHoverClass(e.textContent):e.textContent);case NodeType.CDATA:return t.createCDATASection(e.textContent);case NodeType.Comment:return t.createComment(e.textContent);default:return null}}function buildNodeWithSN(e,t,r,n,o){void 0===n&&(n=!1),void 0===o&&(o=!0);var i=buildNode(e,t,o);if(!i)return null;if(e.type===NodeType.Document&&(t.close(),t.open(),i=t),i.__sn=e,r[e.id]=i,(e.type===NodeType.Document||e.type===NodeType.Element)&&!n)for(var a=0,s=e.childNodes;a<s.length;a++){var l=s[a],c=buildNodeWithSN(l,t,r,!1,o);c?i.appendChild(c):console.warn("Failed to rebuild",l)}return i}function rebuild(e,t,r){void 0===r&&(r=!0);var n={};return[buildNodeWithSN(e,t,n,!1,r),n]}function on(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),function(){return r.removeEventListener(e,t,n)}}var EventType,IncrementalSource,MouseInteractions,MediaInteractions,ReplayerEvents,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,r){void 0===r&&(r={});var n=null,o=0;return function(i){var a=Date.now();o||!1!==r.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(n&&(window.clearTimeout(n),n=null),o=a,e.apply(l,c)):n||!1===r.trailing||(n=window.setTimeout(function(){o=!1===r.leading?0:Date.now(),n=null,e.apply(l,c)},s))}}function hookSetter(e,t,r,n){var o=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,n?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var r=!1;return"string"==typeof t?r=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(r=!0)}),r||isBlocked(e.parentNode,t)}return isBlocked(e.parentNode,t)}function isAncestorRemoved(e){var t=mirror.getId(e);return!mirror.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode))}function isTouchEvent(e){return Boolean(e.changedTouches)}function polyfill(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function deepDelete(e,t){e.delete(t),t.childNodes.forEach(function(t){return deepDelete(e,t)})}function isParentRemoved(e,t){var r=t.parentNode;if(!r)return!1;var n=mirror.getId(r);return!!e.some(function(e){return e.id===n})||isParentRemoved(e,r)}function isAncestorInSet(e,t){var r=t.parentNode;return!!r&&(!!e.has(r)||isAncestorInSet(e,r))}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(EventType||(EventType={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule"}(IncrementalSource||(IncrementalSource={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(MouseInteractions||(MouseInteractions={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(MediaInteractions||(MediaInteractions={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast"}(ReplayerEvents||(ReplayerEvents={}));var moveKey=function(e,t){return e+"@"+t};function isINode(e){return"__sn"in e}function initMutationObserver(e,t,r,n){var o=new MutationObserver(function(o){var i,a,s,l,c=[],u=[],d=[],p=[],f=new Set,m=new Set,h=new Set,v={},y=function(e,r){if(!isBlocked(e,t)){if(isINode(e)){m.add(e);var n=null;r&&isINode(r)&&(n=r.__sn.id),n&&(v[moveKey(e.__sn.id,n)]=!0)}else f.add(e),h.delete(e);e.childNodes.forEach(function(e){return y(e)})}};o.forEach(function(e){var r=e.type,n=e.target,o=e.oldValue,i=e.addedNodes,a=e.removedNodes,s=e.attributeName;switch(r){case"characterData":var l=n.textContent;isBlocked(n,t)||l===o||c.push({value:l,node:n});break;case"attributes":l=n.getAttribute(s);if(isBlocked(n,t)||l===o)return;var p=u.find(function(e){return e.node===n});p||(p={node:n,attributes:{}},u.push(p)),p.attributes[s]=transformAttribute(document,s,l);break;case"childList":i.forEach(function(e){return y(e,n)}),a.forEach(function(e){var r=mirror.getId(e),o=mirror.getId(n);isBlocked(e,t)||(f.has(e)?(deepDelete(f,e),h.add(e)):f.has(n)&&-1===r||isAncestorRemoved(n)||(m.has(e)&&v[moveKey(r,o)]?deepDelete(m,e):d.push({parentId:o,id:r})),mirror.removeNodeFromMap(e))})}});var g=[],E=function(e){var o=mirror.getId(e.parentNode);if(-1===o)return g.push(e);p.push({parentId:o,previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,t,!0,r,n)})};try{for(var b=__values(m),S=b.next();!S.done;S=b.next()){E(w=S.value)}}catch(e){i={error:e}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}try{for(var I=__values(f),T=I.next();!T.done;T=I.next()){var w=T.value;isAncestorInSet(h,w)||isParentRemoved(d,w)?isAncestorInSet(m,w)?E(w):h.add(w):E(w)}}catch(e){s={error:e}}finally{try{T&&!T.done&&(l=I.return)&&l.call(I)}finally{if(s)throw s.error}}for(;g.length&&!g.every(function(e){return-1===mirror.getId(e.parentNode)});)E(g.shift());var N={texts:c.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:u.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:d,adds:p};(N.texts.length||N.attributes.length||N.removes.length||N.adds.length)&&e(N)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function initMoveObserver(e,t){var r,n=[],o=throttle(function(t){var o=Date.now()-r;e(n.map(function(e){return e.timeOffset-=o,e}),t?IncrementalSource.TouchMove:IncrementalSource.MouseMove),n=[],r=null},500),i=throttle(function(e){var t=e.target,i=isTouchEvent(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;r||(r=Date.now()),n.push({x:a,y:s,id:mirror.getId(t),timeOffset:Date.now()-r}),o(isTouchEvent(e))},t,{trailing:!1}),a=[on("mousemove",i),on("touchmove",i)];return function(){a.forEach(function(e){return e()})}}function initMouseInteractionObserver(e,t){var r=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(n){var o=n.toLowerCase(),i=function(r){return function(n){if(!isBlocked(n.target,t)){var o=mirror.getId(n.target),i=isTouchEvent(n)?n.changedTouches[0]:n,a=i.clientX,s=i.clientY;e({type:MouseInteractions[r],id:o,x:a,y:s})}}}(n);r.push(on(o,i))}),function(){r.forEach(function(e){return e()})}}function initScrollObserver(e,t){return on("scroll",throttle(function(r){if(r.target&&!isBlocked(r.target,t)){var n=mirror.getId(r.target);if(r.target===document){var o=document.scrollingElement||document.documentElement;e({id:n,x:o.scrollLeft,y:o.scrollTop})}else e({id:n,x:r.target.scrollLeft,y:r.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),r=getWindowWidth();e({width:Number(r),height:Number(t)})},200),window)}var wrappedEmit,INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],MASK_TYPES=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],lastInputValueMap=new WeakMap;function initInputObserver(e,t,r,n){function o(e){var o=e.target;if(o&&o.tagName&&!(INPUT_TAGS.indexOf(o.tagName)<0)&&!isBlocked(o,t)){var a=o.type;if("password"!==a&&!o.classList.contains(r)){var s=o.value,l=!1,c=MASK_TYPES.includes(a)||"TEXTAREA"===o.tagName;"radio"===a||"checkbox"===a?l=o.checked:c&&n&&(s="*".repeat(s.length)),i(o,{text:s,isChecked:l});var u=o.name;"radio"===a&&u&&l&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==o&&i(e,{text:e.value,isChecked:!l})})}}}function i(t,r){var n=lastInputValueMap.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){lastInputValueMap.set(t,r);var o=mirror.getId(t);e(__assign({},r,{id:o}))}}var a=["input","change"].map(function(e){return on(e,o)}),s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),l=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return s&&s.set&&a.push.apply(a,__spread(l.map(function(e){return hookSetter(e[0],e[1],{set:function(){o({target:this})}})}))),function(){a.forEach(function(e){return e()})}}function initStyleSheetObserver(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(r,n){var o=mirror.getId(this.ownerNode);return-1!==o&&e({id:o,adds:[{rule:r,index:n}]}),t.apply(this,arguments)};var r=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var n=mirror.getId(this.ownerNode);return-1!==n&&e({id:n,removes:[{index:t}]}),r.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=r}}function initMediaInteractionObserver(e,t){var r=function(r){return function(n){var o=n.target;o&&!isBlocked(o,t)&&e({type:"play"===r?MediaInteractions.Play:MediaInteractions.Pause,id:mirror.getId(o)})}},n=[on("play",r("play")),on("pause",r("pause"))];return function(){n.forEach(function(e){return e()})}}function mergeHooks(e,t){var r=e.mutationCb,n=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mutation&&t.mutation.apply(t,__spread(e)),r.apply(void 0,__spread(e))},e.mousemoveCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mousemove&&t.mousemove.apply(t,__spread(e)),n.apply(void 0,__spread(e))},e.mouseInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mouseInteraction&&t.mouseInteraction.apply(t,__spread(e)),o.apply(void 0,__spread(e))},e.scrollCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.scroll&&t.scroll.apply(t,__spread(e)),i.apply(void 0,__spread(e))},e.viewportResizeCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.viewportResize&&t.viewportResize.apply(t,__spread(e)),a.apply(void 0,__spread(e))},e.inputCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.input&&t.input.apply(t,__spread(e)),s.apply(void 0,__spread(e))},e.mediaInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mediaInteaction&&t.mediaInteaction.apply(t,__spread(e)),l.apply(void 0,__spread(e))},e.styleSheetRuleCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleSheetRule&&t.styleSheetRule.apply(t,__spread(e)),c.apply(void 0,__spread(e))}}function initObservers(e,t){void 0===t&&(t={}),mergeHooks(e,t);var r=initMutationObserver(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),n=initMoveObserver(e.mousemoveCb,e.mousemoveWait),o=initMouseInteractionObserver(e.mouseInteractionCb,e.blockClass),i=initScrollObserver(e.scrollCb,e.blockClass),a=initViewportResizeObserver(e.viewportResizeCb),s=initInputObserver(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs),l=initMediaInteractionObserver(e.mediaInteractionCb,e.blockClass),c=initStyleSheetObserver(e.styleSheetRuleCb);return function(){r.disconnect(),n(),o(),i(),a(),s(),l(),c()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function record(e){void 0===e&&(e={});var t,r=e.emit,n=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,a=void 0===i?"rr-block":i,s=e.ignoreClass,l=void 0===s?"rr-ignore":s,c=e.inlineStylesheet,u=void 0===c||c,d=e.maskAllInputs,p=void 0!==d&&d,f=e.hooks,m=e.mousemoveWait,h=void 0===m?50:m;if(!r)throw new Error("emit function is required");polyfill();var v=0;function y(e){void 0===e&&(e=!1),wrappedEmit(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e);var t=__read(snapshot(document,a,u,p),2),r=t[0],n=t[1];if(!r)return console.warn("Failed to snapshot the document");mirror.map=n,wrappedEmit(wrapEvent({type:EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}wrappedEmit=function(e,i){if(r(e,i),e.type===EventType.FullSnapshot)t=e,v=0;else if(e.type===EventType.IncrementalSnapshot){v++;var a=o&&v>=o,s=n&&e.timestamp-t.timestamp>n;(a||s)&&y(!0)}};try{var g=[];g.push(on("DOMContentLoaded",function(){wrappedEmit(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var E=function(){y(),g.push(initObservers({mutationCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e,t){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))},mediaInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.StyleSheetRule},e)}))},blockClass:a,ignoreClass:l,maskAllInputs:p,inlineStylesheet:u,mousemoveWait:h},f))};return"interactive"===document.readyState||"complete"===document.readyState?E():g.push(on("load",function(){wrappedEmit(wrapEvent({type:EventType.Load,data:{}})),E()},window)),function(){g.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function mitt(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map(function(e){e(r)}),(e["*"]||[]).slice().map(function(e){e(t,r)})}}}record.addCustomEvent=function(e,t){if(!wrappedEmit)throw new Error("please add custom event after start recording");wrappedEmit(wrapEvent({type:EventType.Custom,data:{tag:e,payload:t}}))};var mittProxy=Object.freeze({default:mitt});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var smoothscroll=createCommonjsModule(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var r,n=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?m.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]&&(c(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):m.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;m.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)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):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))},n.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var r=function(e){for(;e!==t.body&&!1===p(e);)e=e.parentNode||e.host;return e}(this),n=r.getBoundingClientRect(),o=this.getBoundingClientRect();r!==t.body?(m.call(this,r,r.scrollLeft+o.left-n.left,r.scrollTop+o.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function p(e){var t=u(e,"Y")&&d(e,"Y"),r=u(e,"X")&&d(e,"X");return t||r}function f(t){var r,n,i,s,l=(a()-t.startTime)/o;s=l=l>1?1:l,r=.5*(1-Math.cos(Math.PI*s)),n=t.startX+(t.x-t.startX)*r,i=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,i),n===t.x&&i===t.y||e.requestAnimationFrame(f.bind(e,t))}function m(r,n,o){var s,c,u,d,p=a();r===t.body?(s=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=r,c=r.scrollLeft,u=r.scrollTop,d=l),f({scrollable:s,method:d,startTime:p,startX:c,startY:u,x:n,y:o})}}}}()}),smoothscroll_1=smoothscroll.polyfill,Timer=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,__spread(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,r=this.config,n=this;this.raf=requestAnimationFrame(function o(i){for(n.timeOffset+=(i-e)*r.speed,e=i;t.length;){var a=t[0];if(!(n.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||n.config.liveMode)&&(n.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,r=this.actions.length-1;t<=r;){var n=Math.floor((t+r)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n;r=n-1}}return t},e}(),rules=function(e){return["iframe, ."+e+" { background: #ccc }","noscript { display: none !important; }"]},SKIP_TIME_THRESHOLD=1e4,SKIP_TIME_INTERVAL=5e3,mitt$1=mitt||mittProxy,REPLAY_CONSOLE_PREFIX="[replayer]",Replayer=function(){function e(e,t){if(this.events=[],this.emitter=mitt$1(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},this.playing=!1,e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var r={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0};this.config=Object.assign({},r,t),this.timer=new Timer(this.config),smoothscroll_1(),polyfill(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(r){t.config[r]=e[r]}),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},e.prototype.play=function(e){var t,r,n=this;void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;var o=new Array,i=function(e){var t=e.timestamp<a.baselineTime,r=a.getCastFn(e,t);t?r():o.push({doAction:function(){r(),n.emitter.emit(ReplayerEvents.EventCast,e)},delay:a.getDelay(e)})},a=this;try{for(var s=__values(this.events),l=s.next();!l.done;l=s.next()){i(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}this.timer.addActions(o),this.timer.start(),this.playing=!0,this.emitter.emit(ReplayerEvents.Start)},e.prototype.pause=function(){this.timer.clear(),this.playing=!1,this.emitter.emit(ReplayerEvents.Pause)},e.prototype.resume=function(e){var t,r;void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;var n=new Array;try{for(var o=__values(this.events),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(a.timestamp<=this.lastPlayedEvent.timestamp||a===this.lastPlayedEvent)){var s=this.getCastFn(a);n.push({doAction:s,delay:this.getDelay(a)})}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this.timer.addActions(n),this.timer.start(),this.playing=!0,this.emitter.emit(ReplayerEvents.Resume)},e.prototype.addEvent=function(e){this.getCastFn(e,!0)()},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},e.prototype.getDelay=function(e){if(e.type===EventType.IncrementalSnapshot&&e.data.source===IncrementalSource.MouseMove){var t=e.data.positions[0].timeOffset,r=e.timestamp+t;return e.delay=r-this.baselineTime,r-this.baselineTime}return e.delay=e.timestamp-this.baselineTime,e.timestamp-this.baselineTime},e.prototype.getCastFn=function(e,t){var r,n=this;switch(void 0===t&&(t=!1),e.type){case EventType.DomContentLoaded:case EventType.Load:break;case EventType.Meta:r=function(){return n.emitter.emit(ReplayerEvents.Resize,{width:e.data.width,height:e.data.height})};break;case EventType.FullSnapshot:r=function(){n.rebuildFullSnapshot(e),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case EventType.IncrementalSnapshot:r=function(){var r,o;if(n.applyIncremental(e,t),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.restoreSpeed()),n.config.skipInactive&&!n.nextUserInteractionEvent){try{for(var i=__values(n.events),a=i.next();!a.done;a=i.next()){var s=a.value;if(!(s.timestamp<=e.timestamp)&&n.isUserInteraction(s)){s.delay-e.delay>SKIP_TIME_THRESHOLD*n.config.speed&&(n.nextUserInteractionEvent=s);break}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}if(n.nextUserInteractionEvent){n.noramlSpeed=n.config.speed;var l=n.nextUserInteractionEvent.delay-e.delay,c={speed:Math.min(Math.round(l/SKIP_TIME_INTERVAL),360)};n.setConfig(c),n.emitter.emit(ReplayerEvents.SkipStart,c)}}}}return function(){r&&r(),n.lastPlayedEvent=e,e===n.events[n.events.length-1]&&(n.restoreSpeed(),n.emitter.emit(ReplayerEvents.Finish))}},e.prototype.rebuildFullSnapshot=function(e){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},mirror.map=rebuild(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),r=this.iframe.contentDocument,n=r.documentElement,o=r.head;n.insertBefore(t,o);for(var i=rules(this.config.blockClass).concat(this.config.insertStyleRules),a=0;a<i.length;a++)t.sheet.insertRule(i[a],a);this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var r,n=new Set;t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t){t.sheet||(0===n.size&&(e.timer.clear(),e.emitter.emit(ReplayerEvents.LoadStylesheetStart),r=window.setTimeout(function(){e.playing&&e.resume(e.getCurrentTime()),r=-1},e.config.loadTimeout)),n.add(t),t.addEventListener("load",function(){n.delete(t),0===n.size&&-1!==r&&(e.playing&&e.resume(e.getCurrentTime()),e.emitter.emit(ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))}))})}},e.prototype.applyIncremental=function(e,t){var r=this,n=e.data;switch(n.source){case IncrementalSource.Mutation:n.removes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);var o=mirror.getNode(e.parentId);if(!o)return r.warnNodeNotFound(n,e.parentId);mirror.removeNodeFromMap(t),o&&o.removeChild(t)});var o=__assign({},this.missingNodeRetryMap),i=[],a=function(e){var t=mirror.getNode(e.parentId);if(!t)return i.push(e);var n=buildNodeWithSN(e.node,r.iframe.contentDocument,mirror.map,!0),a=null,s=null;e.previousId&&(a=mirror.getNode(e.previousId)),e.nextId&&(s=mirror.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(a&&a.nextSibling&&a.nextSibling.parentNode?t.insertBefore(n,a.nextSibling):s&&s.parentNode?t.contains(s)?t.insertBefore(n,s):t.insertBefore(n,null):t.appendChild(n),(e.previousId||e.nextId)&&r.resolveMissingNode(o,t,n,e)):o[e.node.id]={node:n,mutation:e}};for(n.adds.forEach(function(e){a(e)});i.length;){if(i.every(function(e){return!Boolean(mirror.getNode(e.parentId))}))return i.forEach(function(e){return r.warnNodeNotFound(n,e.node.id)});var s=i.shift();a(s)}Object.keys(o).length&&Object.assign(this.missingNodeRetryMap,o),n.texts.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);t.textContent=e.value}),n.attributes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);for(var o in e.attributes)if("string"==typeof o){var i=e.attributes[o];null!==i?t.setAttribute(o,i):t.removeAttribute(o)}});break;case IncrementalSource.MouseMove:if(t){var l=n.positions[n.positions.length-1];this.moveAndHover(n,l.x,l.y,l.id)}else n.positions.forEach(function(t){var o={doAction:function(){r.moveAndHover(n,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-r.baselineTime};r.timer.addAction(o)});break;case IncrementalSource.MouseInteraction:if(-1===n.id)break;var c=new Event(MouseInteractions[n.type].toLowerCase());if(!(p=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);this.emitter.emit(ReplayerEvents.MouseInteraction,{type:n.type,target:p});var u=this.config.triggerFocus;switch(n.type){case MouseInteractions.Blur:p.blur&&p.blur();break;case MouseInteractions.Focus:u&&p.focus&&p.focus({preventScroll:!0});break;case MouseInteractions.Click:case MouseInteractions.TouchStart:case MouseInteractions.TouchEnd:t||(this.moveAndHover(n,n.x,n.y,n.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:p.dispatchEvent(c)}break;case IncrementalSource.Scroll:if(-1===n.id)break;if(!(p=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);if(p===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:n.y,left:n.x,behavior:t?"auto":"smooth"});else try{p.scrollTop=n.y,p.scrollLeft=n.x}catch(e){}break;case IncrementalSource.ViewportResize:this.emitter.emit(ReplayerEvents.Resize,{width:n.width,height:n.height});break;case IncrementalSource.Input:if(-1===n.id)break;if(!(p=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);try{p.checked=n.isChecked,p.value=n.text}catch(e){}break;case IncrementalSource.MediaInteraction:if(!(p=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);var d=p;n.type===MediaInteractions.Pause&&d.pause(),n.type===MediaInteractions.Play&&(d.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?d.play():d.addEventListener("canplay",function(){d.play()}));break;case IncrementalSource.StyleSheetRule:var p;if(!(p=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);var f=p.sheet;n.adds&&n.adds.forEach(function(e){var t=e.rule,r=e.index,n=void 0===r?void 0:Math.min(r,f.rules.length);try{f.insertRule(t,n)}catch(e){}}),n.removes&&n.removes.forEach(function(e){var t=e.index;f.deleteRule(t)})}},e.prototype.resolveMissingNode=function(e,t,r,n){var o=n.previousId,i=n.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,r),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,r,n){this.mouse.style.left=t+"px",this.mouse.style.top=r+"px";var o=mirror.getNode(n);if(!o)return this.debugNodeNotFound(e,n);this.hoverElements(o)},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList&&t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===EventType.IncrementalSnapshot&&(e.data.source>IncrementalSource.Mutation&&e.data.source<=IncrementalSource.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(ReplayerEvents.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e}(),addCustomEvent=record.addCustomEvent;export{record,addCustomEvent,Replayer,mirror,EventType,IncrementalSource,MouseInteractions,ReplayerEvents};
//# sourceMappingURL=rrweb.min.js.map
{
"name": "rrweb",
"version": "0.7.30",
"version": "0.7.31",
"description": "record and replay the web",

@@ -5,0 +5,0 @@ "scripts": {

@@ -17,2 +17,3 @@ import Timer from './timer';

private missingNodeRetryMap;
private playing;
constructor(events: eventWithTime[], config?: Partial<playerConfig>);

@@ -19,0 +20,0 @@ on(event: string, handler: Handler): void;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc