You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Exerc...

3891 lines
1.5 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[1512],{40001:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return h}});var Ae=Se(96663),Ye=Se(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},N=a,j=Se(7657),p=function(g,w){return Ye.createElement(j.Z,(0,Ae.Z)({},g,{ref:w,icon:N}))},c=Ye.forwardRef(p),h=c},26227:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return h}});var Ae=Se(96663),Ye=Se(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},N=a,j=Se(7657),p=function(g,w){return Ye.createElement(j.Z,(0,Ae.Z)({},g,{ref:w,icon:N}))},c=Ye.forwardRef(p),h=c},41464:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return h}});var Ae=Se(96663),Ye=Se(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},N=a,j=Se(7657),p=function(g,w){return Ye.createElement(j.Z,(0,Ae.Z)({},g,{ref:w,icon:N}))},c=Ye.forwardRef(p),h=c},15277:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return h}});var Ae=Se(96663),Ye=Se(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},N=a,j=Se(7657),p=function(g,w){return Ye.createElement(j.Z,(0,Ae.Z)({},g,{ref:w,icon:N}))},c=Ye.forwardRef(p),h=c},35593:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return q}});var Ae=Se(44127),Ye=Se(72071),a=Se(6620),N=Se(43403),j=Se(92310),p=Se.n(j),c=Se(29301),h=Se(76846),y=Se(96452),g=Se(6089),w=Se(80402),f=Se(34280),v=Se(49658),m=Se(59301),b=Se(96663),x=Se(77900),R=Se(8654);function I(V){var Q=V.prefixCls,L=V.align,$=V.arrow,S=V.arrowPos,T=$||{},z=T.className,ne=T.content,he=S.x,Pe=he===void 0?0:he,Oe=S.y,Ue=Oe===void 0?0:Oe,nt=m.useRef();if(!L||!L.points)return null;var Qe={position:"absolute"};if(L.autoArrow!==!1){var rt=L.points[0],We=L.points[1],Je=rt[0],Re=rt[1],Be=We[0],_e=We[1];Je===Be||!["t","b"].includes(Je)?Qe.top=Ue:Je==="t"?Qe.top=0:Qe.bottom=0,Re===_e||!["l","r"].includes(Re)?Qe.left=Pe:Re==="l"?Qe.left=0:Qe.right=0}return m.createElement("div",{ref:nt,className:p()("".concat(Q,"-arrow"),z),style:Qe},ne)}function E(V){var Q=V.prefixCls,L=V.open,$=V.zIndex,S=V.mask,T=V.motion;return S?m.createElement(x.default,(0,b.Z)({},T,{motionAppear:!0,visible:L,removeOnLeave:!0}),function(z){var ne=z.className;return m.createElement("div",{style:{zIndex:$},className:p()("".concat(Q,"-mask"),ne)})}):null}var C=m.memo(function(V){var Q=V.children;return Q},function(V,Q){return Q.cache}),P=C,Z=m.forwardRef(function(V,Q){var L=V.popup,$=V.className,S=V.prefixCls,T=V.style,z=V.target,ne=V.onVisibleChanged,he=V.open,Pe=V.keepDom,Oe=V.fresh,Ue=V.onClick,nt=V.mask,Qe=V.arrow,rt=V.arrowPos,We=V.align,Je=V.motion,Re=V.maskMotion,Be=V.forceRender,_e=V.getPopupContainer,Ve=V.autoDestroy,et=V.portal,st=V.zIndex,Et=V.onMouseEnter,Ct=V.onMouseLeave,kt=V.onPointerEnter,Pt=V.ready,_t=V.offsetX,Ot=V.offsetY,Ht=V.offsetR,Ft=V.offsetB,Qt=V.onAlign,Dt=V.onPrepare,zt=V.stretch,Mt=V.targetWidth,Jt=V.targetHeight,jt=typeof L=="function"?L():L,Ke=he||Pe,br=(_e==null?void 0:_e.length)>0,Xt=m.useState(!_e||!br),Yr=(0,Ye.Z)(Xt,2),Or=Yr[0],fn=Yr[1];if((0,f.Z)(function(){!Or&&br&&z&&fn(!0)},[Or,br,z]),!Or)return null;var kr="auto",Tr={left:"-1000vw",top:"-1000vh",right:kr,bottom:kr};if(Pt||!he){var gr,wr=We.points,rr=We.dynamicInset||((gr=We._experimental)===null||gr===void 0?void 0:gr.dynamicInset),Wr=rr&&wr[0][1]==="r",qt=rr&&wr[0][0]==="b";Wr?(Tr.right=Ht,Tr.left=kr):(Tr.left=_t,Tr.right=kr),qt?(Tr.bottom=Ft,Tr.top=kr):(Tr.top=Ot,Tr.bottom=kr)}var $r={};return zt&&(zt.includes("height")&&Jt?$r.height=Jt:zt.includes("minHeight")&&Jt&&($r.minHeight=Jt),zt.includes("width")&&Mt?$r.width=Mt:zt.includes("minWidth")&&Mt&&($r.minWidth=Mt)),he||($r.pointerEvents="none"),m.createElement(et,{open:Be||Ke,getContainer:_e&&function(){return _e(z)},autoDestroy:Ve},m.createElement(E,{prefixCls:S,open:he,zIndex:st,mask:nt,motion:Re}),m.createElement(c.Z,{onResize:Qt,disabled:!he},function(Tn){return m.createElement(x.default,(0,b.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Be,leavedClassName:"".concat(S,"-hidden")},Je,{onAppearPrepare:Dt,onEnterPrepare:Dt,visible:he,onVisibleChanged:function(Nn){var bn;Je==null||(bn=Je.onVisibleChanged)===null||bn===void 0||bn.call(Je,Nn),ne(Nn)}}),function(Wn,Nn){var bn=Wn.className,yr=Wn.style,ze=p()(S,bn,$);return m.createElement("div",{ref:(0,R.sQ)(Tn,Q,Nn),className:ze,style:(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({"--arrow-x":"".concat(rt.x||0,"px"),"--arrow-y":"".concat(rt.y||0,"px")},Tr),$r),yr),{},{boxSizing:"border-box",zIndex:st},T),onMouseEnter:Et,onMouseLeave:Ct,onPointerEnter:kt,onClick:Ue},Qe&&m.createElement(I,{prefixCls:S,arrow:Qe,arrowPos:rt,align:We}),m.createElement(P,{cache:!he&&!Oe},jt))})}))}),M=Z,J=m.forwardRef(function(V,Q){var L=V.children,$=V.getTriggerDOMNode,S=(0,R.Yr)(L),T=m.useCallback(function(ne){(0,R.mH)(Q,$?$(ne):ne)},[$]),z=(0,R.x1)(T,L.ref);return S?m.cloneElement(L,{ref:z}):L}),_=J,k=m.createContext(null),B=k;function U(V){return V?Array.isArray(V)?V:[V]:[]}function K(V,Q,L,$){return m.useMemo(function(){var S=U(L!=null?L:Q),T=U($!=null?$:Q),z=new Set(S),ne=new Set(T);return V&&(z.has("hover")&&(z.delete("hover"),z.add("click")),ne.has("hover")&&(ne.delete("hover"),ne.add("click"))),[z,ne]},[V,Q,L,$])}var G=Se(29194);function F(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],L=arguments.length>2?arguments[2]:void 0;return L?V[0]===Q[0]:V[0]===Q[0]&&V[1]===Q[1]}function W(V,Q,L,$){for(var S=L.points,T=Object.keys(V),z=0;z<T.length;z+=1){var ne,he=T[z];if(F((ne=V[he])===null||ne===void 0?void 0:ne.points,S,$))return"".concat(Q,"-placement-").concat(he)}return""}function X(V,Q,L,$){return Q||(L?{motionName:"".concat(V,"-").concat(L)}:$?{motionName:$}:null)}function re(V){return V.ownerDocument.defaultView}function oe(V){for(var Q=[],L=V==null?void 0:V.parentElement,$=["hidden","scroll","clip","auto"];L;){var S=re(L).getComputedStyle(L),T=S.overflowX,z=S.overflowY,ne=S.overflow;[T,z,ne].some(function(he){return $.includes(he)})&&Q.push(L),L=L.parentElement}return Q}function pe(V){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(V)?Q:V}function ie(V){return pe(parseFloat(V),0)}function Ie(V,Q){var L=(0,Ae.Z)({},V);return(Q||[]).forEach(function($){if(!($ instanceof HTMLBodyElement||$ instanceof HTMLHtmlElement)){var S=re($).getComputedStyle($),T=S.overflow,z=S.overflowClipMargin,ne=S.borderTopWidth,he=S.borderBottomWidth,Pe=S.borderLeftWidth,Oe=S.borderRightWidth,Ue=$.getBoundingClientRect(),nt=$.offsetHeight,Qe=$.clientHeight,rt=$.offsetWidth,We=$.clientWidth,Je=ie(ne),Re=ie(he),Be=ie(Pe),_e=ie(Oe),Ve=pe(Math.round(Ue.width/rt*1e3)/1e3),et=pe(Math.round(Ue.height/nt*1e3)/1e3),st=(rt-We-Be-_e)*Ve,Et=(nt-Qe-Je-Re)*et,Ct=Je*et,kt=Re*et,Pt=Be*Ve,_t=_e*Ve,Ot=0,Ht=0;if(T==="clip"){var Ft=ie(z);Ot=Ft*Ve,Ht=Ft*et}var Qt=Ue.x+Pt-Ot,Dt=Ue.y+Ct-Ht,zt=Qt+Ue.width+2*Ot-Pt-_t-st,Mt=Dt+Ue.height+2*Ht-Ct-kt-Et;L.left=Math.max(L.left,Qt),L.top=Math.max(L.top,Dt),L.right=Math.min(L.right,zt),L.bottom=Math.min(L.bottom,Mt)}}),L}function ee(V){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L="".concat(Q),$=L.match(/^(.*)\%$/);return $?V*(parseFloat($[1])/100):parseFloat(L)}function de(V,Q){var L=Q||[],$=(0,Ye.Z)(L,2),S=$[0],T=$[1];return[ee(V.width,S),ee(V.height,T)]}function me(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[V[0],V[1]]}function xe(V,Q){var L=Q[0],$=Q[1],S,T;return L==="t"?T=V.y:L==="b"?T=V.y+V.height:T=V.y+V.height/2,$==="l"?S=V.x:$==="r"?S=V.x+V.width:S=V.x+V.width/2,{x:S,y:T}}function ce(V,Q){var L={t:"b",b:"t",l:"r",r:"l"};return V.map(function($,S){return S===Q?L[$]||"c":$}).join("")}function le(V,Q,L,$,S,T,z){var ne=m.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:S[$]||{}}),he=(0,Ye.Z)(ne,2),Pe=he[0],Oe=he[1],Ue=m.useRef(0),nt=m.useMemo(function(){return Q?oe(Q):[]},[Q]),Qe=m.useRef({}),rt=function(){Qe.current={}};V||rt();var We=(0,g.Z)(function(){if(Q&&L&&V){let qn=function(Ri,to){var xi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ze,Fn=jt.x+Ri,ro=jt.y+to,ke=Fn+gr,Oi=ro+Tr,bo=Math.max(Fn,xi.left),Bo=Math.max(ro,xi.top),yn=Math.min(ke,xi.right),On=Math.min(Oi,xi.bottom);return Math.max(0,(yn-bo)*(On-Bo))},na=function(){An=jt.y+Rt,Rn=An+Tr,an=jt.x+ar,sn=an+gr};var Be,_e,Ve=Q,et=Ve.ownerDocument,st=re(Ve),Et=st.getComputedStyle(Ve),Ct=Et.width,kt=Et.height,Pt=Et.position,_t=Ve.style.left,Ot=Ve.style.top,Ht=Ve.style.right,Ft=Ve.style.bottom,Qt=Ve.style.overflow,Dt=(0,Ae.Z)((0,Ae.Z)({},S[$]),T),zt=et.createElement("div");(Be=Ve.parentElement)===null||Be===void 0||Be.appendChild(zt),zt.style.left="".concat(Ve.offsetLeft,"px"),zt.style.top="".concat(Ve.offsetTop,"px"),zt.style.position=Pt,zt.style.height="".concat(Ve.offsetHeight,"px"),zt.style.width="".concat(Ve.offsetWidth,"px"),Ve.style.left="0",Ve.style.top="0",Ve.style.right="auto",Ve.style.bottom="auto",Ve.style.overflow="hidden";var Mt;if(Array.isArray(L))Mt={x:L[0],y:L[1],width:0,height:0};else{var Jt=L.getBoundingClientRect();Mt={x:Jt.x,y:Jt.y,width:Jt.width,height:Jt.height}}var jt=Ve.getBoundingClientRect(),Ke=et.documentElement,br=Ke.clientWidth,Xt=Ke.clientHeight,Yr=Ke.scrollWidth,Or=Ke.scrollHeight,fn=Ke.scrollTop,kr=Ke.scrollLeft,Tr=jt.height,gr=jt.width,wr=Mt.height,rr=Mt.width,Wr={left:0,top:0,right:br,bottom:Xt},qt={left:-kr,top:-fn,right:Yr-kr,bottom:Or-fn},$r=Dt.htmlRegion,Tn="visible",Wn="visibleFirst";$r!=="scroll"&&$r!==Wn&&($r=Tn);var Nn=$r===Wn,bn=Ie(qt,nt),yr=Ie(Wr,nt),ze=$r===Tn?yr:bn,tn=Nn?yr:ze;Ve.style.left="auto",Ve.style.top="auto",Ve.style.right="0",Ve.style.bottom="0";var dn=Ve.getBoundingClientRect();Ve.style.left=_t,Ve.style.top=Ot,Ve.style.right=Ht,Ve.style.bottom=Ft,Ve.style.overflow=Qt,(_e=Ve.parentElement)===null||_e===void 0||_e.removeChild(zt);var mn=pe(Math.round(gr/parseFloat(Ct)*1e3)/1e3),He=pe(Math.round(Tr/parseFloat(kt)*1e3)/1e3);if(mn===0||He===0||(0,h.Sh)(L)&&!(0,G.Z)(L))return;var it=Dt.offset,$e=Dt.targetOffset,lt=de(jt,it),yt=(0,Ye.Z)(lt,2),dt=yt[0],pt=yt[1],at=de(Mt,$e),Nt=(0,Ye.Z)(at,2),Bt=Nt[0],vt=Nt[1];Mt.x-=Bt,Mt.y-=vt;var or=Dt.points||[],er=(0,Ye.Z)(or,2),Ar=er[0],pn=er[1],Mr=me(pn),jr=me(Ar),Kr=xe(Mt,Mr),Zr=xe(jt,jr),Nr=(0,Ae.Z)({},Dt),ar=Kr.x-Zr.x+dt,Rt=Kr.y-Zr.y+pt,_r=qn(ar,Rt),xr=qn(ar,Rt,yr),wn=xe(Mt,["t","l"]),_n=xe(jt,["t","l"]),hn=xe(Mt,["b","r"]),Xn=xe(jt,["b","r"]),nn=Dt.overflow||{},ri=nn.adjustX,Kn=nn.adjustY,on=nn.shiftX,Fr=nn.shiftY,Jn=function(to){return typeof to=="boolean"?to:to>=0},An,Rn,an,sn;na();var gn=Jn(Kn),Kt=jr[0]===Mr[0];if(gn&&jr[0]==="t"&&(Rn>tn.bottom||Qe.current.bt)){var Er=Rt;Kt?Er-=Tr-wr:Er=wn.y-Xn.y-pt;var Gr=qn(ar,Er),rn=qn(ar,Er,yr);Gr>_r||Gr===_r&&(!Nn||rn>=xr)?(Qe.current.bt=!0,Rt=Er,pt=-pt,Nr.points=[ce(jr,0),ce(Mr,0)]):Qe.current.bt=!1}if(gn&&jr[0]==="b"&&(An<tn.top||Qe.current.tb)){var zr=Rt;Kt?zr+=Tr-wr:zr=hn.y-_n.y-pt;var xn=qn(ar,zr),ni=qn(ar,zr,yr);xn>_r||xn===_r&&(!Nn||ni>=xr)?(Qe.current.tb=!0,Rt=zr,pt=-pt,Nr.points=[ce(jr,0),ce(Mr,0)]):Qe.current.tb=!1}var ii=Jn(ri),Lr=jr[1]===Mr[1];if(ii&&jr[1]==="l"&&(sn>tn.right||Qe.current.rl)){var Sr=ar;Lr?Sr-=gr-rr:Sr=wn.x-Xn.x-dt;var Hr=qn(Sr,Rt),bi=qn(Sr,Rt,yr);Hr>_r||Hr===_r&&(!Nn||bi>=xr)?(Qe.current.rl=!0,ar=Sr,dt=-dt,Nr.points=[ce(jr,1),ce(Mr,1)]):Qe.current.rl=!1}if(ii&&jr[1]==="r"&&(an<tn.left||Qe.current.lr)){var oi=ar;Lr?oi+=gr-rr:oi=hn.x-_n.x-dt;var Wi=qn(oi,Rt),fi=qn(oi,Rt,yr);Wi>_r||Wi===_r&&(!Nn||fi>=xr)?(Qe.current.lr=!0,ar=oi,dt=-dt,Nr.points=[ce(jr,1),ce(Mr,1)]):Qe.current.lr=!1}na();var Yn=on===!0?0:on;typeof Yn=="number"&&(an<yr.left&&(ar-=an-yr.left-dt,Mt.x+rr<yr.left+Yn&&(ar+=Mt.x-yr.left+rr-Yn)),sn>yr.right&&(ar-=sn-yr.right-dt,Mt.x>yr.right-Yn&&(ar+=Mt.x-yr.right+Yn)));var wi=Fr===!0?0:Fr;typeof wi=="number"&&(An<yr.top&&(Rt-=An-yr.top-pt,Mt.y+wr<yr.top+wi&&(Rt+=Mt.y-yr.top+wr-wi)),Rn>yr.bottom&&(Rt-=Rn-yr.bottom-pt,Mt.y>yr.bottom-wi&&(Rt+=Mt.y-yr.bottom+wi)));var Gt=jt.x+ar,zi=Gt+gr,di=jt.y+Rt,Hi=di+Tr,$n=Mt.x,Ai=$n+rr,go=Mt.y,ra=go+wr,yo=Math.max(Gt,$n),gt=Math.min(zi,Ai),Yt=(yo+gt)/2,Vr=Yt-Gt,cr=Math.max(di,go),Dr=Math.min(Hi,ra),En=(cr+Dr)/2,pi=En-di;z==null||z(Q,Nr);var hi=dn.right-jt.x-(ar+jt.width),vi=dn.bottom-jt.y-(Rt+jt.height);Oe({ready:!0,offsetX:ar/mn,offsetY:Rt/He,offsetR:hi/mn,offsetB:vi/He,arrowX:Vr/mn,arrowY:pi/He,scaleX:mn,scaleY:He,align:Nr})}}),Je=function(){Ue.current+=1;var _e=Ue.current;Promise.resolve().then(function(){Ue.current===_e&&We()})},Re=function(){Oe(function(_e){return(0,Ae.Z)((0,Ae.Z)({},_e),{},{ready:!1})})};return(0,f.Z)(Re,[$]),(0,f.Z)(function(){V||Re()},[V]),[Pe.ready,Pe.offsetX,Pe.offsetY,Pe.offsetR,Pe.offsetB,Pe.arrowX,Pe.arrowY,Pe.scaleX,Pe.scaleY,Pe.align,Je]}var ge=Se(19127);function Ce(V,Q,L,$,S){(0,f.Z)(function(){if(V&&Q&&L){let Ue=function(){$(),S()};var T=Q,z=L,ne=oe(T),he=oe(z),Pe=re(z),Oe=new Set([Pe].concat((0,ge.Z)(ne),(0,ge.Z)(he)));return Oe.forEach(function(nt){nt.addEventListener("scroll",Ue,{passive:!0})}),Pe.addEventListener("resize",Ue,{passive:!0}),$(),function(){Oe.forEach(function(nt){nt.removeEventListener("scroll",Ue),Pe.removeEventListener("resize",Ue)})}}},[V,Q,L])}var De=Se(48736),je=Se(16089);function fe(V,Q,L,$,S,T,z,ne){var he=m.useRef(V),Pe=m.useRef(!1);he.current!==V&&(Pe.current=!0,he.current=V),m.useEffect(function(){var Oe=(0,je.Z)(function(){Pe.current=!1});return function(){je.Z.cancel(Oe)}},[V]),m.useEffect(function(){if(Q&&$&&(!S||T)){var Oe=function(){var Pt=!1,_t=function(Ft){var Qt=Ft.target;Pt=z(Qt)},Ot=function(Ft){var Qt=Ft.target;!Pe.current&&he.current&&!Pt&&!z(Qt)&&ne(!1)};return[_t,Ot]},Ue=Oe(),nt=(0,Ye.Z)(Ue,2),Qe=nt[0],rt=nt[1],We=Oe(),Je=(0,Ye.Z)(We,2),Re=Je[0],Be=Je[1],_e=re($);_e.addEventListener("mousedown",Qe,!0),_e.addEventListener("click",rt,!0),_e.addEventListener("contextmenu",rt,!0);var Ve=(0,y.A)(L);if(Ve&&(Ve.addEventListener("mousedown",Re,!0),Ve.addEventListener("click",Be,!0),Ve.addEventListener("contextmenu",Be,!0)),0)var et,st,Et,Ct;return function(){_e.removeEventListener("mousedown",Qe,!0),_e.removeEventListener("click",rt,!0),_e.removeEventListener("contextmenu",rt,!0),Ve&&(Ve.removeEventListener("mousedown",Re,!0),Ve.removeEventListener("click",Be,!0),Ve.removeEventListener("contextmenu",Be,!0))}}},[Q,L,$,S,T])}var Y=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function be(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:N.Z,Q=m.forwardRef(function(L,$){var S=L.prefixCls,T=S===void 0?"rc-trigger-popup":S,z=L.children,ne=L.action,he=ne===void 0?"hover":ne,Pe=L.showAction,Oe=L.hideAction,Ue=L.popupVisible,nt=L.defaultPopupVisible,Qe=L.onPopupVisibleChange,rt=L.afterPopupVisibleChange,We=L.mouseEnterDelay,Je=L.mouseLeaveDelay,Re=Je===void 0?.1:Je,Be=L.focusDelay,_e=L.blurDelay,Ve=L.mask,et=L.maskClosable,st=et===void 0?!0:et,Et=L.getPopupContainer,Ct=L.forceRender,kt=L.autoDestroy,Pt=L.destroyPopupOnHide,_t=L.popup,Ot=L.popupClassName,Ht=L.popupStyle,Ft=L.popupPlacement,Qt=L.builtinPlacements,Dt=Qt===void 0?{}:Qt,zt=L.popupAlign,Mt=L.zIndex,Jt=L.stretch,jt=L.getPopupClassNameFromAlign,Ke=L.fresh,br=L.alignPoint,Xt=L.onPopupClick,Yr=L.onPopupAlign,Or=L.arrow,fn=L.popupMotion,kr=L.maskMotion,Tr=L.popupTransitionName,gr=L.popupAnimation,wr=L.maskTransitionName,rr=L.maskAnimation,Wr=L.className,qt=L.getTriggerDOMNode,$r=(0,a.Z)(L,Y),Tn=kt||Pt||!1,Wn=m.useState(!1),Nn=(0,Ye.Z)(Wn,2),bn=Nn[0],yr=Nn[1];(0,f.Z)(function(){yr((0,v.Z)())},[]);var ze=m.useRef({}),tn=m.useContext(B),dn=m.useMemo(function(){return{registerSubPopup:function(Vt,Qr){ze.current[Vt]=Qr,tn==null||tn.registerSubPopup(Vt,Qr)}}},[tn]),mn=(0,w.Z)(),He=m.useState(null),it=(0,Ye.Z)(He,2),$e=it[0],lt=it[1],yt=(0,g.Z)(function(It){(0,h.Sh)(It)&&$e!==It&&lt(It),tn==null||tn.registerSubPopup(mn,It)}),dt=m.useState(null),pt=(0,Ye.Z)(dt,2),at=pt[0],Nt=pt[1],Bt=m.useRef(null),vt=(0,g.Z)(function(It){(0,h.Sh)(It)&&at!==It&&(Nt(It),Bt.current=It)}),or=m.Children.only(z),er=(or==null?void 0:or.props)||{},Ar={},pn=(0,g.Z)(function(It){var Vt,Qr,Pr=at;return(Pr==null?void 0:Pr.contains(It))||((Vt=(0,y.A)(Pr))===null||Vt===void 0?void 0:Vt.host)===It||It===Pr||($e==null?void 0:$e.contains(It))||((Qr=(0,y.A)($e))===null||Qr===void 0?void 0:Qr.host)===It||It===$e||Object.values(ze.current).some(function(qr){return(qr==null?void 0:qr.contains(It))||It===qr})}),Mr=X(T,fn,gr,Tr),jr=X(T,kr,rr,wr),Kr=m.useState(nt||!1),Zr=(0,Ye.Z)(Kr,2),Nr=Zr[0],ar=Zr[1],Rt=Ue!=null?Ue:Nr,_r=(0,g.Z)(function(It){Ue===void 0&&ar(It)});(0,f.Z)(function(){ar(Ue||!1)},[Ue]);var xr=m.useRef(Rt);xr.current=Rt;var wn=m.useRef([]);wn.current=[];var _n=(0,g.Z)(function(It){var Vt;_r(It),((Vt=wn.current[wn.current.length-1])!==null&&Vt!==void 0?Vt:Rt)!==It&&(wn.current.push(It),Qe==null||Qe(It))}),hn=m.useRef(),Xn=function(){clearTimeout(hn.current)},nn=function(Vt){var Qr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Xn(),Qr===0?_n(Vt):hn.current=setTimeout(function(){_n(Vt)},Qr*1e3)};m.useEffect(function(){return Xn},[]);var ri=m.useState(!1),Kn=(0,Ye.Z)(ri,2),on=Kn[0],Fr=Kn[1];(0,f.Z)(function(It){(!It||Rt)&&Fr(!0)},[Rt]);var Jn=m.useState(null),An=(0,Ye.Z)(Jn,2),Rn=An[0],an=An[1],sn=m.useState([0,0]),gn=(0,Ye.Z)(sn,2),Kt=gn[0],Er=gn[1],Gr=function(Vt){Er([Vt.clientX,Vt.clientY])},rn=le(Rt,$e,br?Kt:at,Ft,Dt,zt,Yr),zr=(0,Ye.Z)(rn,11),xn=zr[0],ni=zr[1],ii=zr[2],Lr=zr[3],Sr=zr[4],Hr=zr[5],bi=zr[6],oi=zr[7],Wi=zr[8],fi=zr[9],Yn=zr[10],wi=K(bn,he,Pe,Oe),Gt=(0,Ye.Z)(wi,2),zi=Gt[0],di=Gt[1],Hi=zi.has("click"),$n=di.has("click")||di.has("contextMenu"),Ai=(0,g.Z)(function(){on||Yn()}),go=function(){xr.current&&br&&$n&&nn(!1)};Ce(Rt,at,$e,Ai,go),(0,f.Z)(function(){Ai()},[Kt,Ft]),(0,f.Z)(function(){Rt&&!(Dt!=null&&Dt[Ft])&&Ai()},[JSON.stringify(zt)]);var ra=m.useMemo(function(){var It=W(Dt,T,fi,br);return p()(It,jt==null?void 0:jt(fi))},[fi,jt,Dt,T,br]);m.useImperativeHandle($,function(){return{nativeElement:Bt.current,forceAlign:Ai}});var yo=m.useState(0),gt=(0,Ye.Z)(yo,2),Yt=gt[0],Vr=gt[1],cr=m.useState(0),Dr=(0,Ye.Z)(cr,2),En=Dr[0],pi=Dr[1],hi=function(){if(Jt&&at){var Vt=at.getBoundingClientRect();Vr(Vt.width),pi(Vt.height)}},vi=function(){hi(),Ai()},qn=function(Vt){Fr(!1),Yn(),rt==null||rt(Vt)},na=function(){return new Promise(function(Vt){hi(),an(function(){return Vt})})};(0,f.Z)(function(){Rn&&(Yn(),Rn(),an(null))},[Rn]);function Ri(It,Vt,Qr,Pr){Ar[It]=function(qr){var mi;Pr==null||Pr(qr),nn(Vt,Qr);for(var Ge=arguments.length,Cn=new Array(Ge>1?Ge-1:0),Ln=1;Ln<Ge;Ln++)Cn[Ln-1]=arguments[Ln];(mi=er[It])===null||mi===void 0||mi.call.apply(mi,[er,qr].concat(Cn))}}(Hi||$n)&&(Ar.onClick=function(It){var Vt;xr.current&&$n?nn(!1):!xr.current&&Hi&&(Gr(It),nn(!0));for(var Qr=arguments.length,Pr=new Array(Qr>1?Qr-1:0),qr=1;qr<Qr;qr++)Pr[qr-1]=arguments[qr];(Vt=er.onClick)===null||Vt===void 0||Vt.call.apply(Vt,[er,It].concat(Pr))}),fe(Rt,$n,at,$e,Ve,st,pn,nn);var to=zi.has("hover"),xi=di.has("hover"),Fn,ro;to&&(Ri("onMouseEnter",!0,We,function(It){Gr(It)}),Ri("onPointerEnter",!0,We,function(It){Gr(It)}),Fn=function(Vt){(Rt||on)&&$e!==null&&$e!==void 0&&$e.contains(Vt.target)&&nn(!0,We)},br&&(Ar.onMouseMove=function(It){var Vt;(Vt=er.onMouseMove)===null||Vt===void 0||Vt.call(er,It)})),xi&&(Ri("onMouseLeave",!1,Re),Ri("onPointerLeave",!1,Re),ro=function(){nn(!1,Re)}),zi.has("focus")&&Ri("onFocus",!0,Be),di.has("focus")&&Ri("onBlur",!1,_e),zi.has("contextMenu")&&(Ar.onContextMenu=function(It){var Vt;xr.current&&di.has("contextMenu")?nn(!1):(Gr(It),nn(!0)),It.preventDefault();for(var Qr=arguments.length,Pr=new Array(Qr>1?Qr-1:0),qr=1;qr<Qr;qr++)Pr[qr-1]=arguments[qr];(Vt=er.onContextMenu)===null||Vt===void 0||Vt.call.apply(Vt,[er,It].concat(Pr))}),Wr&&(Ar.className=p()(er.className,Wr));var ke=(0,Ae.Z)((0,Ae.Z)({},er),Ar),Oi={},bo=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];bo.forEach(function(It){$r[It]&&(Oi[It]=function(){for(var Vt,Qr=arguments.length,Pr=new Array(Qr),qr=0;qr<Qr;qr++)Pr[qr]=arguments[qr];(Vt=ke[It])===null||Vt===void 0||Vt.call.apply(Vt,[ke].concat(Pr)),$r[It].apply($r,Pr)})});var Bo=m.cloneElement(or,(0,Ae.Z)((0,Ae.Z)({},ke),Oi)),yn={x:Hr,y:bi},On=Or?(0,Ae.Z)({},Or!==!0?Or:{}):null;return m.createElement(m.Fragment,null,m.createElement(c.Z,{disabled:!Rt,ref:vt,onResize:vi},m.createElement(_,{getTriggerDOMNode:qt},Bo)),m.createElement(B.Provider,{value:dn},m.createElement(M,{portal:V,ref:yt,prefixCls:T,popup:_t,className:p()(Ot,ra),style:Ht,target:at,onMouseEnter:Fn,onMouseLeave:ro,onPointerEnter:Fn,zIndex:Mt,open:Rt,keepDom:on,fresh:Ke,onClick:Xt,mask:Ve,motion:Mr,maskMotion:jr,onVisibleChanged:qn,onPrepare:na,forceRender:Ct,autoDestroy:Tn,getPopupContainer:Et,align:fi,arrow:On,arrowPos:yn,ready:xn,offsetX:ni,offsetY:ii,offsetR:Lr,offsetB:Sr,onAlign:Ai,stretch:Jt,targetWidth:Yt/oi,targetHeight:En/Wi})))});return Q}var q=be(N.Z)},81939:function(Zt,ut,Se){"use strict";Se.d(ut,{cT:function(){return k},pe:function(){return M}});var Ae=Se(59301),Ye=Se(54580),a=Se(8591),N=Se(99064),j=Se(28209),p=Se.n(j),c=Se(1012),h=Se(89070),y=Se(47257),g=Se.n(y),w=Object.defineProperty,f=Object.defineProperties,v=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,R=(U,K,G)=>K in U?w(U,K,{enumerable:!0,configurable:!0,writable:!0,value:G}):U[K]=G,I=(U,K)=>{for(var G in K||(K={}))b.call(K,G)&&R(U,G,K[G]);if(m)for(var G of m(K))x.call(K,G)&&R(U,G,K[G]);return U},E=(U,K)=>f(U,v(K)),C=(U,K)=>{var G={};for(var F in U)b.call(U,F)&&K.indexOf(F)<0&&(G[F]=U[F]);if(U!=null&&m)for(var F of m(U))K.indexOf(F)<0&&x.call(U,F)&&(G[F]=U[F]);return G},P=(U,K,G)=>new Promise((F,W)=>{var X=pe=>{try{oe(G.next(pe))}catch(ie){W(ie)}},re=pe=>{try{oe(G.throw(pe))}catch(ie){W(ie)}},oe=pe=>pe.done?F(pe.value):Promise.resolve(pe.value).then(X,re);oe((G=G.apply(U,K)).next())});const{Dragger:Z}=Ye.default,M=U=>{const K="bf3c199c2470cb477d907b1e0917c17b",G="5183666c72eec9e4";var F=p().enc.Utf8.parse(K);let W=p().enc.Utf8.parse(G);var X=p().AES.decrypt(U,F,{iv:W,mode:p().mode.CBC});return X.toString(p().enc.Utf8)};let J;const _=U=>P(void 0,[U],function*({identifier:K,oldFilename:G,newFilename:F}){var W,X,re,oe,pe,ie;const Ie=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});Ie.data=JSON.parse(M(Ie.data));const ee=new OSS({endpoint:(W=Ie==null?void 0:Ie.data)==null?void 0:W.end_point,region:(X=Ie==null?void 0:Ie.data)==null?void 0:X.region,accessKeyId:(re=Ie==null?void 0:Ie.data)==null?void 0:re.access_key_id,accessKeySecret:(oe=Ie==null?void 0:Ie.data)==null?void 0:oe.access_key_secret,bucket:(pe=Ie==null?void 0:Ie.data)==null?void 0:pe.bucket,stsToken:(ie=Ie==null?void 0:Ie.data)==null?void 0:ie.security_token});return new Promise((de,me)=>{console.log(11111,`${K}/${G}`,`${K}/${F}`,Ie.data),ee.copy(`/${K}/${G}`,`/${K}/${F}`).then(xe=>{console.log("\u62F7\u8D1D\u6210\u529F",xe)}).catch(xe=>{console.log(xe)})})}),k=(U,K,G)=>P(void 0,null,function*(){var F,W,X,re,oe,pe;K.file_name=U.name;const ie=yield(0,N.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",M(ie.data)),ie.data=JSON.parse(M(ie.data));const Ie=U.name.split(".");Ie.pop();const ee=K.realFileName?Ie.join(""):(0,c.Z)(),de=new(g())({endpoint:(F=ie==null?void 0:ie.data)==null?void 0:F.end_point,region:(W=ie==null?void 0:ie.data)==null?void 0:W.region,accessKeyId:(X=ie==null?void 0:ie.data)==null?void 0:X.access_key_id,accessKeySecret:(re=ie==null?void 0:ie.data)==null?void 0:re.access_key_secret,bucket:(oe=ie==null?void 0:ie.data)==null?void 0:oe.bucket,stsToken:(pe=ie==null?void 0:ie.data)==null?void 0:pe.security_token});return new Promise((me,xe)=>{var ce;de.multipartUpload(`${ee}`,new Blob([U],{type:U.type}),E(I({timeout:200*1e3,partSize:102400},G),{callback:{url:(ce=ie==null?void 0:ie.data)==null?void 0:ce.callback_url,host:ie==null?void 0:ie.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,N.rz)(K)}})).then(function(le){var ge;U.response=(ge=le.data)==null?void 0:ge.data,me(le==null?void 0:le.data)}).catch(function(le){xe(le),console.log("err:",le)})})}),B=U=>{var K=U,{user:G,cancelUpload:F}=K,W=C(K,["user","cancelUpload"]);const[X,re]=(0,Ae.useState)([]);let[oe,pe]=(0,Ae.useState)();const ie={onRemove:ee=>{re([...X.filter(de=>de.name!==ee.name)]),W.onChange(X.filter(de=>de.name!==ee.name))},disabled:W.disabled,multiple:!0,fileList:X==null?void 0:X.map(ee=>ee.file),customRequest:()=>{},beforeUpload:ee=>P(void 0,null,function*(){let de=W.maxSize||1073741824;if(X.filter(me=>me.name===ee.name).length){a.ZP.info(`${ee.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(ee==null?void 0:ee.size)>de?(a.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${de/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(X.push({name:ee.name,file:ee}),re([...X]),W.onChange(X),!1)})},Ie=(ee,de)=>P(void 0,null,function*(){var me,xe,ce,le,ge,Ce;de.file_name=ee.name;const De=ee.name,je=yield(0,N.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(je.data=JSON.parse(M(je.data)),(je==null?void 0:je.status)!==0){X[X.findIndex(be=>be.name===De)].status="error",X[X.findIndex(be=>be.name===De)].file.status="error",W.onChange(X),a.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}oe=new(g())({endpoint:(me=je==null?void 0:je.data)==null?void 0:me.end_point,region:(xe=je==null?void 0:je.data)==null?void 0:xe.region,accessKeyId:(ce=je==null?void 0:je.data)==null?void 0:ce.access_key_id,accessKeySecret:(le=je==null?void 0:je.data)==null?void 0:le.access_key_secret,bucket:(ge=je==null?void 0:je.data)==null?void 0:ge.bucket,stsToken:(Ce=je==null?void 0:je.data)==null?void 0:Ce.security_token}),console.log(ee,"file"),pe(oe);const fe=ee.name.split(".");fe.pop();const Y=De.indexOf(".")>-1?de.realFileName?fe.join("."):(0,c.Z)():De;return new Promise((be,q)=>{var V;try{oe.multipartUpload(`${W.identifier}/${Y}${De.indexOf(".")>-1?"."+De.split(".").pop():""}`,new Blob([ee.file],{type:ee.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Q,L,$)=>{try{console.log("\u8FDB\u5EA6",Q,L,$);const S=X.findIndex(T=>T.name===De);X[S].file.percent=Q*100,X[S].tempCheckpoint=L,re([...X])}catch(S){}},checkpoint:X[X.findIndex(Q=>Q.name===De)].tempCheckpoint,callback:{customValue:{id:De+""},url:(V=je==null?void 0:je.data)==null?void 0:V.callback_url,host:je==null?void 0:je.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,N.rz)(de)}}).then(function(Q){var L,$,S;const T=X.findIndex(ne=>ne.name===De);let z="done";if(((L=Q.data)==null?void 0:L.status)===0){ee.response=($=Q.data)==null?void 0:$.data;const ne=X.findIndex(he=>he.name===De);X[ne].status="done",X[ne].file.status="done"}else a.ZP.warning((S=Q.data)==null?void 0:S.message),z="error";X[T].status=z,X[T].file.status=z,W.onChange(X),be(Q==null?void 0:Q.data)}).catch(function(Q){X[X.findIndex(L=>L.name===De)].status="error",X[X.findIndex(L=>L.name===De)].file.status="error",a.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),re([...X]),W.onChange(X),q(Q),console.log("err:",Q)})}catch(Q){}})});return(0,Ae.useEffect)(()=>{X.every(ee=>ee==="done"||ee==="error")&&W.onComplete(X)},[X]),(0,Ae.useEffect)(()=>{F&&(oe==null||oe.cancel())},[F]),(0,Ae.useEffect)(()=>{W.uploading&&X.map(ee=>P(void 0,null,function*(){var de;if((!ee.status||ee.status==="error")&&!F){ee.status="uploading",ee.file.status="uploading";const me=yield Ie(ee,{login:(de=G==null?void 0:G.userInfo)==null?void 0:de.login,container_type:W.container_type,container_id:W.container_id,description:W.description,realFileName:W.realFileName})}}))},[W.uploading]),Ae.createElement(Z,E(I({},ie),{height:W.height,className:W.className}),Ae.createElement("p",{className:"ant-upload-hint"},W.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};ut.ZP=(0,h.connect)(({loading:U,globalSetting:K,user:G})=>({globalSetting:K,loading:U.models.competitions,user:G}))(B)},18522:function(Zt,ut,Se){"use strict";Se.r(ut),Se.d(ut,{default:function(){return $0}});var Ae=Se(59301),Ye=Se(89070),a=Se(31797),N=Se(45413),j=Se(8591),p=Se(3113),c=Se(95237),h=Se(43604),y=Se(43418),g={flex_box_center:"flex_box_center___uIDcP",flex_space_between:"flex_space_between___l5roZ",flex_box_vertical_center:"flex_box_vertical_center___mj8nW",flex_box_center_end:"flex_box_center_end___v4Eig",flex_box_column:"flex_box_column___SQn0H",bg:"bg___H5S8d",steps:"steps___mrlSw",qrcode:"qrcode___xRSbG"},w=Se(955),f=Se(94941),v=Se(15845),m=Se.n(v),b=Se(97671),x=Se(19208).lW;var R=function(n,t){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])})(n,t)};function I(n,t){function e(){this.constructor=n}R(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function E(n,t,e,r){return new(e||(e=Promise))(function(i,o){function s(d){try{l(r.next(d))}catch(A){o(A)}}function u(d){try{l(r.throw(d))}catch(A){o(A)}}function l(d){d.done?i(d.value):new e(function(A){A(d.value)}).then(s,u)}l((r=r.apply(n,t||[])).next())})}function C(n,t){var e,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(l){return function(d){return function(A){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,r&&(i=2&A[0]?r.return:A[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,A[1])).done)return i;switch(r=0,i&&(A=[2&A[0],i.value]),A[0]){case 0:case 1:i=A;break;case 4:return s.label++,{value:A[1],done:!1};case 5:s.label++,r=A[1],A=[0];continue;case 7:A=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(A[0]===6||A[0]===2)){s=0;continue}if(A[0]===3&&(!i||A[1]>i[0]&&A[1]<i[3])){s.label=A[1];break}if(A[0]===6&&s.label<i[1]){s.label=i[1],i=A;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(A);break}i[2]&&s.ops.pop(),s.trys.pop();continue}A=t.call(n,s)}catch(O){A=[6,O],r=0}finally{e=i=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([l,d])}}}var P=function(){function n(t){this.global=t,this.flags={},this.flagRegistry={},this.urlFlags={},this.populateURLFlags()}return n.prototype.setPlatform=function(t,e){this.platform!=null&&console.warn("Platform "+this.platformName+" has already been set. Overwriting the platform with "+e+"."),this.platformName=t,this.platform=e},n.prototype.registerFlag=function(t,e,r){if(this.flagRegistry[t]={evaluationFn:e,setHook:r},this.urlFlags[t]!=null){var i=this.urlFlags[t];console.warn("Setting feature override from URL "+t+": "+i+"."),this.set(t,i)}},n.prototype.get=function(t){return t in this.flags?this.flags[t]:(this.flags[t]=this.evaluateFlag(t),this.flags[t])},n.prototype.getNumber=function(t){return this.get(t)},n.prototype.getBool=function(t){return this.get(t)},n.prototype.getFlags=function(){return this.flags},Object.defineProperty(n.prototype,"features",{get:function(){return this.flags},enumerable:!0,configurable:!0}),n.prototype.set=function(t,e){if(this.flagRegistry[t]==null)throw new Error("Cannot set flag "+t+" as it has not been registered.");this.flags[t]=e,this.flagRegistry[t].setHook!=null&&this.flagRegistry[t].setHook(e)},n.prototype.evaluateFlag=function(t){if(this.flagRegistry[t]==null)throw new Error("Cannot evaluate flag '"+t+"': no evaluation function found.");return this.flagRegistry[t].evaluationFn()},n.prototype.setFlags=function(t){this.flags=Object.assign({},t)},n.prototype.reset=function(){this.flags={},this.urlFlags={},this.populateURLFlags()},n.prototype.populateURLFlags=function(){var t=this;if(this.global!==void 0&&this.global.location!==void 0&&this.global.location.search!==void 0){var e,r,i=(e=this.global.location.search,r={},e.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,function(o){for(var s=[],u=1;u<arguments.length;u++)s[u-1]=arguments[u];return Z(r,s[0],s[1]),s.join("=")}),r);"tfjsflags"in i&&i.tfjsflags.split(",").forEach(function(o){var s=o.split(":"),u=s[0],l=s[1];t.urlFlags[u]=function(d,A){if((A=A.toLowerCase())==="true"||A==="false")return A==="true";if(""+ +A===A)return+A;throw new Error("Could not parse value flag value "+A+" for flag "+d+".")}(u,l)})}},n}();function Z(n,t,e){n[decodeURIComponent(t)]=decodeURIComponent(e||"")}function M(){return J}var J=null,_=new Map,k=new Map;function B(n,t){var e=re(n,t);return _.get(e)}function U(n){return k.get(n)}function K(n){for(var t=_.entries(),e=[];;){var r=t.next(),i=r.done,o=r.value;if(i)break;var s=o[0],u=o[1];s.split("_")[0]===n&&e.push(u)}return e}function G(n){var t=n.kernelName,e=n.backendName,r=re(t,e);if(_.has(r))throw new Error("The kernel '"+t+"' for backend '"+e+"' is already registered");_.set(r,n)}function F(n){var t=n.kernelName;k.has(t)&&console.warn("Overriding the gradient for '"+t+"'"),k.set(t,n)}function W(n,t){var e=re(n,t);if(!_.has(e))throw new Error("The kernel '"+n+"' for backend '"+t+"' is not registered");_.delete(e)}function X(n){if(!k.has(n))throw new Error("The gradient '"+n+"' for backend is not registered");k.delete(n)}function re(n,t){return t+"_"+n}function oe(n){for(var t=n.length,e=0,r=0;t>0;)r=Math.random()*t|0,e=n[--t],n[t]=n[r],n[r]=e}function pe(n,t,e){return Math.max(n,Math.min(t,e))}function ie(n){return n%2==0?n:n+1}function Ie(n){for(var t=0,e=0;e<n.length;e++)t+=n[e];return t}function ee(n,t){if(!n)throw new Error(typeof t=="string"?t:t())}function de(n,t,e){e===void 0&&(e=""),ee(le(n,t),function(){return e+" Shapes "+n+" and "+t+" must match"})}function me(n){ee(n!=null,function(){return"The input to the tensor constructor must be a non-null value."})}function xe(n,t,e){if(t===void 0&&(t=[]),e===void 0&&(e=!1),t==null&&(t=[]),Array.isArray(n)||T(n)&&!e)for(var r=0;r<n.length;++r)xe(n[r],t,e);else t.push(n);return t}function ce(n){if(n.length===0)return 1;for(var t=n[0],e=1;e<n.length;e++)t*=n[e];return t}function le(n,t){if(n===t)return!0;if(n==null||t==null||n.length!==t.length)return!1;for(var e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}function ge(n){return n%1==0}function Ce(n){if(Math.tanh!=null)return Math.tanh(n);if(n===1/0)return 1;if(n===-1/0)return-1;var t=Math.exp(2*n);return(t-1)/(t+1)}function De(n){var t=Math.ceil(Math.sqrt(n));return[t,Math.ceil(n/t)]}function je(n,t){return t<=n.length?n:n+" ".repeat(t-n.length)}function fe(n,t,e){return t===void 0&&(t=function(r){return 0}),new Promise(function(r,i){var o=0,s=function(){if(n())r();else{o++;var u=t(o);e!=null&&o>=e?i():setTimeout(s,u)}};s()})}function Y(n,t){for(var e=1,r=-1,i=0;i<n.length;++i)if(n[i]>=0)e*=n[i];else if(n[i]===-1){if(r!==-1)throw Error("Shapes can only have 1 implicit size. Found -1 at dim "+r+" and dim "+i);r=i}else if(n[i]<0)throw Error("Shapes can not be < 0. Found "+n[i]+" at dim "+i);if(r===-1){if(t>0&&t!==e)throw Error("Size("+t+") must match the product of shape "+n);return n}if(e===0)throw Error("Cannot infer the missing size in ["+n+"] when there are 0 elements");if(t%e!=0)throw Error("The implicit shape can't be a fractional number. Got "+t+" / "+e);var o=n.slice();return o[r]=t/e,o}function be(n,t){var e=t.length;return ee((n=n==null?t.map(function(r,i){return i}):[].concat(n)).every(function(r){return r>=-e&&r<e}),function(){return"All values in axis param must be in range [-"+e+", "+e+") but got axis "+n}),ee(n.every(function(r){return ge(r)}),function(){return"All values in axis param must be integers but got axis "+n}),n.map(function(r){return r<0?e+r:r})}function q(n,t){for(var e=[],r=[],i=t!=null&&Array.isArray(t)&&t.length===0,o=t==null||i?null:be(t,n).sort(),s=0,u=0;u<n.length;++u){if(o!=null){if(o[s]===u&&n[u]!==1)throw new Error("Can't squeeze axis "+u+" since its dim '"+n[u]+"' is not 1");(o[s]==null||o[s]>u)&&n[u]===1&&(e.push(n[u]),r.push(u)),o[s]<=u&&s++}n[u]!==1&&(e.push(n[u]),r.push(u))}return{newShape:e,keptDims:r}}function V(n,t){var e=null;if(n==null||n==="float32")e=new Float32Array(t);else if(n==="int32")e=new Int32Array(t);else{if(n!=="bool")throw new Error("Unknown data type "+n);e=new Uint8Array(t)}return e}function Q(n,t){var e=null;if(n==null||n==="float32")e=new Float32Array(t);else if(n==="int32")e=new Int32Array(t);else if(n==="bool")e=new Uint8Array(t);else{if(n!=="string")throw new Error("Unknown data type "+n);e=new Array(t)}return e}function L(n,t){for(var e=0;e<n.length;e++){var r=n[e];if(isNaN(r)||!isFinite(r))throw Error("A tensor of type "+t+" being uploaded contains "+r+".")}}function $(n){return n==="bool"||n==="complex64"||n==="float32"||n==="int32"||n==="string"}function S(n,t){return t!=="complex64"&&(t!=="float32"||n==="complex64")&&(t!=="int32"||n==="float32"||n==="complex64")&&(t!=="bool"||n!=="bool")}function T(n){return n instanceof Float32Array||n instanceof Int32Array||n instanceof Uint8Array}function z(n){if(n==="float32"||n==="int32")return 4;if(n==="complex64")return 8;if(n==="bool")return 1;throw new Error("Unknown dtype "+n)}function ne(n){if(n==null)return 0;var t=0;return n.forEach(function(e){return t+=e.length}),t}function he(n){return typeof n=="string"||n instanceof String}function Pe(n){return typeof n=="boolean"}function Oe(n){return typeof n=="number"}function Ue(n){return Array.isArray(n)?Ue(n[0]):n instanceof Float32Array?"float32":n instanceof Int32Array||n instanceof Uint8Array?"int32":Oe(n)?"float32":he(n)?"string":Pe(n)?"bool":"float32"}function nt(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Qe(n,t){for(var e=t;e<n;++e)if(n%e==0)return e;return n}function rt(n){var t=n.length;if(t<2)return[];var e=new Array(t-1);e[t-2]=n[t-1];for(var r=t-3;r>=0;--r)e[r]=e[r+1]*n[r+1];return e}function We(n,t,e){if(t==="string")throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(n)&&(n=xe(n)),e&&L(n,t),function(o,s){return o instanceof Float32Array&&s==="float32"||o instanceof Int32Array&&s==="int32"||o instanceof Uint8Array&&s==="bool"}(n,t))return n;if(t==null||t==="float32"||t==="complex64")return new Float32Array(n);if(t==="int32")return new Int32Array(n);if(t==="bool"){for(var r=new Uint8Array(n.length),i=0;i<r.length;++i)Math.round(n[i])!==0&&(r[i]=1);return r}throw new Error("Unknown data type "+t)}function Je(n,t){if(n.length===0)return t[0];var e=n.reduce(function(r,i){return r*i});if(e===0)return[];if(e!==t.length)throw new Error("["+n+"] does not match the input size.");return function r(i,o,s){var u=new Array;if(o.length===1)for(var l=o[0],d=0;d<l;d++)u[d]=s[i+d];else{l=o[0];var A=o.slice(1),O=A.reduce(function(D,H){return D*H});for(d=0;d<l;d++)u[d]=r(i+d*O,A,s)}return u}(0,n,t)}function Re(n,t){for(var e=Be(n,t),r=0;r<e.length;r++)e[r]=1;return e}function Be(n,t){if(t==null||t==="float32"||t==="complex64")return new Float32Array(n);if(t==="int32")return new Int32Array(n);if(t==="bool")return new Uint8Array(n);throw new Error("Unknown data type "+t)}function _e(){return M().platform.now()}function Ve(n){n.forEach(function(t){ee(Number.isInteger(t)&&t>=0,function(){return"Tensor must have a shape comprised of positive integers but got shape ["+n+"]."})})}function et(n,t){return t===void 0&&(t="utf-8"),t=t||"utf-8",M().platform.encode(n,t)}function st(n,t){return t===void 0&&(t="utf-8"),t=t||"utf-8",M().platform.decode(n,t)}function Et(n,t,e){if(t===0)return 0;if(t===1)return n[0];for(var r=n[n.length-1],i=0;i<n.length-1;++i)r+=e[i]*n[i];return r}function Ct(n,t,e){if(t===0)return[];if(t===1)return[n];for(var r=new Array(t),i=0;i<r.length-1;++i)r[i]=Math.floor(n/e[i]),n-=r[i]*e[i];return r[r.length-1]=n,r}var kt=Object.freeze({shuffle:oe,clamp:pe,nearestLargerEven:ie,sum:Ie,randUniform:function(n,t){var e=Math.random();return t*e+(1-e)*n},distSquared:function(n,t){for(var e=0,r=0;r<n.length;r++){var i=Number(n[r])-Number(t[r]);e+=i*i}return e},assert:ee,assertShapesMatch:de,assertNonNull:me,flatten:xe,sizeFromShape:ce,isScalarShape:function(n){return n.length===0},arraysEqual:le,isInt:ge,tanh:Ce,sizeToSquarishShape:De,createShuffledIndices:function(n){for(var t=new Uint32Array(n),e=0;e<n;++e)t[e]=e;return oe(t),t},rightPad:je,repeatedTry:fe,inferFromImplicitShape:Y,parseAxisParam:be,squeezeShape:q,getTypedArrayFromDType:V,getArrayFromDType:Q,checkConversionForErrors:L,isValidDtype:$,hasEncodingLoss:S,isTypedArray:T,bytesPerElement:z,bytesFromStringArray:ne,isString:he,isBoolean:Pe,isNumber:Oe,inferDtype:Ue,isFunction:nt,nearestDivisor:Qe,computeStrides:rt,toTypedArray:We,toNestedArray:Je,makeOnesTypedArray:Re,makeZerosTypedArray:Be,now:_e,assertNonNegativeIntegerDimensions:Ve,fetch:function(n,t){return M().platform.fetch(n,t)},encodeString:et,decodeString:st,locToIndex:Et,indexToLoc:Ct}),Pt=function(){function n(t,e){this.backendTimer=t,this.logger=e,e==null&&(this.logger=new _t)}return n.prototype.profileKernel=function(t,e,r){var i,o=this,s=this.backendTimer.time(function(){i=r()});return i.forEach(function(u){u.data().then(function(l){(function(d,A,O){if(A!=="float32")return!1;for(var D=0;D<d.length;D++){var H=d[D];if(isNaN(H)||!isFinite(H))return console.warn("Found "+H+" in the result of '"+O+"'"),!0}})(l,u.dtype,t),s.then(function(d){var A="";d.getExtraProfileInfo!=null&&(A=d.getExtraProfileInfo()),o.logger.logKernelProfile(t,u,l,d.kernelMs,e,A)})})}),i},n}(),_t=function(){function n(){}return n.prototype.logKernelProfile=function(t,e,r,i,o,s){var u=typeof i=="number"?je(i+"ms",9):i.error,l=je(t,25),d=e.rank,A=e.size,O=je(e.shape.toString(),14),D="";for(var H in o){var te=o[H].shape||e.shape,se=te.length;D+=H+": "+se+"D "+(se>0?te:"")+" "}console.log("%c"+l+" %c"+u+" %c"+d+"D "+O+" %c"+A+" %c"+D+" %c"+s,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")},n}(),Ot=20,Ht=3,Ft=7;function Qt(n,t,e,r){var i=rt(t),o=function(d,A,O,D){var H=ce(A),te=D[D.length-1],se=new Array(te).fill(0),ae=A.length,ue=O==="complex64"?Mt(d):d;if(ae>1)for(var ye=0;ye<H/te;ye++)for(var we=ye*te,ve=0;ve<te;ve++)se[ve]=Math.max(se[ve],Dt(ue[we+ve],0,O).length);return se}(n,t,e,i),s=t.length,u=function d(A,O,D,H,te,se){se===void 0&&(se=!0);var ae=D==="complex64"?2:1,ue=O[0],ye=O.length;if(ye===0)return D==="complex64"?[Dt(Mt(A)[0],0,D)]:D==="bool"?[zt(A[0])]:[A[0].toString()];if(ye===1){if(ue>Ot){var we=Ht*ae,ve=Array.from(A.slice(0,we)),Ee=Array.from(A.slice((ue-Ht)*ae,ue*ae));return D==="complex64"&&(ve=Mt(ve),Ee=Mt(Ee)),["["+ve.map(function(ct,bt){return Dt(ct,te[bt],D)}).join(", ")+", ..., "+Ee.map(function(ct,bt){return Dt(ct,te[ue-Ht+bt],D)}).join(", ")+"]"]}return["["+(D==="complex64"?Mt(A):Array.from(A)).map(function(ct,bt){return Dt(ct,te[bt],D)}).join(", ")+"]"]}var Te=O.slice(1),Fe=H.slice(1),Le=H[0]*ae,Me=[];if(ue>Ot){for(var Ne=0;Ne<Ht;Ne++){var Ze=(Xe=Ne*Le)+Le;Me.push.apply(Me,d(A.slice(Xe,Ze),Te,D,Fe,te,!1))}for(Me.push("..."),Ne=ue-Ht;Ne<ue;Ne++)Ze=(Xe=Ne*Le)+Le,Me.push.apply(Me,d(A.slice(Xe,Ze),Te,D,Fe,te,Ne===ue-1))}else for(Ne=0;Ne<ue;Ne++){var Xe;Ze=(Xe=Ne*Le)+Le,Me.push.apply(Me,d(A.slice(Xe,Ze),Te,D,Fe,te,Ne===ue-1))}var qe=ye===2?",":"";for(Me[0]="["+Me[0]+qe,Ne=1;Ne<Me.length-1;Ne++)Me[Ne]=" "+Me[Ne]+qe;var tt=`,
`;for(Ne=2;Ne<ye;Ne++)tt+=`
`;return Me[Me.length-1]=" "+Me[Me.length-1]+"]"+(se?"":tt),Me}(n,t,e,i,o),l=["Tensor"];return r&&(l.push(" dtype: "+e),l.push(" rank: "+s),l.push(" shape: ["+t+"]"),l.push(" values:")),l.push(u.map(function(d){return" "+d}).join(`
`)),l.join(`
`)}function Dt(n,t,e){return je(Array.isArray(n)?parseFloat(n[0].toFixed(Ft))+" + "+parseFloat(n[1].toFixed(Ft))+"j":he(n)?"'"+n+"'":e==="bool"?zt(n):parseFloat(n.toFixed(Ft)).toString(),t)}function zt(n){return n===0?"false":"true"}function Mt(n){for(var t=[],e=0;e<n.length;e+=2)t.push([n[e],n[e+1]]);return t}var Jt=function(){function n(t,e,r){var i=this;if(this.dtype=e,this.shape=t.slice(),this.size=ce(t),r!=null){var o=r.length;ee(o===this.size,function(){return"Length of values '"+o+"' does not match the size inferred by the shape '"+i.size+"'."})}if(e==="complex64")throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=r||Q(e,this.size),this.strides=rt(t)}return n.prototype.set=function(t){for(var e=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];r.length===0&&(r=[0]),ee(r.length===this.rank,function(){return"The number of provided coordinates ("+r.length+") must match the rank ("+e.rank+")"});var o=this.locToIndex(r);this.values[o]=t},n.prototype.get=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];t.length===0&&(t=[0]);for(var r=0,i=0,o=t;i<o.length;i++){var s=o[i];if(s<0||s>=this.shape[r]){var u="Requested out of range element at "+t+". Buffer shape="+this.shape;throw new Error(u)}r++}for(var l=t[t.length-1],d=0;d<t.length-1;++d)l+=this.strides[d]*t[d];return this.values[l]},n.prototype.locToIndex=function(t){if(this.rank===0)return 0;if(this.rank===1)return t[0];for(var e=t[t.length-1],r=0;r<t.length-1;++r)e+=this.strides[r]*t[r];return e},n.prototype.indexToLoc=function(t){if(this.rank===0)return[];if(this.rank===1)return[t];for(var e=new Array(this.shape.length),r=0;r<e.length-1;++r)e[r]=Math.floor(t/this.strides[r]),t-=e[r]*this.strides[r];return e[e.length-1]=t,e},Object.defineProperty(n.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),n.prototype.toTensor=function(){return jt().makeTensor(this.values,this.shape,this.dtype)},n}(),jt=null,Ke=null,br=null,Xt=function(){function n(t,e,r,i){this.kept=!1,this.isDisposedInternal=!1,this.shape=t.slice(),this.dtype=e||"float32",this.size=ce(t),this.strides=rt(t),this.dataId=r,this.id=i,this.rankType=this.rank<5?this.rank.toString():"higher"}return n.prototype.flatten=function(){return this.throwIfDisposed(),this.as1D()},n.prototype.asScalar=function(){return this.throwIfDisposed(),ee(this.size===1,function(){return"The array must have only 1 element."}),this.reshape([])},n.prototype.as1D=function(){return this.throwIfDisposed(),this.reshape([this.size])},n.prototype.as2D=function(t,e){return this.throwIfDisposed(),this.reshape([t,e])},n.prototype.as3D=function(t,e,r){return this.throwIfDisposed(),this.reshape([t,e,r])},n.prototype.as4D=function(t,e,r,i){return this.throwIfDisposed(),this.reshape([t,e,r,i])},n.prototype.as5D=function(t,e,r,i,o){return this.throwIfDisposed(),this.reshape([t,e,r,i,o])},n.prototype.asType=function(t){return this.throwIfDisposed(),Ke.cast(this,t)},Object.defineProperty(n.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),n.prototype.buffer=function(){return E(this,void 0,void 0,function(){var t;return C(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,Ke.buffer(this.shape,this.dtype,t)]}})})},n.prototype.bufferSync=function(){return Ke.buffer(this.shape,this.dtype,this.dataSync())},n.prototype.array=function(){return E(this,void 0,void 0,function(){var t;return C(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,Je(this.shape,t)]}})})},n.prototype.arraySync=function(){return Je(this.shape,this.dataSync())},n.prototype.data=function(){return E(this,void 0,void 0,function(){var t,e;return C(this,function(r){switch(r.label){case 0:return this.throwIfDisposed(),t=jt().read(this.dataId),this.dtype!=="string"?[3,2]:[4,t];case 1:e=r.sent();try{return[2,e.map(function(i){return st(i)})]}catch(i){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}r.label=2;case 2:return[2,t]}})})},n.prototype.dataSync=function(){this.throwIfDisposed();var t=jt().readSync(this.dataId);if(this.dtype==="string")try{return t.map(function(e){return st(e)})}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return t},n.prototype.bytes=function(){return E(this,void 0,void 0,function(){var t;return C(this,function(e){switch(e.label){case 0:return this.throwIfDisposed(),[4,jt().read(this.dataId)];case 1:return t=e.sent(),this.dtype==="string"?[2,t]:[2,new Uint8Array(t.buffer)]}})})},n.prototype.dispose=function(){this.isDisposed||(jt().disposeTensor(this),this.isDisposedInternal=!0)},Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this.isDisposedInternal},enumerable:!0,configurable:!0}),n.prototype.throwIfDisposed=function(){if(this.isDisposed)throw new Error("Tensor is disposed.")},n.prototype.toFloat=function(){return this.asType("float32")},n.prototype.toInt=function(){return this.asType("int32")},n.prototype.toBool=function(){return this.asType("bool")},n.prototype.print=function(t){return t===void 0&&(t=!1),Ke.print(this,t)},n.prototype.reshape=function(t){return this.throwIfDisposed(),Ke.reshape(this,t)},n.prototype.reshapeAs=function(t){return this.throwIfDisposed(),this.reshape(t.shape)},n.prototype.expandDims=function(t){return t===void 0&&(t=0),Ke.expandDims(this,t)},n.prototype.cumsum=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=!1),r===void 0&&(r=!1),Ke.cumsum(this,t,e,r)},n.prototype.squeeze=function(t){return this.throwIfDisposed(),Ke.squeeze(this,t)},n.prototype.clone=function(){return this.throwIfDisposed(),Ke.clone(this)},n.prototype.oneHot=function(t,e,r){return this.throwIfDisposed(),Ke.oneHot(this,t,e,r)},n.prototype.toString=function(t){return t===void 0&&(t=!1),Qt(this.dataSync(),this.shape,this.dtype,t)},n.prototype.tile=function(t){return this.throwIfDisposed(),Ke.tile(this,t)},n.prototype.gather=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),Ke.gather(this,t,e)},n.prototype.matMul=function(t,e,r){return e===void 0&&(e=!1),r===void 0&&(r=!1),this.throwIfDisposed(),Ke.matMul(this,t,e,r)},n.prototype.dot=function(t){return this.throwIfDisposed(),Ke.dot(this,t)},n.prototype.norm=function(t,e,r){return t===void 0&&(t="euclidean"),e===void 0&&(e=null),r===void 0&&(r=!1),this.throwIfDisposed(),Ke.norm(this,t,e,r)},n.prototype.slice=function(t,e){return this.throwIfDisposed(),Ke.slice(this,t,e)},n.prototype.reverse=function(t){return this.throwIfDisposed(),Ke.reverse(this,t)},n.prototype.concat=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),t instanceof n&&(t=[t]),Ke.concat([this].concat(t),e)},n.prototype.split=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),Ke.split(this,t,e)},n.prototype.stack=function(t,e){return e===void 0&&(e=0),Ke.stack([this,t],e)},n.prototype.unstack=function(t){return t===void 0&&(t=0),Ke.unstack(this,t)},n.prototype.pad=function(t,e){return e===void 0&&(e=0),Ke.pad(this,t,e)},n.prototype.batchNormalization=function(t,e,r,i,o){return r===void 0&&(r=.001),br("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon"),this.batchNorm(t,e,o,i,r)},n.prototype.batchNorm=function(t,e,r,i,o){return o===void 0&&(o=.001),this.throwIfDisposed(),Ke.batchNorm(this,t,e,r,i,o)},n.prototype.all=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Ke.all(this,t,e)},n.prototype.any=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Ke.any(this,t,e)},n.prototype.logSumExp=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Ke.logSumExp(this,t,e)},n.prototype.sum=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Ke.sum(this,t,e)},n.prototype.prod=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Ke.prod(this,t,e)},n.prototype.mean=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Ke.mean(this,t,e)},n.prototype.min=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Ke.min(this,t,e)},n.prototype.max=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Ke.max(this,t,e)},n.prototype.argMin=function(t){return t===void 0&&(t=null),this.throwIfDisposed(),Ke.argMin(this,t)},n.prototype.argMax=function(t){return t===void 0&&(t=null),this.throwIfDisposed(),Ke.argMax(this,t)},n.prototype.cast=function(t){return this.throwIfDisposed(),Ke.cast(this,t)},n.prototype.add=function(t){return this.throwIfDisposed(),Ke.add(this,t)},n.prototype.addStrict=function(t){return this.throwIfDisposed(),Ke.addStrict(this,t)},n.prototype.atan2=function(t){return this.throwIfDisposed(),Ke.atan2(this,t)},n.prototype.sub=function(t){return this.throwIfDisposed(),Ke.sub(this,t)},n.prototype.subStrict=function(t){return this.throwIfDisposed(),Ke.subStrict(this,t)},n.prototype.pow=function(t){return this.throwIfDisposed(),Ke.pow(this,t)},n.prototype.powStrict=function(t){return this.throwIfDisposed(),Ke.powStrict(this,t)},n.prototype.mul=function(t){return this.throwIfDisposed(),Ke.mul(this,t)},n.prototype.mulStrict=function(t){return this.throwIfDisposed(),Ke.mulStrict(this,t)},n.prototype.div=function(t){return this.throwIfDisposed(),Ke.div(this,t)},n.prototype.divNoNan=function(t){return this.throwIfDisposed(),Ke.divNoNan(this,t)},n.prototype.floorDiv=function(t){return this.throwIfDisposed(),Ke.floorDiv(this,t)},n.prototype.divStrict=function(t){return this.throwIfDisposed(),Ke.divStrict(this,t)},n.prototype.minimum=function(t){return this.throwIfDisposed(),Ke.minimum(this,t)},n.prototype.minimumStrict=function(t){return this.throwIfDisposed(),Ke.minimumStrict(this,t)},n.prototype.maximum=function(t){return this.throwIfDisposed(),Ke.maximum(this,t)},n.prototype.maximumStrict=function(t){return this.throwIfDisposed(),Ke.maximumStrict(this,t)},n.prototype.mod=function(t){return this.throwIfDisposed(),Ke.mod(this,t)},n.prototype.modStrict=function(t){return this.throwIfDisposed(),Ke.modStrict(this,t)},n.prototype.squaredDifferenceStrict=function(t){return this.throwIfDisposed(),Ke.squaredDifferenceStrict(this,t)},n.prototype.transpose=function(t){return this.throwIfDisposed(),Ke.transpose(this,t)},n.prototype.notEqual=function(t){return this.throwIfDisposed(),Ke.notEqual(this,t)},n.prototype.notEqualStrict=function(t){return this.throwIfDisposed(),Ke.notEqualStrict(this,t)},n.prototype.less=function(t){return this.throwIfDisposed(),Ke.less(this,t)},n.prototype.lessStrict=function(t){return this.throwIfDisposed(),Ke.lessStrict(this,t)},n.prototype.equal=function(t){return this.throwIfDisposed(),Ke.equal(this,t)},n.prototype.equalStrict=function(t){return this.throwIfDisposed(),Ke.equalStrict(this,t)},n.prototype.lessEqual=function(t){return this.throwIfDisposed(),Ke.lessEqual(this,t)},n.prototype.lessEqualStrict=function(t){return this.throwIfDisposed(),Ke.lessEqualStrict(this,t)},n.prototype.greater=function(t){return this.throwIfDisposed(),Ke.greater(this,t)},n.prototype.greaterStrict=function(t){return this.throwIfDisposed(),Ke.greaterStrict(this,t)},n.prototype.greaterEqual=function(t){return this.throwIfDisposed(),Ke.greaterEqual(this,t)},n.prototype.greaterEqualStrict=function(t){return this.throwIfDisposed(),Ke.greaterEqualStrict(this,t)},n.prototype.logicalAnd=function(t){return this.throwIfDisposed(),Ke.logicalAnd(this,t)},n.prototype.logicalOr=function(t){return this.throwIfDisposed(),Ke.logicalOr(this,t)},n.prototype.logicalNot=function(){return this.throwIfDisposed(),Ke.logicalNot(this)},n.prototype.logicalXor=function(t){return this.throwIfDisposed(),Ke.logicalXor(this,t)},n.prototype.where=function(t,e){return this.throwIfDisposed(),Ke.where(t,this,e)},n.prototype.neg=function(){return this.throwIfDisposed(),Ke.neg(this)},n.prototype.ceil=function(){return this.throwIfDisposed(),Ke.ceil(this)},n.prototype.floor=function(){return this.throwIfDisposed(),Ke.floor(this)},n.prototype.sign=function(){return this.throwIfDisposed(),Ke.sign(this)},n.prototype.isNaN=function(){return this.throwIfDisposed(),Ke.isNaN(this)},n.prototype.isInf=function(){return this.throwIfDisposed(),Ke.isInf(this)},n.prototype.isFinite=function(){return this.throwIfDisposed(),Ke.isFinite(this)},n.prototype.exp=function(){return this.throwIfDisposed(),Ke.exp(this)},n.prototype.expm1=function(){return this.throwIfDisposed(),Ke.expm1(this)},n.prototype.log=function(){return this.throwIfDisposed(),Ke.log(this)},n.prototype.log1p=function(){return this.throwIfDisposed(),Ke.log1p(this)},n.prototype.sqrt=function(){return this.throwIfDisposed(),Ke.sqrt(this)},n.prototype.rsqrt=function(){return this.throwIfDisposed(),Ke.rsqrt(this)},n.prototype.square=function(){return this.throwIfDisposed(),Ke.square(this)},n.prototype.reciprocal=function(){return this.throwIfDisposed(),Ke.reciprocal(this)},n.prototype.abs=function(){return this.throwIfDisposed(),Ke.abs(this)},n.prototype.clipByValue=function(t,e){return this.throwIfDisposed(),Ke.clipByValue(this,t,e)},n.prototype.relu=function(){return this.throwIfDisposed(),Ke.relu(this)},n.prototype.relu6=function(){return this.throwIfDisposed(),Ke.relu6(this)},n.prototype.elu=function(){return this.throwIfDisposed(),Ke.elu(this)},n.prototype.selu=function(){return this.throwIfDisposed(),Ke.selu(this)},n.prototype.leakyRelu=function(t){return t===void 0&&(t=.2),this.throwIfDisposed(),Ke.leakyRelu(this,t)},n.prototype.prelu=function(t){return this.throwIfDisposed(),Ke.prelu(this,t)},n.prototype.sigmoid=function(){return this.throwIfDisposed(),Ke.sigmoid(this)},n.prototype.logSigmoid=function(){return this.throwIfDisposed(),Ke.logSigmoid(this)},n.prototype.softplus=function(){return this.throwIfDisposed(),Ke.softplus(this)},n.prototype.zerosLike=function(){return this.throwIfDisposed(),Ke.zerosLike(this)},n.prototype.onesLike=function(){return this.throwIfDisposed(),Ke.onesLike(this)},n.prototype.sin=function(){return this.throwIfDisposed(),Ke.sin(this)},n.prototype.cos=function(){return this.throwIfDisposed(),Ke.cos(this)},n.prototype.tan=function(){return this.throwIfDisposed(),Ke.tan(this)},n.prototype.asin=function(){return this.throwIfDisposed(),Ke.asin(this)},n.prototype.acos=function(){return this.throwIfDisposed(),Ke.acos(this)},n.prototype.atan=function(){return this.throwIfDisposed(),Ke.atan(this)},n.prototype.sinh=function(){return this.throwIfDisposed(),Ke.sinh(this)},n.prototype.cosh=function(){return this.throwIfDisposed(),Ke.cosh(this)},n.prototype.tanh=function(){return this.throwIfDisposed(),Ke.tanh(this)},n.prototype.asinh=function(){return this.throwIfDisposed(),Ke.asinh(this)},n.prototype.acosh=function(){return this.throwIfDisposed(),Ke.acosh(this)},n.prototype.atanh=function(){return this.throwIfDisposed(),Ke.atanh(this)},n.prototype.erf=function(){return this.throwIfDisposed(),Ke.erf(this)},n.prototype.round=function(){return this.throwIfDisposed(),Ke.round(this)},n.prototype.step=function(t){return t===void 0&&(t=0),this.throwIfDisposed(),Ke.step(this,t)},n.prototype.softmax=function(t){return t===void 0&&(t=-1),this.throwIfDisposed(),Ke.softmax(this,t)},n.prototype.logSoftmax=function(t){return t===void 0&&(t=-1),this.throwIfDisposed(),Ke.logSoftmax(this,t)},n.prototype.resizeBilinear=function(t,e){return e===void 0&&(e=!1),this.throwIfDisposed(),Ke.image.resizeBilinear(this,t,e)},n.prototype.resizeNearestNeighbor=function(t,e){return e===void 0&&(e=!1),this.throwIfDisposed(),Ke.image.resizeNearestNeighbor(this,t,e)},n.prototype.conv1d=function(t,e,r,i,o,s){return i===void 0&&(i="NWC"),o===void 0&&(o=1),this.throwIfDisposed(),Ke.conv1d(this,t,e,r,i,o,s)},n.prototype.conv2d=function(t,e,r,i,o,s){return i===void 0&&(i="NHWC"),o===void 0&&(o=[1,1]),this.throwIfDisposed(),Ke.conv2d(this,t,e,r,i,o,s)},n.prototype.conv2dTranspose=function(t,e,r,i,o){return this.throwIfDisposed(),Ke.conv2dTranspose(this,t,e,r,i,o)},n.prototype.depthwiseConv2D=function(t,e,r,i,o,s){return i===void 0&&(i="NHWC"),o===void 0&&(o=[1,1]),this.throwIfDisposed(),Ke.depthwiseConv2d(this,t,e,r,i,o,s)},n.prototype.separableConv2d=function(t,e,r,i,o,s){return o===void 0&&(o=[1,1]),s===void 0&&(s="NHWC"),this.throwIfDisposed(),Ke.separableConv2d(this,t,e,r,i,o,s)},n.prototype.avgPool=function(t,e,r,i){return this.throwIfDisposed(),Ke.avgPool(this,t,e,r,i)},n.prototype.maxPool=function(t,e,r,i){return this.throwIfDisposed(),Ke.maxPool(this,t,e,r,i)},n.prototype.localResponseNormalization=function(t,e,r,i){return t===void 0&&(t=5),e===void 0&&(e=1),r===void 0&&(r=1),i===void 0&&(i=.5),Ke.localResponseNormalization(this,t,e,r,i)},n.prototype.pool=function(t,e,r,i,o){return this.throwIfDisposed(),Ke.pool(this,t,e,r,i,o)},n.prototype.variable=function(t,e,r){return t===void 0&&(t=!0),this.throwIfDisposed(),jt().makeVariable(this,t,e,r)},n.prototype.unsortedSegmentSum=function(t,e){return this.throwIfDisposed(),Ke.unsortedSegmentSum(this,t,e)},n.prototype.batchToSpaceND=function(t,e){return this.throwIfDisposed(),Ke.batchToSpaceND(this,t,e)},n.prototype.spaceToBatchND=function(t,e){return this.throwIfDisposed(),Ke.spaceToBatchND(this,t,e)},n.prototype.topk=function(t,e){return t===void 0&&(t=1),e===void 0&&(e=!0),this.throwIfDisposed(),Ke.topk(this,t,e)},n.prototype.stridedSlice=function(t,e,r,i,o,s,u,l){return i===void 0&&(i=0),o===void 0&&(o=0),s===void 0&&(s=0),u===void 0&&(u=0),l===void 0&&(l=0),this.throwIfDisposed(),Ke.stridedSlice(this,t,e,r,i,o,s,u,l)},n.prototype.depthToSpace=function(t,e){return this.throwIfDisposed(),Ke.depthToSpace(this,t,e)},n.prototype.fft=function(){return this.throwIfDisposed(),Ke.spectral.fft(this)},n.prototype.ifft=function(){return this.throwIfDisposed(),Ke.spectral.ifft(this)},n.prototype.rfft=function(){return this.throwIfDisposed(),Ke.spectral.rfft(this)},n.prototype.irfft=function(){return this.throwIfDisposed(),Ke.spectral.irfft(this)},n}();Object.defineProperty(Xt,Symbol.hasInstance,{value:function(n){return!!n&&n.dataId!=null&&n.shape!=null&&n.dtype!=null}});var Yr,Or,fn,kr,Tr,gr=function(n){function t(e,r,i,o){var s=n.call(this,e.shape,e.dtype,e.dataId,o)||this;return s.trainable=r,s.name=i,s}return I(t,n),t.prototype.assign=function(e){if(e.dtype!==this.dtype)throw new Error("dtype of the new value ("+e.dtype+") and previous value ("+this.dtype+") must match");if(!le(e.shape,this.shape))throw new Error("shape of the new value ("+e.shape+") and previous value ("+this.shape+") must match");jt().disposeTensor(this),this.dataId=e.dataId,jt().incRef(this,null)},t.prototype.dispose=function(){jt().disposeVariable(this),this.isDisposedInternal=!0},t}(Xt);Object.defineProperty(gr,Symbol.hasInstance,{value:function(n){return n instanceof Xt&&n.assign!=null&&n.assign instanceof Function}}),function(n){n.R0="R0",n.R1="R1",n.R2="R2",n.R3="R3",n.R4="R4",n.R5="R5",n.R6="R6"}(Yr||(Yr={})),function(n){n.float32="float32",n.int32="int32",n.bool="int32",n.complex64="complex64"}(Or||(Or={})),function(n){n.float32="float32",n.int32="int32",n.bool="bool",n.complex64="complex64"}(fn||(fn={})),function(n){n.float32="float32",n.int32="float32",n.bool="float32",n.complex64="complex64"}(kr||(kr={})),function(n){n.float32="complex64",n.int32="complex64",n.bool="complex64",n.complex64="complex64"}(Tr||(Tr={}));var wr={float32:kr,int32:Or,bool:fn,complex64:Tr};function rr(n,t){if(n==="string"||t==="string"){if(n==="string"&&t==="string")return"string";throw new Error("Can not upcast "+n+" with "+t)}return wr[n][t]}function Wr(n){return rr(n,"int32")}function qt(n,t){if(n.dtype===t.dtype)return[n,t];var e=rr(n.dtype,t.dtype);return[n.cast(e),t.cast(e)]}function $r(n,t){ee(n.dtype===t.dtype,function(){return"The dtypes of the first("+n.dtype+") and second("+t.dtype+") input must match"})}function Tn(n){var t=[];return function e(r,i,o){if(r!=null){if(r instanceof Xt)return void i.push(r);if(s=r,!(!Array.isArray(s)&&typeof s!="object")){var s,u=r;for(var l in u){var d=u[l];o.has(d)||(o.add(d),e(d,i,o))}}}}(n,t,new Set),t}var Wn,Nn=Object.freeze({makeTypesMatch:qt,assertTypesMatch:$r,isTensorInList:function(n,t){return t.some(function(e){return e.id===n.id})},getTensorsInContainer:Tn}),bn=function(){function n(){this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.numDataMovesStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiling=!1,this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null}}return n.prototype.dispose=function(){for(var t in this.registeredVariables)this.registeredVariables[t].dispose()},n}(),yr=function(){function n(t){this.ENV=t,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new bn}return n.prototype.ready=function(){return E(this,void 0,void 0,function(){var t,e,r;return C(this,function(i){switch(i.label){case 0:if(this.pendingBackendInit!=null)return[2,this.pendingBackendInit.then(function(){})];if(this.backendInstance!=null)return[2];t=this.getSortedBackends(),e=0,i.label=1;case 1:return e<t.length?(r=t[e],[4,this.initializeBackend(r).success]):[3,5];case 2:return i.sent()?[4,this.setBackend(r)]:[3,4];case 3:return i.sent(),[2];case 4:return e++,[3,1];case 5:throw new Error("Could not initialize any backends, all backend initializations failed.")}})})},Object.defineProperty(n.prototype,"backend",{get:function(){if(this.pendingBackendInit!=null)throw new Error("Backend '"+this.backendName+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");if(this.backendInstance==null){var t=this.initializeBackendsAndReturnBest(),e=t.name;if(t.asyncInit)throw new Error("The highest priority backend '"+e+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");this.setBackend(e)}return this.backendInstance},enumerable:!0,configurable:!0}),n.prototype.backendNames=function(){return Object.keys(this.registryFactory)},n.prototype.findBackend=function(t){return!(t in this.registry)&&(!(t in this.registryFactory)||this.initializeBackend(t).asyncInit)?null:this.registry[t]},n.prototype.findBackendFactory=function(t){return t in this.registryFactory?this.registryFactory[t].factory:null},n.prototype.registerBackend=function(t,e,r){return r===void 0&&(r=1),t in this.registryFactory?(console.warn(t+" backend was already registered. Reusing existing backend factory."),!1):(this.registryFactory[t]={factory:e,priority:r},!0)},n.prototype.setBackend=function(t){return E(this,void 0,void 0,function(){var e,r,i;return C(this,function(o){switch(o.label){case 0:if(this.registryFactory[t]==null)throw new Error("Backend name '"+t+"' not found in registry");return this.backendName=t,this.registry[t]!=null?[3,4]:(this.backendInstance=null,e=this.initializeBackend(t),r=e.success,e.asyncInit?[4,r]:[3,2]);case 1:return i=o.sent(),[3,3];case 2:i=r,o.label=3;case 3:if(!i)return[2,!1];o.label=4;case 4:return this.backendInstance=this.registry[t],this.setupRegisteredKernels(),this.profiler=new Pt(this.backendInstance),[2,!0]}})})},n.prototype.setupRegisteredKernels=function(){var t=this;K(this.backendName).forEach(function(e){e.setupFunc!=null&&e.setupFunc(t.backendInstance)})},n.prototype.disposeRegisteredKernels=function(t){var e=this;K(t).forEach(function(r){r.disposeFunc!=null&&r.disposeFunc(e.registry[t])})},n.prototype.initializeBackend=function(t){var e=this,r=this.registryFactory[t];if(r==null)throw new Error("Cannot initialize backend "+t+", no registration found.");try{var i=r.factory();if(Promise.resolve(i)===i){var o=++this.pendingBackendInitId,s=i.then(function(u){return!(o<e.pendingBackendInitId)&&(e.registry[t]=u,e.pendingBackendInit=null,!0)}).catch(function(u){return!(o<e.pendingBackendInitId)&&(e.pendingBackendInit=null,console.warn("Initialization of backend "+t+" failed"),console.warn(u.stack||u.message),!1)});return this.pendingBackendInit=s,{success:s,asyncInit:!0}}return this.registry[t]=i,{success:!0,asyncInit:!1}}catch(u){return console.warn("Initialization of backend "+t+" failed"),console.warn(u.stack||u.message),{success:!1,asyncInit:!1}}},n.prototype.removeBackend=function(t){if(!(t in this.registryFactory))throw new Error(t+" backend not found in registry");this.backendName===t&&this.pendingBackendInit!=null&&this.pendingBackendInitId++,t in this.registry&&(this.disposeRegisteredKernels(t),this.registry[t].dispose(),delete this.registry[t]),delete this.registryFactory[t],this.backendName===t&&(this.pendingBackendInit=null,this.backendName=null,this.backendInstance=null)},n.prototype.getSortedBackends=function(){var t=this;if(Object.keys(this.registryFactory).length===0)throw new Error("No backend found in registry.");return Object.keys(this.registryFactory).sort(function(e,r){return t.registryFactory[r].priority-t.registryFactory[e].priority})},n.prototype.initializeBackendsAndReturnBest=function(){for(var t=this.getSortedBackends(),e=0;e<t.length;e++){var r=t[e],i=this.initializeBackend(r),o=i.success,s=i.asyncInit;if(s||o)return{name:r,asyncInit:s}}throw new Error("Could not initialize any backends, all backend initializations failed.")},n.prototype.moveData=function(t,e){var r=this.state.tensorInfo.get(e),i=r.backend,o=this.readSync(e);i.disposeData(e),r.backend=t,t.move(e,o,r.shape,r.dtype),this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack[this.state.numDataMovesStack.length-1]++},n.prototype.tidy=function(t,e){var r,i=this,o=null;if(e==null){if(typeof t!="function")throw new Error("Please provide a function to tidy()");e=t}else{if(typeof t!="string"&&!(t instanceof String))throw new Error("When calling with two arguments, the first argument to tidy() must be a string");if(typeof e!="function")throw new Error("When calling with two arguments, the 2nd argument to tidy() must be a function");o=t}return this.scopedRun(function(){return i.startScope(o)},function(){return i.endScope(r)},function(){return(r=e())instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),r})},n.prototype.scopedRun=function(t,e,r){t();try{var i=r();return e(),i}catch(o){throw e(),o}},n.prototype.nextTensorId=function(){return n.nextTensorId++},n.prototype.nextVariableId=function(){return n.nextVariableId++},n.prototype.clone=function(t){var e=this.makeTensorFromDataId(t.dataId,t.shape,t.dtype),r={x:t};return this.addTapeNode(this.state.activeScope.name,r,[e],function(i){return{x:function(){return i.toFloat()}}},[]),e},n.prototype.runKernel=function(t,e,r,i,o){return this.runKernelFunc(null,e,null,t,r,i,o)},n.prototype.shouldCheckForMemLeaks=function(){return this.ENV.getBool("IS_TEST")},n.prototype.checkKernelForMemLeak=function(t,e,r){var i=this.backend.numDataIds(),o=0;r.forEach(function(l){o+=l.dtype==="complex64"?3:1});var s=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],u=i-e-o-s;if(u>0)throw new Error("Backend '"+this.backendName+"' has an internal memory leak ("+u+" data ids) after running '"+t+"'")},n.prototype.runKernelFunc=function(t,e,r,i,o,s,u){var l,d=this;s===void 0&&(s=[]),u===void 0&&(u=[]);var A=[],O=this.isTapeOn();i==null&&(i=this.state.activeScope!=null?this.state.activeScope.name:"");var D,H=function(ye){O&&(A=ye.map(function(we){return d.keep(d.clone(we))}))},te=this.state.numBytes,se=this.state.numTensors;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0);var ae,ue=B(i,this.backendName);return D=ue!=null?function(){var ye=d.backend.numDataIds();ae=ue.kernelFunc({inputs:e,attrs:o,backend:d.backend});var we=Array.isArray(ae)?ae:[ae];d.shouldCheckForMemLeaks()&&d.checkKernelForMemLeak(i,ye,we);var ve=we.map(function(Te){var Fe=Te.dataId,Le=Te.shape,Me=Te.dtype;return d.makeTensorFromDataId(Fe,Le,Me)}),Ee=ve.filter(function(Te,Fe){return u[Fe]});return H((s||[]).slice().concat(Ee)),ve}:function(){var ye=d.backend.numDataIds();ae=d.tidy(function(){return t(d.backend,H)});var we=Array.isArray(ae)?ae:[ae];return d.shouldCheckForMemLeaks()&&d.checkKernelForMemLeak(i,ye,we),we},this.scopedRun(function(){return d.state.kernelDepth++},function(){return d.state.kernelDepth--},function(){l=d.ENV.getBool("DEBUG")?d.profiler.profileKernel(i,e,function(){return D()}):D()}),O&&this.addTapeNode(i,e,l,r,A),this.state.profiling&&this.state.activeProfile.kernels.push({name:i,bytesAdded:this.state.numBytes-te,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-se,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(e).map(function(ye){return e[ye].shape}),outputShapes:l.map(function(ye){return ye.shape})}),Array.isArray(ae)?l:l[0]},n.prototype.makeTensor=function(t,e,r,i){if(t==null)throw new Error("Values passed to engine.makeTensor() are null");r=r||"float32",i=i||this.backend;var o=t;r==="string"&&he(t[0])&&(o=t.map(function(A){return et(A)}));var s=i.write(o,e,r),u=new Xt(e,r,s,this.nextTensorId());if(this.incRef(u,i),r==="string"){var l=this.state.tensorInfo.get(s),d=ne(o);this.state.numBytes+=d-l.bytes,l.bytes=d}return u},n.prototype.makeTensorFromDataId=function(t,e,r,i){var o=new Xt(e,r=r||"float32",t,this.nextTensorId());return this.incRef(o,i),o},n.prototype.makeVariable=function(t,e,r,i){e===void 0&&(e=!0),r=r||this.nextVariableId().toString(),i!=null&&i!==t.dtype&&(t=t.asType(i));var o=new gr(t,e,r,this.nextTensorId());if(this.state.registeredVariables[o.name]!=null)throw new Error("Variable with name "+o.name+" was already registered");return this.state.registeredVariables[o.name]=o,this.incRef(o,this.backend),o},n.prototype.incRef=function(t,e){var r=this.state.tensorInfo.has(t.dataId)?this.state.tensorInfo.get(t.dataId).refCount:0;if(this.state.numTensors++,t.dtype==="string"&&this.state.numStringTensors++,r===0){this.state.numDataBuffers++;var i=0;t.dtype!=="complex64"&&t.dtype!=="string"&&(i=t.size*z(t.dtype)),this.state.tensorInfo.set(t.dataId,{backend:e||this.backend,dtype:t.dtype,shape:t.shape,bytes:i,refCount:0}),this.state.numBytes+=i}this.state.tensorInfo.get(t.dataId).refCount++,t instanceof gr||this.track(t)},n.prototype.disposeTensor=function(t){if(this.state.tensorInfo.has(t.dataId)){this.state.numTensors--,t.dtype==="string"&&this.state.numStringTensors--;var e=this.state.tensorInfo.get(t.dataId);e.refCount<=1?(t.dtype!=="complex64"&&(this.state.numBytes-=e.bytes),this.state.numDataBuffers--,e.backend.disposeData(t.dataId),this.state.tensorInfo.delete(t.dataId)):this.state.tensorInfo.get(t.dataId).refCount--}},n.prototype.disposeVariables=function(){for(var t in this.state.registeredVariables){var e=this.state.registeredVariables[t];this.disposeVariable(e)}},n.prototype.disposeVariable=function(t){this.disposeTensor(t),this.state.registeredVariables[t.name]!=null&&delete this.state.registeredVariables[t.name]},n.prototype.memory=function(){var t=this.backend.memory();return t.numTensors=this.state.numTensors,t.numDataBuffers=this.state.numDataBuffers,t.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(t.unreliable=!0,t.reasons==null&&(t.reasons=[]),t.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),t},n.prototype.profile=function(t){return E(this,void 0,void 0,function(){var e,r;return C(this,function(i){return this.state.profiling=!0,e=this.state.numBytes,r=this.state.numTensors,this.state.activeProfile.kernels=[],this.state.activeProfile.result=t(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max.apply(Math,this.state.activeProfile.kernels.map(function(o){return o.totalBytesSnapshot})),this.state.activeProfile.newBytes=this.state.numBytes-e,this.state.activeProfile.newTensors=this.state.numTensors-r,[2,this.state.activeProfile]})})},n.prototype.isTapeOn=function(){return this.state.gradientDepth>0&&this.state.kernelDepth===0},n.prototype.addTapeNode=function(t,e,r,i,o){var s=this,u={id:this.state.nextTapeNodeId++,kernelName:t,inputs:e,outputs:r,saved:o},l=U(t);l!=null&&(i=l.gradFunc),i!=null&&(u.gradient=function(d){return d=d.map(function(A,O){if(A==null){var D=r[O],H=Be(D.size,D.dtype);return s.makeTensor(H,D.shape,D.dtype)}return A}),i(d.length>1?d:d[0],o)}),this.state.activeTape.push(u)},n.prototype.keep=function(t){return t.kept=!0,t},n.prototype.startTape=function(){this.state.gradientDepth===0&&(this.state.activeTape=[]),this.state.gradientDepth++},n.prototype.endTape=function(){this.state.gradientDepth--},n.prototype.startScope=function(t){var e={track:[],name:"unnamed scope",id:this.state.nextScopeId++};t&&(e.name=t),this.state.scopeStack.push(e),this.state.activeScope=e},n.prototype.endScope=function(t){for(var e=this,r=Tn(t),i=new Set(r.map(function(l){return l.id})),o=0;o<this.state.activeScope.track.length;o++){var s=this.state.activeScope.track[o];s.kept||i.has(s.id)||s.dispose()}var u=this.state.scopeStack.pop();this.state.activeScope=this.state.scopeStack.length===0?null:this.state.scopeStack[this.state.scopeStack.length-1],r.forEach(function(l){l.kept||l.scopeId!==u.id||e.track(l)})},n.prototype.gradients=function(t,e,r,i){var o=this;if(i===void 0&&(i=!1),ee(e.length>0,function(){return"gradients() received an empty list of xs."}),r!=null&&r.dtype!=="float32")throw new Error("dy must have 'float32' dtype, but has '"+r.dtype+"'");var s=this.scopedRun(function(){return o.startTape()},function(){return o.endTape()},function(){return o.tidy("forward",t)});ee(s instanceof Xt,function(){return"The result y returned by f() must be a tensor."});var u=function(l,d,A){for(var O={},D={},H=0;H<d.length;H++)O[d[H].id]=!0;for(H=0;H<l.length;H++){var te=(Te=l[H]).inputs;for(var se in te){for(var ae=te[se],ue=!1,ye=0;ye<d.length;ye++)if(O[ae.id]){Te.outputs.forEach(function(Ne){return O[Ne.id]=!0}),ue=!0,D[Te.id]=!0;break}if(ue)break}}var we={};we[A.id]=!0;var ve={};for(H=l.length-1;H>=0;H--)for(te=(Te=l[H]).inputs,ye=0;ye<Te.outputs.length;ye++)if(we[Te.outputs[ye].id]){for(var se in te)we[te[se].id]=!0,ve[Te.id]=!0;break}var Ee=[];for(H=0;H<l.length;H++){var Te;if(D[(Te=l[H]).id]&&ve[Te.id]){var Fe={};for(var se in Te.inputs){var Le=Te.inputs[se];O[Le.id]&&(Fe[se]=Le)}var Me=Object.assign({},Te);Me.inputs=Fe,Me.outputs=Te.outputs,Ee.push(Me)}}return Ee}(this.state.activeTape,e,s);if(!i&&u.length===0&&e.length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",function(){var l,d,A={};A[s.id]=r==null?(l=s.shape,d=Re(ce(l),"float32"),ze.makeTensor(d,l,"float32")):r,function(D,H,te){for(var se=function(ue){var ye=H[ue],we=[];if(ye.outputs.forEach(function(Fe){var Le=D[Fe.id];Le!=null?we.push(Le):we.push(null)}),ye.gradient==null)throw new Error("Cannot compute gradient: gradient function not found for "+ye.kernelName+".");var ve=ye.gradient(we),Ee=function(Fe){if(!(Fe in ve))throw new Error("Cannot backprop through input "+Fe+". Available gradients found: "+Object.keys(ve)+".");var Le=te(function(){return ve[Fe]()});if(Le.dtype!=="float32")throw new Error("Error in gradient for op "+ye.kernelName+". The gradient of input "+Fe+" must have 'float32' dtype, but has '"+Le.dtype+"'");var Me=ye.inputs[Fe];if(!le(Le.shape,Me.shape))throw new Error("Error in gradient for op "+ye.kernelName+". The gradient of input '"+Fe+"' has shape '"+Le.shape+"', which does not match the shape of the input '"+Me.shape+"'");if(D[Me.id]==null)D[Me.id]=Le;else{var Ne=D[Me.id];D[Me.id]=Ne.add(Le),Ne.dispose()}};for(var Te in ye.inputs)Ee(Te)},ae=H.length-1;ae>=0;ae--)se(ae)}(A,u,function(D){return o.tidy(D)});var O=e.map(function(D){return A[D.id]});return o.state.gradientDepth===0&&(o.state.activeTape.forEach(function(D){for(var H=0,te=D.saved;H<te.length;H++)te[H].dispose()}),o.state.activeTape=null),{value:s,grads:O}})},n.prototype.customGrad=function(t){var e=this;return ee(nt(t),function(){return"The f passed in customGrad(f) must be a function."}),function(){for(var r,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];ee(i.every(function(u){return u instanceof Xt}),function(){return"The args passed in customGrad(f)(x1, x2,...) must all be tensors"});var s={};return i.forEach(function(u,l){s[l]=u}),e.runKernelFunc(function(u,l){return ee((r=t.apply(void 0,i.concat([l]))).value instanceof Xt,function(){return"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"}),ee(nt(r.gradFunc),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."}),r.value},s,function(u,l){var d=r.gradFunc(u,l),A=Array.isArray(d)?d:[d];ee(A.length===i.length,function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."}),ee(A.every(function(D){return D instanceof Xt}),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."});var O={};return A.forEach(function(D,H){O[H]=function(){return D}}),O})}},n.prototype.readSync=function(t){return this.state.tensorInfo.get(t).backend.readSync(t)},n.prototype.read=function(t){return this.state.tensorInfo.get(t).backend.read(t)},n.prototype.time=function(t){return E(this,void 0,void 0,function(){var e,r;return C(this,function(i){switch(i.label){case 0:return e=_e(),[4,this.backend.time(t)];case 1:return(r=i.sent()).wallMs=_e()-e,[2,r]}})})},n.prototype.track=function(t){return this.state.activeScope!=null&&(t.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(t)),t},Object.defineProperty(n.prototype,"registeredVariables",{get:function(){return this.state.registeredVariables},enumerable:!0,configurable:!0}),n.prototype.reset=function(){for(var t in this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new bn,this.registry)this.disposeRegisteredKernels(t),this.registry[t].dispose(),delete this.registry[t];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null},n.nextTensorId=0,n.nextVariableId=0,n}(),ze=function(){var n=function(){if(Wn==null){var e=void 0;if(typeof window!="undefined")e=window;else if(typeof Se.g!="undefined")e=Se.g;else if(typeof b!="undefined")e=b;else{if(typeof self=="undefined")throw new Error("Could not find a global object");b=self}Wn=e}return Wn}();if(n._tfengine==null){var t=new P(n);n._tfengine=new yr(t)}return function(e){J=e}(n._tfengine.ENV),jt=function(){return n._tfengine},n._tfengine}();function tn(){return typeof window!="undefined"&&window.document!=null||typeof WorkerGlobalScope!="undefined"}var dn=M();dn.registerFlag("DEBUG",function(){return!1},function(n){n&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")}),dn.registerFlag("IS_BROWSER",function(){return tn()}),dn.registerFlag("IS_NODE",function(){return typeof b!="undefined"&&b.versions!==void 0&&b.versions.node!==void 0}),dn.registerFlag("IS_CHROME",function(){return typeof navigator!="undefined"&&navigator!=null&&navigator.userAgent!=null&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}),dn.registerFlag("PROD",function(){return!1}),dn.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",function(){return dn.getBool("DEBUG")}),dn.registerFlag("DEPRECATION_WARNINGS_ENABLED",function(){return!0}),dn.registerFlag("IS_TEST",function(){return!1});var mn,He,it,$e={},lt={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function yt(n,t){$e[n]=t}function dt(n){n in $e||($e[n]=function(e){if(e!==1&&e!==2)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");var r=function(i){if(typeof OffscreenCanvas!="undefined"&&i===2)return new OffscreenCanvas(300,150);if(typeof document!="undefined")return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}(e);return r.addEventListener("webglcontextlost",function(i){i.preventDefault(),delete $e[e]},!1),e===1?r.getContext("webgl",lt)||r.getContext("experimental-webgl",lt):r.getContext("webgl2",lt)}(n));var t=$e[n];return t.isContextLost()?(delete $e[n],dt(n)):(t.disable(t.DEPTH_TEST),t.disable(t.STENCIL_TEST),t.disable(t.BLEND),t.disable(t.DITHER),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SAMPLE_COVERAGE),t.enable(t.SCISSOR_TEST),t.enable(t.CULL_FACE),t.cullFace(t.BACK),$e[n])}function pt(n,t){return[t,n]}function at(n){var t=ce(n);return De(Math.ceil(t/4))}function Nt(n,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(n/2))]}function Bt(n,t){var e,r,i,o,s,u,l,d,A,O=n;return M().getNumber("WEBGL_VERSION")===2?(e=O.R32F,r=O.R16F,i=O.RGBA16F,o=O.RGBA32F,s=O.RED,u=4,l=1,d=O.HALF_FLOAT,A=O.FLOAT):(e=n.RGBA,r=n.RGBA,i=n.RGBA,o=O.RGBA,s=n.RGBA,u=4,l=4,d=t!=null?t.HALF_FLOAT_OES:null,A=n.FLOAT),{internalFormatFloat:e,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:i,internalFormatPackedFloat:o,textureFormatFloat:s,downloadTextureFormat:n.RGBA,downloadUnpackNumChannels:u,defaultNumChannels:l,textureTypeHalfFloat:d,textureTypeFloat:A}}function vt(n,t,e){var r=e();return t&&function(i){var o=i.getError();if(o!==i.NO_ERROR)throw new Error("WebGL Error: "+pn(i,o))}(n),r}(function(n){n[n.DENSE=0]="DENSE",n[n.SHARED_BATCH=1]="SHARED_BATCH"})(mn||(mn={})),function(n){n[n.RENDER=0]="RENDER",n[n.UPLOAD=1]="UPLOAD",n[n.PIXELS=2]="PIXELS",n[n.DOWNLOAD=3]="DOWNLOAD"}(He||(He={})),function(n){n[n.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",n[n.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",n[n.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",n[n.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",n[n.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}(it||(it={}));var or=596e-10,er=65504;function Ar(n){return!!(M().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||n===0||or<Math.abs(n)&&Math.abs(n)<er)}function pn(n,t){switch(t){case n.NO_ERROR:return"NO_ERROR";case n.INVALID_ENUM:return"INVALID_ENUM";case n.INVALID_VALUE:return"INVALID_VALUE";case n.INVALID_OPERATION:return"INVALID_OPERATION";case n.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case n.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case n.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"Unknown error code "+t}}function Mr(n,t,e){return gn(n,t,function(){return n.getExtension(e)},'Extension "'+e+'" not supported on this browser.')}function jr(n,t,e){var r=gn(n,t,function(){return n.createShader(n.VERTEX_SHADER)},"Unable to create vertex WebGLShader.");if(vt(n,t,function(){return n.shaderSource(r,e)}),vt(n,t,function(){return n.compileShader(r)}),n.getShaderParameter(r,n.COMPILE_STATUS)===!1)throw console.log(n.getShaderInfoLog(r)),new Error("Failed to compile vertex shader.");return r}function Kr(n,t,e){var r=gn(n,t,function(){return n.createShader(n.FRAGMENT_SHADER)},"Unable to create fragment WebGLShader.");if(vt(n,t,function(){return n.shaderSource(r,e)}),vt(n,t,function(){return n.compileShader(r)}),n.getShaderParameter(r,n.COMPILE_STATUS)===!1)throw function(i,o){var s=ar.exec(o);if(s==null)return console.log("Couldn't parse line number in error: "+o),void console.log(i);for(var u=+s[1],l=i.split(`
`),d=l.length.toString().length+2,A=l.map(function(ae,ue){return je((ue+1).toString(),d)+ae}),O=0,D=0;D<A.length;D++)O=Math.max(A[D].length,O);var H=A.slice(0,u-1),te=A.slice(u-1,u),se=A.slice(u);console.log(H.join(`
`)),console.log(o.split(`
`)[0]),console.log("%c "+je(te[0],O),"border:1px solid red; background-color:#e3d2d2; color:#a61717"),console.log(se.join(`
`))}(e,n.getShaderInfoLog(r)),new Error("Failed to compile fragment shader.");return r}var Zr,Nr,ar=/ERROR: [0-9]+:([0-9]+):/g;function Rt(n,t){return gn(n,t,function(){return n.createProgram()},"Unable to create WebGLProgram.")}function _r(n,t,e){if(vt(n,t,function(){return n.linkProgram(e)}),n.getProgramParameter(e,n.LINK_STATUS)===!1)throw console.log(n.getProgramInfoLog(e)),new Error("Failed to link vertex and fragment shaders.")}function xr(n,t,e){if(vt(n,t,function(){return n.validateProgram(e)}),n.getProgramParameter(e,n.VALIDATE_STATUS)===!1)throw console.log(n.getProgramInfoLog(e)),new Error("Shader program validation failed.")}function wn(n,t,e){var r=gn(n,t,function(){return n.createBuffer()},"Unable to create WebGLBuffer");return vt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,r)}),vt(n,t,function(){return n.bufferData(n.ARRAY_BUFFER,e,n.STATIC_DRAW)}),r}function _n(n,t,e){var r=gn(n,t,function(){return n.createBuffer()},"Unable to create WebGLBuffer");return vt(n,t,function(){return n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,r)}),vt(n,t,function(){return n.bufferData(n.ELEMENT_ARRAY_BUFFER,e,n.STATIC_DRAW)}),r}function hn(n,t){return gn(n,t,function(){return n.createTexture()},"Unable to create WebGLTexture.")}function Xn(n,t){var e=M().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(n<=0||t<=0){var r="["+n+"x"+t+"]";throw new Error("Requested texture size "+r+" is invalid.")}if(n>e||t>e)throw r="["+n+"x"+t+"]",new Error("Requested texture size "+r+" greater than WebGL maximum on this browser / GPU "+("["+e+"x"+e+"]")+".")}function nn(n,t){return gn(n,t,function(){return n.createFramebuffer()},"Unable to create WebGLFramebuffer.")}function ri(n,t,e,r,i,o,s,u){var l=n.getAttribLocation(e,r);return l!==-1&&(vt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,i)}),vt(n,t,function(){return n.vertexAttribPointer(l,o,n.FLOAT,!1,s,u)}),vt(n,t,function(){return n.enableVertexAttribArray(l)}),!0)}function Kn(n,t,e,r){Kt(n,r),vt(n,t,function(){return n.activeTexture(n.TEXTURE0+r)}),vt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)})}function on(n,t,e,r){return gn(n,t,function(){return n.getUniformLocation(e,r)},'uniform "'+r+'" not present in program.')}function Fr(n,t,e){return n.getUniformLocation(t,e)}function Jn(n,t,e,r,i,o){vt(n,t,function(){return Kn(n,t,r,o)}),vt(n,t,function(){return n.uniform1i(i,o)})}function An(n,t,e,r){vt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,r)}),vt(n,t,function(){return n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0)})}function Rn(n,t,e){vt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,e)}),vt(n,t,function(){return n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,null,0)})}function an(n){var t=n.checkFramebufferStatus(n.FRAMEBUFFER);if(t!==n.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+sn(n,t))}function sn(n,t){switch(t){case n.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case n.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+t}}function gn(n,t,e,r){var i=vt(n,t,function(){return e()});if(i==null)throw new Error(r);return i}function Kt(n,t){var e=n.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=t+n.TEXTURE0;if(r<n.TEXTURE0||r>e)throw new Error("textureUnit must be in "+("[gl.TEXTURE0, gl.TEXTURE"+e+"]")+".")}function Er(n,t){return t===void 0&&(t=2),ce(n.slice(0,n.length-t))}function Gr(n){if(n.length===0)throw Error("Cannot get rows and columns of an empty shape array.");return[n.length>1?n[n.length-2]:1,n[n.length-1]]}function rn(n){var t=[1,1,1];return n.length===0||n.length===1&&n[0]===1||(t=[Er(n)].concat(Gr(n))),t}function zr(n,t){var e;t===void 0&&(t=!1);var r=M().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(t&&(r*=2,(n=n.map(function(d,A){return A>=n.length-2?ie(n[A]):n[A]})).length===1&&(n=[2,n[0]])),n.length!==2){var i=q(n);n=i.newShape}var o=ce(n);if(n.length<=1&&o<=r)return[1,o];if(n.length===2&&n[0]<=r&&n[1]<=r)return n;if(n.length===3&&n[0]*n[1]<=r&&n[2]<=r)return[n[0]*n[1],n[2]];if(n.length===3&&n[0]<=r&&n[1]*n[2]<=r)return[n[0],n[1]*n[2]];if(n.length===4&&n[0]*n[1]*n[2]<=r&&n[3]<=r)return[n[0]*n[1]*n[2],n[3]];if(n.length===4&&n[0]<=r&&n[1]*n[2]*n[3]<=r)return[n[0],n[1]*n[2]*n[3]];if(t){var s=Er(n),u=2,l=2;return n.length&&(u=(e=Gr(n))[0],l=e[1]),De(o=s*(u/2)*(l/2)).map(function(d){return 2*d})}return De(o)}function xn(n){return n%2==0}function ni(n,t){if(le(n=n.slice(-2),t=t.slice(-2))||!n.length||!t.length||n[0]===0||n[1]===0||t[0]===0||t[1]===0)return!0;if(n.length!==t.length){var e=n.slice(-1)[0],r=t.slice(-1)[0];if(e===r||xn(e)&&xn(r)&&(n[0]===1||t[0]===1))return!0}return n[1]===t[1]&&xn(n[0])&&xn(t[0])}function ii(n){if(Zr==null){var t=dt(n);Zr=t.getParameter(t.MAX_TEXTURE_SIZE)}return Zr}function Lr(n){if(Nr==null){var t=dt(n);Nr=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,Nr)}function Sr(n){if(n===0)return 0;var t=dt(n);return Hr(t,"EXT_disjoint_timer_query_webgl2")&&n===2?2:Hr(t,"EXT_disjoint_timer_query")?1:0}function Hr(n,t){return n.getExtension(t)!=null}function bi(n){try{if(dt(n)!=null)return!0}catch(t){return!1}return!1}function oi(n){if(n===0)return!1;var t=dt(n);if(n===1){if(!Hr(t,"OES_texture_float"))return!1}else if(!Hr(t,"EXT_color_buffer_float"))return!1;return fi(t)}function Wi(n){if(n===0)return!1;var t=dt(n);if(n!==1){if(Hr(t,"EXT_color_buffer_float"))return fi(t);if(Hr(t,"EXT_color_buffer_half_float")){var e=t.getExtension("EXT_color_buffer_half_float");return function(r,i){var o=Bt(r,i),s=r.createTexture();r.bindTexture(r.TEXTURE_2D,s),r.texImage2D(r.TEXTURE_2D,0,o.internalFormatHalfFloat,1,1,0,o.textureFormatFloat,o.textureTypeHalfFloat,null);var u=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,u),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,s,0);var l=r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE;return r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteTexture(s),r.deleteFramebuffer(u),l}(t,e)}return!1}return!!Hr(t,"OES_texture_float")&&!!Hr(t,"WEBGL_color_buffer_float")&&fi(t)}function fi(n){var t=Bt(n),e=n.createTexture();n.bindTexture(n.TEXTURE_2D,e),n.texImage2D(n.TEXTURE_2D,0,t.internalFormatFloat,1,1,0,t.textureFormatFloat,t.textureTypeFloat,null);var r=n.createFramebuffer();n.bindFramebuffer(n.FRAMEBUFFER,r),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0);var i=n.checkFramebufferStatus(n.FRAMEBUFFER)===n.FRAMEBUFFER_COMPLETE;return n.bindTexture(n.TEXTURE_2D,null),n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteTexture(e),n.deleteFramebuffer(r),i}function Yn(n){return n===2&&dt(n).fenceSync!=null}var wi=Object.freeze({callAndCheck:vt,canBeRepresented:Ar,getWebGLErrorMessage:pn,getExtensionOrThrow:Mr,createVertexShader:jr,createFragmentShader:Kr,createProgram:Rt,linkProgram:_r,validateProgram:xr,createStaticVertexBuffer:wn,createStaticIndexBuffer:_n,getNumChannels:function(){return M().getNumber("WEBGL_VERSION")===2?1:4},createTexture:hn,validateTextureSize:Xn,createFramebuffer:nn,bindVertexBufferToProgramAttribute:ri,bindTextureUnit:Kn,unbindTextureUnit:function(n,t,e){Kt(n,e),vt(n,t,function(){return n.activeTexture(n.TEXTURE0+e)}),vt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})},getProgramUniformLocationOrThrow:on,getProgramUniformLocation:Fr,bindTextureToProgramUniformSampler:Jn,bindCanvasToFramebuffer:function(n,t){vt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,null)}),vt(n,t,function(){return n.viewport(0,0,n.canvas.width,n.canvas.height)}),vt(n,t,function(){return n.scissor(0,0,n.canvas.width,n.canvas.height)})},bindColorTextureToFramebuffer:An,unbindColorTextureFromFramebuffer:Rn,validateFramebuffer:an,getFramebufferErrorMessage:sn,getBatchDim:Er,getRowsCols:Gr,getShapeAs3D:rn,getTextureShapeFromLogicalShape:zr,isReshapeFree:ni,getWebGLMaxTextureSize:ii,resetMaxTextureSize:function(){Zr=null},resetMaxTexturesInShader:function(){Nr=null},getMaxTexturesInShader:Lr,getWebGLDisjointQueryTimerVersion:Sr,hasExtension:Hr,isWebGLVersionEnabled:bi,isCapableOfRenderingToFloatTexture:oi,isDownloadFloatTextureEnabled:Wi,isWebGLFenceEnabled:Yn}),Gt=M();function zi(){M().set("PROD",!0)}function di(){M().set("DEBUG",!0)}function Hi(){M().set("DEPRECATION_WARNINGS_ENABLED",!1),console.warn("TensorFlow.js deprecation warnings have been disabled.")}function $n(n){M().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(n+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}function Ai(){ze.disposeVariables()}function go(){return ze}function ra(){return ze.memory()}function yo(n){return ze.profile(n)}function gt(n,t){return ze.tidy(n,t)}function Yt(n){Tn(n).forEach(function(t){return t.dispose()})}function Vr(n){return ze.keep(n)}function cr(n){return ze.time(n)}function Dr(n){return ze.setBackend(n)}function En(){return ze.ready()}function pi(){return ze.backendName}function hi(n){ze.removeBackend(n)}function vi(n){return ze.findBackend(n)}function qn(n){return ze.findBackendFactory(n)}function na(n,t,e){return e===void 0&&(e=1),ze.registerBackend(n,t,e)}function Ri(){return ze.backend}function to(n,t){M().setPlatform(n,t)}function xi(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];M().getBool("IS_TEST")||console.warn.apply(console,n)}function Fn(n,t){var e=n;if(T(n))return t==="string"?[]:[n.length];if(!Array.isArray(n))return[];for(var r=[];Array.isArray(e)||T(e)&&t!=="string";)r.push(e.length),e=e[0];return Array.isArray(n)&&M().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&function i(o,s,u){if(u=u||[],!Array.isArray(o)&&!T(o))return void ee(s.length===0,function(){return"Element arr["+u.join("][")+"] is a primitive, but should be an array/TypedArray of "+s[0]+" elements"});ee(s.length>0,function(){return"Element arr["+u.join("][")+"] should be a primitive, but is an array of "+o.length+" elements"}),ee(o.length===s[0],function(){return"Element arr["+u.join("][")+"] should have "+s[0]+" elements, but has "+o.length+" elements"});for(var l=s.slice(1),d=0;d<o.length;++d)i(o[d],l,u.concat(d))}(n,r,[]),r}function ro(n,t,e,r){if(n!=null&&(n!=="numeric"&&n!==t||n==="numeric"&&t==="string"))throw new Error("Argument '"+e+"' passed to '"+r+"' must be "+n+" tensor, but got "+t+" tensor")}function ke(n,t,e,r){if(r===void 0&&(r="numeric"),n instanceof Xt)return ro(r,n.dtype,t,e),n;var i=Ue(n);if(i!=="string"&&["bool","int32","float32"].indexOf(r)>=0&&(i=r),ro(r,i,t,e),n==null||!T(n)&&!Array.isArray(n)&&typeof n!="number"&&typeof n!="boolean"&&typeof n!="string"){var o=n==null?"null":n.constructor.name;throw new Error("Argument '"+t+"' passed to '"+e+"' must be a Tensor or TensorLike, but got '"+o+"'")}var s=Fn(n,i);T(n)||Array.isArray(n)||(n=[n]);var u=i!=="string"?We(n,i,M().getBool("DEBUG")):xe(n,[],!0);return ze.makeTensor(u,s,i)}function Oi(n,t,e,r){if(r===void 0&&(r="numeric"),!Array.isArray(n))throw new Error("Argument "+t+" passed to "+e+" must be a `Tensor[]` or `TensorLike[]`");return n.map(function(i,o){return ke(i,t+"["+o+"]",e)},r)}function bo(n,t){for(var e=0;e<n.length;++e)if(n[n.length-e-1]!==t-1-e)return!1;return!0}function Bo(n,t,e){for(var r=n.length+t.length,i=[],o=0,s=0,u=0;u<r;u++)e.indexOf(u)===-1?i.push(n[o++]):i.push(t[s++]);return i}function yn(n,t){for(var e=[],r=n.length,i=0;i<r;i++)t.indexOf(i)===-1&&e.push(n[i]);return[e,t.map(function(o){return n[o]})]}function On(n,t){return Bo(n,t.map(function(e){return 1}),t)}function It(n,t,e){ee(bo(t,e),function(){return n+" supports only inner-most axes for now. Got axes "+t+" and rank-"+e+" input."})}function Vt(n,t){if(bo(n,t))return null;for(var e=[],r=0;r<t;++r)n.indexOf(r)===-1&&e.push(r);return n.forEach(function(i){return e.push(i)}),e}function Qr(n){return n.map(function(t,e){return[e,t]}).sort(function(t,e){return t[1]-e[1]}).map(function(t){return t[0]})}function Pr(n,t){for(var e=[],r=t-n;r<t;++r)e.push(r);return e}function qr(n,t){var e=n[0].length;n.forEach(function(i,o){ee(i.length===e,function(){return"Error in concat"+e+"D: rank of tensors["+o+"] must be the same as the rank of the rest ("+e+")"})}),ee(t>=0&&t<e,function(){return"Error in concat"+e+"D: axis must be between 0 and "+(e-1)+"."});var r=n[0];n.forEach(function(i,o){for(var s=0;s<e;s++)ee(s===t||i[s]===r[s],function(){return"Error in concat"+e+"D: Shape of tensors["+o+"] ("+i+") does not match the shape of the rest ("+r+") along the non-concatenated axis "+o+"."})})}function mi(n,t){for(var e=n[0].slice(),r=1;r<n.length;r++)e[t]+=n[r][t];return e}function Ge(n){var t=Object.keys(n);if(t.length!==1)throw new Error("Please provide an object with a single key (operation name) mapping to a function. Got an object with "+t.length+" keys.");var e=t[0],r=n[e];e.endsWith("_")&&(e=e.substring(0,e.length-1));var i=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];ze.startScope(e);try{var u=r.apply(void 0,o);return u instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),ze.endScope(u),u}catch(l){throw ze.endScope(null),l}};return Object.defineProperty(i,"name",{value:e,configurable:!0}),i}Gt.registerFlag("HAS_WEBGL",function(){return Gt.getNumber("WEBGL_VERSION")>0}),Gt.registerFlag("WEBGL_VERSION",function(){return bi(2)?2:bi(1)?1:0}),Gt.registerFlag("WEBGL_BUFFER_SUPPORTED",function(){return Gt.get("WEBGL_VERSION")===2}),Gt.registerFlag("WEBGL_CPU_FORWARD",function(){return!0}),Gt.registerFlag("WEBGL_FORCE_F16_TEXTURES",function(){return!1}),Gt.registerFlag("WEBGL_PACK",function(){return Gt.getBool("HAS_WEBGL")}),Gt.registerFlag("WEBGL_PACK_NORMALIZATION",function(){return Gt.getBool("WEBGL_PACK")}),Gt.registerFlag("WEBGL_PACK_CLIP",function(){return Gt.getBool("WEBGL_PACK")}),Gt.registerFlag("WEBGL_PACK_DEPTHWISECONV",function(){return!1}),Gt.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",function(){return Gt.getBool("WEBGL_PACK")}),Gt.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",function(){return Gt.getBool("WEBGL_PACK")}),Gt.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",function(){return Gt.getBool("WEBGL_PACK")}),Gt.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",function(){return Gt.getBool("WEBGL_PACK")}),Gt.registerFlag("WEBGL_PACK_REDUCE",function(){return Gt.getBool("WEBGL_PACK")}),Gt.registerFlag("WEBGL_LAZILY_UNPACK",function(){return Gt.getBool("WEBGL_PACK")}),Gt.registerFlag("WEBGL_CONV_IM2COL",function(){return Gt.getBool("WEBGL_PACK")}),Gt.registerFlag("WEBGL_MAX_TEXTURE_SIZE",function(){return ii(Gt.getNumber("WEBGL_VERSION"))}),Gt.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",function(){return Lr(Gt.getNumber("WEBGL_VERSION"))}),Gt.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",function(){var n=Gt.getNumber("WEBGL_VERSION");return n===0?0:Sr(n)}),Gt.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",function(){return Gt.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&(n=navigator.userAgent||navigator.vendor||window.opera,!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4))));var n}),Gt.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",function(){return oi(Gt.getNumber("WEBGL_VERSION"))}),Gt.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",function(){return!Gt.getBool("WEBGL_FORCE_F16_TEXTURES")&&Gt.getBool("WEBGL_RENDER_FLOAT32_CAPABLE")}),Gt.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",function(){return Wi(Gt.getNumber("WEBGL_VERSION"))}),Gt.registerFlag("WEBGL_FENCE_API_ENABLED",function(){return Yn(Gt.getNumber("WEBGL_VERSION"))}),Gt.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",function(){return Gt.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0}),br=$n;var Cn=Ge({complex_:function(n,t){var e=ke(n,"real","complex"),r=ke(t,"imag","complex");return de(e.shape,r.shape,"real and imag shapes, "+e.shape+" and "+r.shape+", must match in call to tf.complex()."),ze.runKernelFunc(function(i){return i.complex(e,r)},{$real:e,$imag:r})}}),Ln=Ge({real_:function(n){var t=ke(n,"input","real");return ze.runKernelFunc(function(e){return e.real(t)},{$input:t})}}),ki=Ge({imag_:function(n){var t=ke(n,"input","imag");return ze.runKernelFunc(function(e){return e.imag(t)},{$input:t})}});function Un(n,t,e){return no(n,t,Fn(n,e),e)}function no(n,t,e,r){if(r==null&&(r=Ue(n)),r==="complex64")throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!T(n)&&!Array.isArray(n)&&typeof n!="number"&&typeof n!="boolean"&&typeof n!="string")throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(t!=null){Ve(t);var i=ce(t),o=ce(e);ee(i===o,function(){return"Based on the provided shape, ["+t+"], the tensor should have "+i+" values but has "+o});for(var s=0;s<e.length;++s){var u=e[s],l=s!==e.length-1||u!==ce(t.slice(s));ee(e[s]===t[s]||!l,function(){return"Error creating a new Tensor. Inferred shape ("+e+") does not match the provided shape ("+t+"). "})}}return T(n)||Array.isArray(n)||(n=[n]),t=t||e,n=r!=="string"?We(n,r,M().getBool("DEBUG")):xe(n,[],!0),ze.makeTensor(n,t,r)}function Tt(n,t){if((T(n)&&t!=="string"||Array.isArray(n))&&t!=="complex64")throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");if(t==="string"&&T(n)&&!(n instanceof Uint8Array))throw new Error("When making a scalar from encoded string, the value must be `Uint8Array`.");return no(n,[],[],t)}function Sn(n,t){me(n);var e=Fn(n,t);if(e.length!==1)throw new Error("tensor1d() requires values to be a flat/TypedArray");return no(n,null,e,t)}function io(n,t,e){if(me(n),t!=null&&t.length!==2)throw new Error("tensor2d() requires shape to have two numbers");var r=Fn(n,e);if(r.length!==2&&r.length!==1)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return no(n,t,r,e)}function hs(n,t,e){if(me(n),t!=null&&t.length!==3)throw new Error("tensor3d() requires shape to have three numbers");var r=Fn(n,e);if(r.length!==3&&r.length!==1)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return no(n,t,r,e)}function ei(n,t,e){if(me(n),t!=null&&t.length!==4)throw new Error("tensor4d() requires shape to have four numbers");var r=Fn(n,e);if(r.length!==4&&r.length!==1)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return no(n,t,r,e)}function jd(n,t,e){if(me(n),t!=null&&t.length!==5)throw new Error("tensor5d() requires shape to have five numbers");var r=Fn(n,e);if(r.length!==5&&r.length!==1)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return no(n,t,r,e)}function Dd(n,t,e){if(me(n),t!=null&&t.length!==6)throw new Error("tensor6d() requires shape to have six numbers");var r=Fn(n,e);if(r.length!==6&&r.length!==1)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return no(n,t=t||r,r,e)}function Pd(n,t,e,r){return t===void 0&&(t=!0),ze.makeVariable(n,t,e,r)}function Mo(n,t){if(t===void 0&&(t="float32"),t==="complex64"){var e=Mo(n,"float32"),r=en(n,"float32");return Cn(e,r)}var i=Re(ce(n),t);return ze.makeTensor(i,n,t)}function en(n,t){if(t===void 0&&(t="float32"),t==="complex64"){var e=en(n,"float32"),r=en(n,"float32");return Cn(e,r)}var i=Be(ce(n),t);return ze.makeTensor(i,n,t)}function ji(n,t,e){return ze.runKernelFunc(function(r){return r.fill(n,t,e)},{})}function Bd(n,t,e){if(e<=0)throw new Error("The number of values should be positive.");return ze.runKernelFunc(function(r){return r.linspace(n,t,e)},{})}function Ea(n,t,e,r){if(e===void 0&&(e=1),r===void 0&&(r="float32"),e===0)throw new Error("Cannot have a step of zero");if(n===t||n<t&&e<0||t<n&&e>1)return en([0],r);var i=Be(Math.abs(Math.ceil((t-n)/e)),r);t<n&&e===1&&(e=-1),i[0]=n;for(var o=1;o<i.length;o++)i[o]=i[o-1]+e;return Sn(i,r)}var cl=Ge({onesLike_:function(n){var t=ke(n,"x","onesLike");if(t.dtype==="complex64"){var e=cl(Ln(t)),r=Cr(ki(t));return Cn(e,r)}return ze.runKernelFunc(function(i){return i.onesLike(t)},{$x:t},function(i,o){return{$x:function(){return Cr(i)}}})}}),Cr=Ge({zerosLike_:function(n){var t=ke(n,"x","zerosLike");return ze.runKernelFunc(function(e){return e.zerosLike(t)},{$x:t},function(e,r){return{$x:function(){return Cr(e)}}})}}),kn=Ge({concat_:function(n,t){t===void 0&&(t=0),ee(n.length>=1,function(){return"Pass at least one tensor to concat"});var e=Oi(n,"tensors","concat");e[0].dtype==="complex64"&&e.forEach(function(u){if(u.dtype!=="complex64")throw new Error(`Cannot concatenate complex64 tensors with a tensor
with dtype `+u.dtype+". ")}),t=be(t,e[0].shape)[0];var r=mi(e.map(function(u){return u.shape}),t);if(ce(r)===0)return Un([],r);if((e=e.filter(function(u){return u.size>0})).length===1)return e[0];var i=e.map(function(u){return u.shape});qr(i,t);var o=e,s={axis:t};return ze.runKernelFunc(function(u){return u.concat(e,t)},o,function(u){var l=i.map(function(d){return d[t]});return vs(u,l,t).map(function(d){return function(){return d}})},"Concat",s)}}),Md=Ge({concat1d_:function(n){return kn(n,0)}}),Nd=Ge({concat2d_:function(n,t){return kn(n,t)}}),_d=Ge({concat3d_:function(n,t){return kn(n,t)}}),Fd=Ge({concat4d_:function(n,t){return kn(n,t)}}),vs=Ge({split_:function(n,t,e){e===void 0&&(e=0);var r,i=ke(n,"x","split");return e=be(e,i.shape)[0],typeof t=="number"?(ee(i.shape[e]%t==0,function(){return"Number of splits must evenly divide the axis."}),r=new Array(t).fill(i.shape[e]/t)):(ee(i.shape[e]===t.reduce(function(o,s){return o+s}),function(){return"The sum of sizes must match the size of the axis dimension."}),r=t),ze.runKernelFunc(function(o){return o.split(i,r,e)},{$x:i},function(o){return{$x:function(){return kn(o,e)}}})}});typeof globalThis!="undefined"||typeof window!="undefined"||typeof Se.g!="undefined"&&Se.g;function wo(n,t){return n(t={exports:{}},t.exports),t.exports}var Ld=wo(function(n){(function(t,e,r){function i(u){var l,d=this,A=(l=4022871197,function(O){O=O.toString();for(var D=0;D<O.length;D++){var H=.02519603282416938*(l+=O.charCodeAt(D));H-=l=H>>>0,l=(H*=l)>>>0,l+=4294967296*(H-=l)}return 23283064365386963e-26*(l>>>0)});d.next=function(){var O=2091639*d.s0+23283064365386963e-26*d.c;return d.s0=d.s1,d.s1=d.s2,d.s2=O-(d.c=0|O)},d.c=1,d.s0=A(" "),d.s1=A(" "),d.s2=A(" "),d.s0-=A(u),d.s0<0&&(d.s0+=1),d.s1-=A(u),d.s1<0&&(d.s1+=1),d.s2-=A(u),d.s2<0&&(d.s2+=1),A=null}function o(u,l){return l.c=u.c,l.s0=u.s0,l.s1=u.s1,l.s2=u.s2,l}function s(u,l){var d=new i(u),A=l&&l.state,O=d.next;return O.int32=function(){return 4294967296*d.next()|0},O.double=function(){return O()+11102230246251565e-32*(2097152*O()|0)},O.quick=O,A&&(typeof A=="object"&&o(A,d),O.state=function(){return o(d,{})}),O}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.alea=s})(0,n,!1)}),Ud=wo(function(n){(function(t,e,r){function i(u){var l=this,d="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var O=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^O^O>>>8},u===(0|u)?l.x=u:d+=u;for(var A=0;A<d.length+64;A++)l.x^=0|d.charCodeAt(A),l.next()}function o(u,l){return l.x=u.x,l.y=u.y,l.z=u.z,l.w=u.w,l}function s(u,l){var d=new i(u),A=l&&l.state,O=function(){return(d.next()>>>0)/4294967296};return O.double=function(){do var D=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(D===0);return D},O.int32=d.next,O.quick=O,A&&(typeof A=="object"&&o(A,d),O.state=function(){return o(d,{})}),O}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xor128=s})(0,n,!1)}),Wd=wo(function(n){(function(t,e,r){function i(u){var l=this,d="";l.next=function(){var O=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^O^O<<1)|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,u===(0|u)?l.x=u:d+=u;for(var A=0;A<d.length+64;A++)l.x^=0|d.charCodeAt(A),A==d.length&&(l.d=l.x<<10^l.x>>>4),l.next()}function o(u,l){return l.x=u.x,l.y=u.y,l.z=u.z,l.w=u.w,l.v=u.v,l.d=u.d,l}function s(u,l){var d=new i(u),A=l&&l.state,O=function(){return(d.next()>>>0)/4294967296};return O.double=function(){do var D=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(D===0);return D},O.int32=d.next,O.quick=O,A&&(typeof A=="object"&&o(A,d),O.state=function(){return o(d,{})}),O}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xorwow=s})(0,n,!1)}),zd=wo(function(n){(function(t,e,r){function i(u){var l=this;l.next=function(){var d,A,O=l.x,D=l.i;return d=O[D],A=(d^=d>>>7)^d<<24,A^=(d=O[D+1&7])^d>>>10,A^=(d=O[D+3&7])^d>>>3,A^=(d=O[D+4&7])^d<<7,d=O[D+7&7],A^=(d^=d<<13)^d<<9,O[D]=A,l.i=D+1&7,A},function(d,A){var O,D=[];if(A===(0|A))D[0]=A;else for(A=""+A,O=0;O<A.length;++O)D[7&O]=D[7&O]<<15^A.charCodeAt(O)+D[O+1&7]<<13;for(;D.length<8;)D.push(0);for(O=0;O<8&&D[O]===0;++O);for(O==8?D[7]=-1:D[O],d.x=D,d.i=0,O=256;O>0;--O)d.next()}(l,u)}function o(u,l){return l.x=u.x.slice(),l.i=u.i,l}function s(u,l){u==null&&(u=+new Date);var d=new i(u),A=l&&l.state,O=function(){return(d.next()>>>0)/4294967296};return O.double=function(){do var D=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(D===0);return D},O.int32=d.next,O.quick=O,A&&(A.x&&o(A,d),O.state=function(){return o(d,{})}),O}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xorshift7=s})(0,n,!1)}),Hd=wo(function(n){(function(t,e,r){function i(u){var l=this;l.next=function(){var d,A,O=l.w,D=l.X,H=l.i;return l.w=O=O+1640531527|0,A=D[H+34&127],d=D[H=H+1&127],A^=A<<13,d^=d<<17,A^=A>>>15,d^=d>>>12,A=D[H]=A^d,l.i=H,A+(O^O>>>16)|0},function(d,A){var O,D,H,te,se,ae=[],ue=128;for(A===(0|A)?(D=A,A=null):(A+="\0",D=0,ue=Math.max(ue,A.length)),H=0,te=-32;te<ue;++te)A&&(D^=A.charCodeAt((te+32)%A.length)),te===0&&(se=D),D^=D<<10,D^=D>>>15,D^=D<<4,D^=D>>>13,te>=0&&(se=se+1640531527|0,H=(O=ae[127&te]^=D+se)==0?H+1:0);for(H>=128&&(ae[127&(A&&A.length||0)]=-1),H=127,te=512;te>0;--te)D=ae[H+34&127],O=ae[H=H+1&127],D^=D<<13,O^=O<<17,D^=D>>>15,O^=O>>>12,ae[H]=D^O;d.w=se,d.X=ae,d.i=H}(l,u)}function o(u,l){return l.i=u.i,l.w=u.w,l.X=u.X.slice(),l}function s(u,l){u==null&&(u=+new Date);var d=new i(u),A=l&&l.state,O=function(){return(d.next()>>>0)/4294967296};return O.double=function(){do var D=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(D===0);return D},O.int32=d.next,O.quick=O,A&&(A.X&&o(A,d),O.state=function(){return o(d,{})}),O}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xor4096=s})(0,n,!1)}),Vd=wo(function(n){(function(t,e,r){function i(u){var l=this,d="";l.next=function(){var O=l.b,D=l.c,H=l.d,te=l.a;return O=O<<25^O>>>7^D,D=D-H|0,H=H<<24^H>>>8^te,te=te-O|0,l.b=O=O<<20^O>>>12^D,l.c=D=D-H|0,l.d=H<<16^D>>>16^te,l.a=te-O|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,u===Math.floor(u)?(l.a=u/4294967296|0,l.b=0|u):d+=u;for(var A=0;A<d.length+20;A++)l.b^=0|d.charCodeAt(A),l.next()}function o(u,l){return l.a=u.a,l.b=u.b,l.c=u.c,l.d=u.d,l}function s(u,l){var d=new i(u),A=l&&l.state,O=function(){return(d.next()>>>0)/4294967296};return O.double=function(){do var D=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(D===0);return D},O.int32=d.next,O.quick=O,A&&(typeof A=="object"&&o(A,d),O.state=function(){return o(d,{})}),O}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.tychei=s})(0,n,!1)}),Ao=wo(function(n){(function(t,e){var r,i=this,o=256,s=6,u="random",l=e.pow(o,s),d=e.pow(2,52),A=2*d,O=o-1;function D(ue,ye,we){var ve=[],Ee=se(function Le(Me,Ne){var Ze,Xe=[],qe=typeof Me;if(Ne&&qe=="object")for(Ze in Me)try{Xe.push(Le(Me[Ze],Ne-1))}catch(tt){}return Xe.length?Xe:qe=="string"?Me:Me+"\0"}((ye=ye==1?{entropy:!0}:ye||{}).entropy?[ue,ae(t)]:ue==null?function(){try{var Le;return r&&(Le=r.randomBytes)?Le=Le(o):(Le=new Uint8Array(o),(i.crypto||i.msCrypto).getRandomValues(Le)),ae(Le)}catch(Ze){var Me=i.navigator,Ne=Me&&Me.plugins;return[+new Date,i,Ne,i.screen,ae(t)]}}():ue,3),ve),Te=new H(ve),Fe=function(){for(var Le=Te.g(s),Me=l,Ne=0;Le<d;)Le=(Le+Ne)*o,Me*=o,Ne=Te.g(1);for(;Le>=A;)Le/=2,Me/=2,Ne>>>=1;return(Le+Ne)/Me};return Fe.int32=function(){return 0|Te.g(4)},Fe.quick=function(){return Te.g(4)/4294967296},Fe.double=Fe,se(ae(Te.S),t),(ye.pass||we||function(Le,Me,Ne,Ze){return Ze&&(Ze.S&&te(Ze,Te),Le.state=function(){return te(Te,{})}),Ne?(e[u]=Le,Me):Le})(Fe,Ee,"global"in ye?ye.global:this==e,ye.state)}function H(ue){var ye,we=ue.length,ve=this,Ee=0,Te=ve.i=ve.j=0,Fe=ve.S=[];for(we||(ue=[we++]);Ee<o;)Fe[Ee]=Ee++;for(Ee=0;Ee<o;Ee++)Fe[Ee]=Fe[Te=O&Te+ue[Ee%we]+(ye=Fe[Ee])],Fe[Te]=ye;(ve.g=function(Le){for(var Me,Ne=0,Ze=ve.i,Xe=ve.j,qe=ve.S;Le--;)Me=qe[Ze=O&Ze+1],Ne=Ne*o+qe[O&(qe[Ze]=qe[Xe=O&Xe+Me])+(qe[Xe]=Me)];return ve.i=Ze,ve.j=Xe,Ne})(o)}function te(ue,ye){return ye.i=ue.i,ye.j=ue.j,ye.S=ue.S.slice(),ye}function se(ue,ye){for(var we,ve=ue+"",Ee=0;Ee<ve.length;)ye[O&Ee]=O&(we^=19*ye[O&Ee])+ve.charCodeAt(Ee++);return ae(ye)}function ae(ue){return String.fromCharCode.apply(0,ue)}if(e["seed"+u]=D,se(e.random(),t),n.exports){n.exports=D;try{r=Se(91423)}catch(ue){}}})([],Math)});Ao.alea=Ld,Ao.xor128=Ud,Ao.xorwow=Wd,Ao.xorshift7=zd,Ao.xor4096=Hd,Ao.tychei=Vd;var Ca=Ao.alea,ms=function(){function n(t,e,r,i,o){this.mean=t,this.stdDev=e,this.dtype=r,this.nextVal=NaN,this.truncated=i,this.truncated&&(this.upper=this.mean+2*this.stdDev,this.lower=this.mean-2*this.stdDev);var s=o||Math.random();this.random=Ca(s.toString())}return n.prototype.nextValue=function(){if(!isNaN(this.nextVal)){var t=this.nextVal;return this.nextVal=NaN,t}for(var e,r,i=!1;!i;){var o=void 0,s=void 0,u=void 0;do u=(o=2*this.random()-1)*o+(s=2*this.random()-1)*s;while(u>=1||u===0);var l=Math.sqrt(-2*Math.log(u)/u);e=this.mean+this.stdDev*o*l,r=this.mean+this.stdDev*s*l,this.truncated&&!this.isValidTruncated(e)||(i=!0)}return this.truncated&&!this.isValidTruncated(r)||(this.nextVal=this.convertValue(r)),this.convertValue(e)},n.prototype.convertValue=function(t){return this.dtype==null||this.dtype==="float32"?t:Math.round(t)},n.prototype.isValidTruncated=function(t){return t<=this.upper&&t>=this.lower},n}(),Gd=function(){function n(t,e,r,i){this.alpha=t,this.beta=1/e,this.dtype=r;var o=i||Math.random();this.randu=Ca(o.toString()),this.randn=new ms(0,1,r,!1,this.randu()),this.d=t<1?t+2/3:t-1/3,this.c=1/Math.sqrt(9*this.d)}return n.prototype.nextValue=function(){for(var t,e,r,i,o,s;;){do i=this.randn.nextValue(),s=1+this.c*i;while(s<=0);if(s*=s*s,e=1-.331*(t=i*i)*t,r=.5*t+this.d*(1-s+Math.log(s)),(o=this.randu())<e||Math.log(o)<r)break}return s=1/this.beta*this.d*s,this.alpha<1&&(s*=Math.pow(this.randu(),1/this.alpha)),this.convertValue(s)},n.prototype.convertValue=function(t){return this.dtype==="float32"?t:Math.round(t)},n}(),Qd=function(){function n(t,e,r,i){var o=this;if(t===void 0&&(t=0),e===void 0&&(e=1),this.canReturnFloat=function(){return o.dtype==null||o.dtype==="float32"},this.min=t,this.range=e-t,this.dtype=r,i==null&&(i=Math.random()),typeof i=="number"&&(i=i.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error("The difference between "+t+" - "+e+" <= 1 and dtype is not float");this.random=Ca(i)}return n.prototype.convertValue=function(t){return this.canReturnFloat()?t:Math.round(t)},n.prototype.nextValue=function(){return this.convertValue(this.min+this.range*this.random())},n}();function nr(n,t,e){return t===void 0&&(t="float32"),t=t||"float32",Ve(n),new Jt(n,t,e)}function Xd(n,t){t===void 0&&(t=!1),console.log(n.toString(t))}var fl=Ge({batchToSpaceND_:function(n,t,e){var r=ke(n,"x","batchToSpaceND"),i=t.reduce(function(o,s){return o*s});return ee(r.rank>=1+t.length,function(){return"input rank is "+r.rank+" but should be > than blockShape.length "+t.length}),ee(e.length===t.length,function(){return"crops.length is "+e.length+" but should be equal to blockShape.length "+t.length}),ee(r.shape[0]%i==0,function(){return"input tensor batch is "+r.shape[0]+" but is not divisible by the product of the elements of blockShape "+t.join(" * ")+" === "+i}),ze.runKernelFunc(function(o){return o.batchToSpaceND(r,t,e)},{$x:r},function(o){return{$x:function(){return o.spaceToBatchND(t,e)}}})}}),Kd=Ge({broadcastTo_:function(n,t){var e=ke(n,"broadcastTo","x"),r=e.shape;if(t.some(function(l){return!(l>0)||l%1!=0}))throw new Error("broadcastTo(): Invalid broadcast shape ["+t+"].");if(t.length<e.rank)throw new Error("broadcastTo(): shape.length="+t.length+" < input.rank="+e.rank+".");if(t.length>e.rank){for(var i=e.shape.slice();i.length<t.length;)i.unshift(1);e=e.reshape(i)}for(var o=Array.from(t),s=t.length-1;s>=0;s--)if(e.shape[s]===t[s])o[s]=1;else if(e.shape[s]!==1)throw new Error("broadcastTo(): ["+r+"] cannot be broadcast to ["+t+"].");var u=o.map(function(l,d){return l>1?d:-1}).filter(function(l){return l>=0});return u.length===0?e.clone():ze.runKernelFunc(function(l){return l.tile(e,o)},{input:e},function(l){return{input:function(){return l.sum(u,!0)}}})}}),Zd=Ge({cast_:function(n,t){var e=ke(n,"x","cast");if(!$(t))throw new Error("Failed to cast to unknown dtype "+t);if(t==="string"&&e.dtype!=="string"||t!=="string"&&e.dtype==="string")throw new Error("Only strings can be casted to strings");var r={dtype:t};return ze.runKernelFunc(function(i){return i.cast(e,t)},{x:e},function(i){return{x:function(){return i.clone()}}},"Cast",r)}}),Jd=Ge({clone_:function(n){var t=ke(n,"x","clone",null);return ze.runKernelFunc(function(){return ze.makeTensorFromDataId(t.dataId,t.shape,t.dtype)},{$x:t},function(e){return{$x:function(){return e.toFloat()}}})}}),Yd=Ge({cumsum_:function(n,t,e,r){t===void 0&&(t=0),e===void 0&&(e=!1),r===void 0&&(r=!1);var i=ke(n,"x","cumsum"),o=Vt([t|=0],i.rank),s=i;o!=null&&(s=i.transpose(o));var u=Pr(1,i.rank)[0],l=ze.runKernelFunc(function(d){return d.cumsum(s,u,e,r)},{permutedX:s},function(d){return{permutedX:function(){return d.cumsum(t,e,!r)}}});return o!=null&&(l=l.transpose(o)),l}}),$d=Ge({depthToSpace_:function(n,t,e){e===void 0&&(e="NHWC");var r=ke(n,"x","depthToSpace"),i=e==="NHWC"?r.shape[1]:r.shape[2],o=e==="NHWC"?r.shape[2]:r.shape[3],s=e==="NHWC"?r.shape[3]:r.shape[1];return ee(i*t>=0,function(){return`Negative dimension size caused by overflow when multiplying
`+i+" and "+t+` for depthToSpace with input shape
`+r.shape}),ee(o*t>=0,function(){return`Negative dimension size caused by overflow when multiplying
`+o+" and "+t+` for depthToSpace with input shape
`+r.shape}),ee(s%(t*t)==0,function(){return"Dimension size must be evenly divisible by "+t*t+" but is "+s+" for depthToSpace with input shape "+r.shape}),ze.runKernelFunc(function(u){return u.depthToSpace(r,t,e)},{$x:r})}}),gi=Ge({expandDims_:function(n,t){t===void 0&&(t=0);var e=ke(n,"x","expandDims",null);ee(t<=e.rank,function(){return"Axis must be <= rank of the tensor"});var r=e.shape.slice();return t<0&&(ee(-(e.rank+1)<=t,function(){return"Axis must be in the interval ["+-(e.rank+1)+", "+e.rank+"]"}),t=e.rank+t+1),r.splice(t,0,1),Ei(e,r)}}),dl=Ge({eye_:function(n,t,e,r){r===void 0&&(r="float32"),t==null&&(t=n);for(var i=nr([n,t],r),o=n<=t?n:t,s=0;s<o;++s)i.set(1,s,s);var u=i.toTensor().as2D(n,t);if(e==null)return u;if(e.length===1)return No(gi(u,0),[e[0],1,1]);if(e.length===2)return No(gi(gi(u,0),0),[e[0],e[1],1,1]);if(e.length===3)return No(gi(gi(gi(u,0),0),0),[e[0],e[1],e[2],1,1]);throw new Error("eye() currently supports only 1D and 2D batchShapes, but received "+e.length+"D.")}}),qd=Ge({multinomial_:function(n,t,e,r){r===void 0&&(r=!1);var i=ke(n,"logits","multinomial"),o=i.size,s=i.rank;if(o<2)throw new Error("Error in multinomial: you need at least 2 outcomes, but got "+o+".");if(s>2)throw new Error("Rank of probabilities must be 1 or 2, but is "+s);e=e||Math.random();var u=s===1?i.as2D(1,-1):i,l=ze.runKernelFunc(function(d){return d.multinomial(u,r,t,e)},{logits2D:u});return s===1?l.as1D():l}}),gs=Ge({oneHot_:function(n,t,e,r){if(e===void 0&&(e=1),r===void 0&&(r=0),t<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+t);var i=ke(n,"indices","oneHot","int32"),o=i.shape.concat([t]);return i=i.flatten(),ze.runKernelFunc(function(s){return s.oneHot(i,t,e,r)},{$indices:i},function(s){return{$indices:function(){return en(i.shape,"float32")}}}).reshape(o)}}),xo=Ge({pad_:function(n,t,e){e===void 0&&(e=0);var r=ke(n,"x","pad");if(r.rank===0)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");var i={paddings:t,constantValue:e};return ze.runKernelFunc(function(o){return o.pad(r,t,e)},{x:r},function(o){var s=t.map(function(u){return u[0]});return{x:function(){return o.slice(s,r.shape)}}},"PadV2",i)}}),ep=Ge({pad1d_:function(n,t,e){return e===void 0&&(e=0),ee(t.length===2,function(){return"Invalid number of paddings. Must be length of 2."}),xo(n,[t],e)}}),tp=Ge({pad2d_:function(n,t,e){return e===void 0&&(e=0),ee(t.length===2&&t[0].length===2&&t[1].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),xo(n,t,e)}}),rp=Ge({pad3d_:function(n,t,e){return e===void 0&&(e=0),ee(t.length===3&&t[0].length===2&&t[1].length===2&&t[2].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),xo(n,t,e)}}),np=Ge({pad4d_:function(n,t,e){return e===void 0&&(e=0),ee(t.length===4&&t[0].length===2&&t[1].length===2&&t[2].length===2&&t[3].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),xo(n,t,e)}}),ip=Ge({rand_:function(n,t,e){var r=ce(n),i=null;if(e==null||e==="float32")i=new Float32Array(r);else if(e==="int32")i=new Int32Array(r);else{if(e!=="bool")throw new Error("Unknown data type "+e);i=new Uint8Array(r)}for(var o=0;o<r;o++)i[o]=t();return ze.makeTensor(i,n,e)}}),op=Ge({randomNormal_:function(n,t,e,r,i){if(t===void 0&&(t=0),e===void 0&&(e=1),r!=null&&r==="bool")throw new Error("Unsupported data type "+r);for(var o=new ms(t,e,r,!1,i),s=nr(n,r),u=0;u<s.values.length;u++)s.values[u]=o.nextValue();return s.toTensor()}}),ap=Ge({randomGamma_:function(n,t,e,r,i){if(e===void 0&&(e=1),r===void 0&&(r="float32"),e==null&&(e=1),r==null&&(r="float32"),r!=="float32"&&r!=="int32")throw new Error("Unsupported data type "+r);for(var o=new Gd(t,e,r,i),s=nr(n,r),u=0;u<s.values.length;u++)s.values[u]=o.nextValue();return s.toTensor()}}),pl=Ge({randomUniform_:function(n,t,e,r,i){t===void 0&&(t=0),e===void 0&&(e=1),r===void 0&&(r="float32");for(var o=nr(n,r),s=new Qd(t,e,null,i),u=0;u<o.values.length;u++)o.values[u]=s.nextValue();return o.toTensor()}}),Ei=Ge({reshape_:function(n,t){var e=ke(n,"x","reshape",null);t=Y(t,e.size),ee(e.size===ce(t),function(){return"new shape and old shape must have the same number of elements."});var r={shape:t};return ze.runKernelFunc(function(i){return i.reshape(e,t)},{x:e},function(i){return{x:function(){return i.reshape(e.shape)}}},"Reshape",r)}}),hl=Ge({spaceToBatchND_:function(n,t,e){var r=ke(n,"x","spaceToBatchND");return ee(r.rank>=1+t.length,function(){return"input rank "+r.rank+" should be > than [blockShape] "+t.length}),ee(e.length===t.length,function(){return"paddings.shape[0] "+e.length+" must be equal to [blockShape] "+t.length}),ee(r.shape.reduce(function(i,o,s){return s>0&&s<=t.length?i&&(o+e[s-1][0]+e[s-1][1])%t[s-1]==0:i},!0),function(){return"input spatial dimensions "+r.shape.slice(1)+" with paddings "+e.toString()+" must be divisible by blockShapes "+t.toString()}),ze.runKernelFunc(function(i){return i.spaceToBatchND(r,t,e)},{$x:r},function(i){return{$x:function(){return i.batchToSpaceND(t,e)}}})}}),vl=Ge({squeeze_:function(n,t){var e=ke(n,"x","squeeze");return Ei(e,q(e.shape,t).newShape)}}),ai=Ge({stack_:function(n,t){t===void 0&&(t=0);var e=Oi(n,"tensors","stack");if(ee(e.length>=1,function(){return"Pass at least one tensor to tf.stack"}),e.length===1)return e[0].expandDims(t);var r=e[0].rank,i=e[0].shape,o=e[0].dtype;ee(t<=r,function(){return"Axis must be <= rank of the tensor"}),e.forEach(function(u){de(i,u.shape,"All tensors passed to stack must have matching shapes")}),e.forEach(function(u){ee(o===u.dtype,function(){return"All tensors passed to stack must have matching dtypes"})});var s=e.map(function(u){return u.expandDims(t)});return kn(s,t)}}),No=Ge({tile_:function(n,t){var e=ke(n,"x","tile",null);ee(e.rank===t.length,function(){return"Error in transpose: rank of input "+e.rank+" must match length of reps "+t+"."});var r=[e],i={reps:t};return ze.runKernelFunc(function(o,s){var u=o.tile(e,t);return s([e]),u},{x:e},function(o,s){var u=s[0];return{x:function(){var l=Cr(u);if(u.rank===1)for(var d=0;d<t[0];++d)l=l.add(o.slice([d*u.shape[0]],[u.shape[0]]));else if(u.rank===2)for(d=0;d<t[0];++d)for(var A=0;A<t[1];++A)l=l.add(o.slice([d*u.shape[0],A*u.shape[1]],[u.shape[0],u.shape[1]]));else if(u.rank===3)for(d=0;d<t[0];++d)for(A=0;A<t[1];++A)for(var O=0;O<t[2];++O)l=l.add(o.slice([d*u.shape[0],A*u.shape[1],O*u.shape[2]],[u.shape[0],u.shape[1],u.shape[2]]));else{if(u.rank!==4)throw new Error("Gradient for tile operation is not implemented for rank-"+u.rank+" tensors yet.");for(d=0;d<t[0];++d)for(A=0;A<t[1];++A)for(O=0;O<t[2];++O)for(var D=0;D<t[3];++D)l=l.add(o.slice([d*u.shape[0],A*u.shape[1],O*u.shape[2],D*u.shape[3]],[u.shape[0],u.shape[1],u.shape[2],u.shape[3]]))}return l}}},"Tile",i,r)}}),sp=Ge({truncatedNormal_:function(n,t,e,r,i){if(t===void 0&&(t=0),e===void 0&&(e=1),r!=null&&r==="bool")throw new Error("Unsupported data type "+r);for(var o=new ms(t,e,r,!0,i),s=nr(n,r),u=0;u<s.values.length;u++)s.values[u]=o.nextValue();return s.toTensor()}}),jn=Ge({unstack_:function(n,t){t===void 0&&(t=0),t=t||0;var e=ke(n,"x","unstack");ee(t>=-e.shape.length&&t<e.shape.length,function(){return"Axis = "+t+" is not in [-"+e.shape.length+", "+e.shape.length+")"}),t<0&&(t+=e.shape.length);var r={axis:t};return ze.runKernelFunc(function(i){return i.unstack(e,t)},{x:e},function(i){return{x:function(){return ai(i,t)}}},"Unpack",r)}}),up=function(n,t){return E(this,void 0,void 0,function(){var e,r,i,o,s,u,l,d,A,O;return C(this,function(D){switch(D.label){case 0:return e=ke(n,"x","setdiff1d"),r=ke(t,"y","setdiff1d"),ee(e.dtype===r.dtype,function(){return"x and y should have the same dtype, but got x ("+e.dtype+") and y ("+r.dtype+")."}),ee(e.rank===1,function(){return"x should be 1D tensor, but got x ("+e.shape+")."}),ee(r.rank===1,function(){return"y should be 1D tensor, but got y ("+r.shape+")."}),[4,e.data()];case 1:return i=D.sent(),[4,r.data()];case 2:for(o=D.sent(),s=new Set(o),u=0,A=0;A<i.length;A++)s.has(i[A])||u++;for(l=new Jt([u],e.dtype),d=new Jt([u],"int32"),A=0,O=0;A<i.length;A++)s.has(i[A])||(l.values[O]=i[A],d.values[O]=A,O++);return[2,[l.toTensor(),d.toTensor()]]}})})};function Sa(n,t,e,r){r===void 0&&(r=!0);var i=[];if(r)(i=i.concat(t.slice(0))).push(n[0]/e),i=i.concat(n.slice(1));else{i=i.concat(n[0]);for(var o=t.length,s=0;s<o;++s)i=i.concat([n[s+1]/t[s],t[s]]);i=i.concat(n.slice(o+1))}return i}function Ia(n,t,e){e===void 0&&(e=!0);var r=[];if(e){r.push(t);for(var i=t+1;i<n;++i)i<=2*t?(r.push(i),r.push(i-(t+1))):r.push(i)}else{var o=[],s=[];for(i=1;i<n;++i)i>=2*t+1||i%2==1?s.push(i):o.push(i);r.push.apply(r,o),r.push(0),r.push.apply(r,s)}return r}function Ta(n,t,e,r){r===void 0&&(r=!0);var i=[];r?i.push(n[0]/e):i.push(n[0]*e);for(var o=1;o<n.length;++o)o<=t.length?r?i.push(t[o-1]*n[o]):i.push(n[o]/t[o-1]):i.push(n[o]);return i}function ml(n,t){for(var e=[0],r=0;r<t;++r)e.push(n[r][0]);return e}function gl(n,t,e){for(var r=n.slice(0,1),i=0;i<e;++i)r.push(n[i+1]-t[i][0]-t[i][1]);return r}function ys(n,t){if(n.rank<1)throw new Error("tf.gatherND() expects the input to be rank 1 or higher, but the rank was "+n.rank+".");if(t.rank<1)throw new Error("tf.gatherND() expects the indices to be rank 1 or higher, but the rank was "+t.rank+".");if(t.dtype!=="int32")throw new Error("tf.gatherND() expects the indices to be int32 type, but the dtype was "+t.dtype+".");if(t.shape[t.rank-1]>n.rank)throw new Error("index innermost dimension length must be <= tensor rank; saw: "+t.shape[t.rank-1]+" vs. "+n.rank);if(n.size===0)throw new Error("Requested more than 0 entries, but input is empty. Input shape: "+n.shape+".");for(var e=t.shape,r=e[e.length-1],i=1,o=0;o<e.length-1;++o)i*=e[o];var s=n.shape,u=e.slice();u.pop();var l=1;for(o=r;o<n.rank;++o)l*=s[o],u.push(s[o]);var d=rt(n.shape).map(function(A){return A/l}).concat([1]).slice(0,r);return[u,i,l,d]}var rb=Object.freeze({prepareAndValidate:ys}),bs=30;function Ra(n){return n<=bs?n:Qe(n,Math.floor(Math.sqrt(n)))}function yl(n,t,e){var r=t.rank>1?t.shape[t.rank-1]:1,i=t.rank>1?t.rank-1:1,o="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+e.shape+", indices.shape: "+t.shape+", shape: "+n+", sliceDim: "+r+", and batchDim: "+i+".";if(e.rank<i)throw new Error(o+" update.rank < "+i+". ");if(n.length<r+(e.rank-i))throw new Error(o+" Output shape length < "+(r+(e.rank-i)));if(e.rank!==i+n.length-r)throw new Error(o+" update.rank != "+(i+n.length-r));for(var s=0;s<i;++s)if(e.shape[s]!==t.shape[s])throw new Error(o+" updates.shape["+s+"] ("+e.shape[s]+") != indices.shape["+s+"] ("+t.shape[s]+").");for(s=0;s<e.rank-i;++s)if(e.shape[s+i]!==n[s+r])throw new Error(o+" updates.shape["+(s+i)+"] ("+e.shape[s+i]+") != shape["+(s+i)+"] ("+n[s+i]+")")}function bl(n,t,e){if(t.rank<1)throw new Error("tf.scatterND() expects the indices to be rank 1 or higher, but the rank was "+t.rank+".");if(n.rank<1)throw new Error("tf.scatterND() expects the updates to be rank 1 or higher, but the rank was "+n.rank+".");if(t.dtype!=="int32")throw new Error("The dtype of 'indices' should be int32, but got dtype: "+t.dtype);if(e.length<1)throw new Error("Output rank must be greater or equal to 1, but got shape: "+e);if(e.length===0){if(t.size===0)throw new Error("Indices specified for empty output. indices shape: "+t.shape);if(n.size===0)throw new Error("Updates specified for empty output. updates shape: "+n.shape)}yl(e,t,n)}function ia(n,t,e){for(var r=t.shape.length,i=r>1?t.shape[r-1]:1,o=e.length,s=1,u=i;u<o;++u)s*=e[u];var l=i<1?1:i;return{sliceRank:i,numUpdates:ce(t.shape)/l,sliceSize:s,strides:rt(e.slice(0,i)).concat([1]),outputSize:ce(e)}}var nb=Object.freeze({validateUpdateShape:yl,validateInput:bl,calculateShapes:ia});function wl(n,t,e){ee(n.rank===t.length,function(){return"Error in slice"+n.rank+"D: Length of begin "+t+" must match the rank of the array ("+n.rank+")."}),ee(n.rank===e.length,function(){return"Error in slice"+n.rank+"D: Length of size "+e+" must match the rank of the array ("+n.rank+")."});for(var r=function(o){ee(t[o]+e[o]<=n.shape[o],function(){return"Error in slice"+n.rank+"D: begin["+o+"] + size["+o+"] ("+(t[o]+e[o])+") would overflow input.shape["+o+"] ("+n.shape[o]+")"})},i=0;i<n.rank;++i)r(i)}function ws(n){for(var t=[],e=0;n>0;)1&n&&t.push(e),n/=2,e++;return t}function Oa(n,t,e){for(var r=[],i=0;i<n.length;i++)r[i]=Math.ceil((t[i]-n[i])/e[i]);return r}function Al(n,t,e,r,i){var o=t[i],s=e[i]||1;(n&1<<i||o==null)&&(o=s>0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);var u=r[i];return o<0&&(o+=u),o=pe(0,o,u-1)}function xl(n,t,e,r,i){var o=t[i],s=e[i]||1;(n&1<<i||o==null)&&(o=s>0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);var u=r[i];return o<0&&(o+=u),o=s>0?pe(0,o,u):pe(-1,o,u-1)}function As(n,t,e){for(var r=e.length,i=0;i<e.length;i++)if(e[i]>1){r=i;break}for(i=r+1;i<e.length;i++)if(t[i]>0||e[i]!==n[i])return!1;return!0}function xs(n,t){for(var e=n.length>0?n[n.length-1]:1,r=0;r<n.length-1;r++)e+=n[r]*t[r];return e}var ib=Object.freeze({assertParamsValid:wl,maskToAxes:ws,computeOutShape:Oa,startForAxis:Al,stopForAxis:xl,isSliceContinous:As,computeFlatOffset:xs});function ob(n){return ee(nt(n),function(){return"The f passed in grad(f) must be a function"}),function(t,e){var r=ke(t,"x","tf.grad",null),i=e!=null?ke(e,"dy","tf.grad"):null;return ze.tidy(function(){var o=ze.gradients(function(){return n(r)},[r],i),s=o.value,u=o.grads;return i!=null&&de(s.shape,i.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),ja(u),u[0]})}}function ab(n){return ee(nt(n),function(){return"The f passed in grads(f) must be a function"}),function(t,e){ee(Array.isArray(t),function(){return"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s"});var r=Oi(t,"args","tf.grads",null),i=e!=null?ke(e,"dy","tf.grads"):null;return ze.tidy(function(){var o=ze.gradients(function(){return n.apply(void 0,r)},r,i),s=o.value,u=o.grads;return i!=null&&de(s.shape,i.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),ja(u),u})}}function sb(n){return ee(nt(n),function(){return"The f passed in valueAndGrad(f) must be a function"}),function(t,e){ee(t instanceof Xt,function(){return"The x passed in valueAndGrad(f)(x) must be a tensor"}),ee(e==null||e instanceof Xt,function(){return"The dy passed in valueAndGrad(f)(x, dy) must be a tensor"});var r=ze.gradients(function(){return n(t)},[t],e),i=r.grads,o=r.value;return ja(i),{grad:i[0],value:o}}}function ub(n){return ee(nt(n),function(){return"The f passed in valueAndGrads(f) must be a function"}),function(t,e){ee(Array.isArray(t)&&t.every(function(i){return i instanceof Xt}),function(){return"The args passed in valueAndGrads(f)(args) must be array of tensors"}),ee(e==null||e instanceof Xt,function(){return"The dy passed in valueAndGrads(f)(args, dy) must be a tensor"});var r=ze.gradients(function(){return n.apply(void 0,t)},t,e);return e!=null&&de(r.value.shape,e.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),ja(r.grads),r}}function lp(n,t){ee(nt(n),function(){return"The f passed in variableGrads(f) must be a function"}),ee(t==null||Array.isArray(t)&&t.every(function(A){return A instanceof gr}),function(){return"The varList passed in variableGrads(f, varList) must be an array of variables"});var e=t!=null;if(!e)for(var r in t=[],ze.registeredVariables)t.push(ze.registeredVariables[r]);var i=e?t.filter(function(A){return!A.trainable}):null,o=t.length;ee((t=t.filter(function(A){return A.trainable})).length>0,function(){return"variableGrads() expects at least one of the input variables to be trainable, but none of the "+o+" variables is trainable."});var s=ze.gradients(n,t,null,!0),u=s.value,l=s.grads;ee(l.some(function(A){return A!=null}),function(){return"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."}),ee(u.rank===0,function(){return"The f passed in variableGrads(f) must return a scalar, but it returned a rank-"+u.rank+" tensor"});var d={};return t.forEach(function(A,O){l[O]!=null&&(d[A.name]=l[O])}),i!=null&&i.forEach(function(A){return d[A.name]=null}),{value:u,grads:d}}function ka(n){return ze.customGrad(n)}function ja(n){if(n.filter(function(t){return t==null}).length>0)throw new Error(`Cannot compute gradient of y=f(x) with respect to x. Make sure that
the f you passed encloses all operations that lead from x to y.`)}var Vi=Ge({softmax_:function(n,t){t===void 0&&(t=-1);var e=ke(n,"logits","softmax","float32");if(t===-1&&(t=e.rank-1),t!==e.rank-1)throw Error("Softmax along a non-last dimension is not yet supported. Logits was rank "+e.rank+" and dim was "+t);return ze.runKernelFunc(function(r,i){var o=r.softmax(e,t);return i([o]),o},{logits:e},function(r,i){var o=i[0],s=r.mul(o);return{logits:function(){return s.sub(s.sum([t],!0).mul(o))}}},"Softmax",{dim:t},[],[!0])}}),cp=Ge({logSoftmax_:function(n,t){t===void 0&&(t=-1);var e=ke(n,"logits","logSoftmax");if(t===-1&&(t=e.rank-1),t!==e.rank-1)throw Error("Log Softmax along a non-last dimension is not yet supported. Logits was rank "+e.rank+" and axis was "+t);return ka(function(r,i){var o=r.max(t,!0),s=r.sub(o),u=s.toFloat().sub(s.exp().sum(t,!0).log());return i([u]),{value:u,gradFunc:function(l,d){var A=d[0].exp();return l.sub(l.sum(t,!0).mul(A))}}})(e)}}),El=function(){function n(t,e){this.backend=t,this.dataMover=e,this.data=new WeakMap,this.dataIdsCount=0}return n.prototype.get=function(t){return this.data.has(t)||this.dataMover.moveData(this.backend,t),this.data.get(t)},n.prototype.set=function(t,e){this.dataIdsCount++,this.data.set(t,e)},n.prototype.has=function(t){return this.data.has(t)},n.prototype.delete=function(t){return this.dataIdsCount--,this.data.delete(t)},n.prototype.numDataIds=function(){return this.dataIdsCount},n}(),Cl=function(){function n(){}return n.prototype.time=function(t){return ot("time")},n.prototype.read=function(t){return ot("read")},n.prototype.readSync=function(t){return ot("readSync")},n.prototype.numDataIds=function(){return ot("numDataIds")},n.prototype.disposeData=function(t){return ot("disposeData")},n.prototype.write=function(t,e,r){return ot("write")},n.prototype.move=function(t,e,r,i){return ot("move")},n.prototype.memory=function(){return ot("memory")},n.prototype.floatPrecision=function(){return ot("floatPrecision")},n.prototype.epsilon=function(){return this.floatPrecision()===32?1e-7:1e-4},n.prototype.batchMatMul=function(t,e,r,i){return ot("batchMatMul")},n.prototype.fusedBatchMatMul=function(t){return t.a,t.b,t.transposeA,t.transposeB,t.bias,t.activation,t.preluActivationWeights,ot("fusedBatchMatMul")},n.prototype.slice=function(t,e,r){return ot("slice")},n.prototype.stridedSlice=function(t,e,r,i){return ot("stridedSlice")},n.prototype.unstack=function(t,e){return ot("unstack")},n.prototype.reverse=function(t,e){return ot("reverse")},n.prototype.concat=function(t,e){return ot("concat")},n.prototype.neg=function(t){return ot("neg")},n.prototype.add=function(t,e){return ot("add")},n.prototype.addN=function(t){return ot("addN")},n.prototype.subtract=function(t,e){return ot("subtract")},n.prototype.multiply=function(t,e){return ot("multiply")},n.prototype.realDivide=function(t,e){return ot("realDivide")},n.prototype.floorDiv=function(t,e){return ot("floorDiv")},n.prototype.sum=function(t,e){return ot("sum")},n.prototype.prod=function(t,e){return ot("prod")},n.prototype.unsortedSegmentSum=function(t,e,r){return ot("unsortedSegmentSum")},n.prototype.argMin=function(t,e){return ot("argMin")},n.prototype.argMax=function(t,e){return ot("argMax")},n.prototype.equal=function(t,e){return ot("equal")},n.prototype.notEqual=function(t,e){return ot("notEqual")},n.prototype.less=function(t,e){return ot("less")},n.prototype.lessEqual=function(t,e){return ot("lessEqual")},n.prototype.greater=function(t,e){return ot("greater")},n.prototype.greaterEqual=function(t,e){return ot("greaterEqual")},n.prototype.logicalNot=function(t){return ot("logicalNot")},n.prototype.logicalAnd=function(t,e){return ot("logicalAnd")},n.prototype.logicalOr=function(t,e){return ot("logicalOr")},n.prototype.where=function(t){return ot("where")},n.prototype.select=function(t,e,r){return ot("select")},n.prototype.topk=function(t,e,r){return ot("topk")},n.prototype.min=function(t,e){return ot("min")},n.prototype.minimum=function(t,e){return ot("minimum")},n.prototype.mod=function(t,e){return ot("mod")},n.prototype.max=function(t,e){return ot("max")},n.prototype.maximum=function(t,e){return ot("maximum")},n.prototype.all=function(t,e){return ot("all")},n.prototype.any=function(t,e){return ot("any")},n.prototype.squaredDifference=function(t,e){return ot("squaredDifference")},n.prototype.ceil=function(t){return ot("ceil")},n.prototype.floor=function(t){return ot("floor")},n.prototype.round=function(t){return ot("round")},n.prototype.sign=function(t){return ot("sign")},n.prototype.isNaN=function(t){return ot("isNaN")},n.prototype.isInf=function(t){return ot("isInf")},n.prototype.isFinite=function(t){return ot("isFinite")},n.prototype.pow=function(t,e){return ot("pow")},n.prototype.exp=function(t){return ot("exp")},n.prototype.expm1=function(t){return ot("expm1")},n.prototype.softmax=function(t,e){return ot("softmax")},n.prototype.log=function(t){return ot("log")},n.prototype.log1p=function(t){return ot("log1p")},n.prototype.sqrt=function(t){return ot("sqrt")},n.prototype.rsqrt=function(t){return ot("rsqrt")},n.prototype.square=function(t){return ot("square")},n.prototype.reciprocal=function(t){return ot("reciprocal")},n.prototype.relu=function(t){return ot("relu")},n.prototype.relu6=function(t){return ot("relu6")},n.prototype.prelu=function(t,e){return ot("prelu")},n.prototype.elu=function(t){return ot("elu")},n.prototype.eluDer=function(t,e){return ot("eluDer")},n.prototype.selu=function(t){return ot("selu")},n.prototype.int=function(t){return ot("int")},n.prototype.clip=function(t,e,r){return ot("clip")},n.prototype.abs=function(t){return ot("abs")},n.prototype.complexAbs=function(t){return ot("complexAbs")},n.prototype.sigmoid=function(t){return ot("sigmoid")},n.prototype.softplus=function(t){return ot("softplus")},n.prototype.sin=function(t){return ot("sin")},n.prototype.cos=function(t){return ot("cos")},n.prototype.tan=function(t){return ot("tan")},n.prototype.asin=function(t){return ot("asin")},n.prototype.acos=function(t){return ot("acos")},n.prototype.atan=function(t){return ot("atan")},n.prototype.atan2=function(t,e){return ot("atan2")},n.prototype.sinh=function(t){return ot("sinh")},n.prototype.cosh=function(t){return ot("cosh")},n.prototype.tanh=function(t){return ot("tanh")},n.prototype.asinh=function(t){return ot("asinh")},n.prototype.acosh=function(t){return ot("acosh")},n.prototype.atanh=function(t){return ot("atanh")},n.prototype.erf=function(t){return ot("erf")},n.prototype.step=function(t,e){return ot("step")},n.prototype.fusedConv2d=function(t){return t.input,t.filter,t.convInfo,t.bias,t.activation,t.preluActivationWeights,ot("fusedConv2d")},n.prototype.conv2d=function(t,e,r){return ot("conv2d")},n.prototype.conv2dDerInput=function(t,e,r){return ot("conv2dDerInput")},n.prototype.conv2dDerFilter=function(t,e,r){return ot("conv2dDerFilter")},n.prototype.fusedDepthwiseConv2D=function(t){return t.input,t.filter,t.convInfo,t.bias,t.activation,t.preluActivationWeights,ot("fusedDepthwiseConv2D")},n.prototype.depthwiseConv2D=function(t,e,r){return ot("depthwiseConv2D")},n.prototype.depthwiseConv2DDerInput=function(t,e,r){return ot("depthwiseConv2DDerInput")},n.prototype.depthwiseConv2DDerFilter=function(t,e,r){return ot("depthwiseConv2DDerFilter")},n.prototype.conv3d=function(t,e,r){return ot("conv3d")},n.prototype.conv3dDerInput=function(t,e,r){return ot("conv3dDerInput")},n.prototype.conv3dDerFilter=function(t,e,r){return ot("conv3dDerFilter")},n.prototype.maxPool=function(t,e){return ot("maxPool")},n.prototype.maxPoolBackprop=function(t,e,r,i){return ot("maxPoolBackprop")},n.prototype.avgPool=function(t,e){return ot("avgPool")},n.prototype.avgPoolBackprop=function(t,e,r){return ot("avgPoolBackprop")},n.prototype.avgPool3d=function(t,e){return ot("avgPool3d")},n.prototype.avgPool3dBackprop=function(t,e,r){return ot("avgPool3dBackprop")},n.prototype.maxPool3d=function(t,e){return ot("maxPool3d")},n.prototype.maxPool3dBackprop=function(t,e,r,i){return ot("maxPool3dBackprop")},n.prototype.reshape=function(t,e){return ot("reshape")},n.prototype.cast=function(t,e){return ot("cast")},n.prototype.tile=function(t,e){return ot("tile")},n.prototype.pad=function(t,e,r){return ot("pad")},n.prototype.transpose=function(t,e){return ot("transpose")},n.prototype.gather=function(t,e,r){return ot("gather")},n.prototype.gatherND=function(t,e){return ot("gatherND")},n.prototype.scatterND=function(t,e,r){return ot("scatterND")},n.prototype.batchToSpaceND=function(t,e,r){return ot("batchToSpaceND")},n.prototype.spaceToBatchND=function(t,e,r){return ot("spaceToBatchND")},n.prototype.resizeBilinear=function(t,e,r,i){return ot("resizeBilinear")},n.prototype.resizeBilinearBackprop=function(t,e,r){return ot("resizeBilinearBackprop")},n.prototype.resizeNearestNeighbor=function(t,e,r,i){return ot("resizeNearestNeighbor")},n.prototype.resizeNearestNeighborBackprop=function(t,e,r){return ot("resizeNearestNeighborBackprop")},n.prototype.batchNormalization=function(t,e,r,i,o,s){return ot("batchNormalization")},n.prototype.localResponseNormalization4D=function(t,e,r,i,o){return ot("localResponseNormalization4D")},n.prototype.LRNGrad=function(t,e,r,i,o,s,u){return ot("LRNGrad")},n.prototype.multinomial=function(t,e,r,i){return ot("multinomial")},n.prototype.oneHot=function(t,e,r,i){return ot("oneHot")},n.prototype.cumsum=function(t,e,r,i){return ot("cumsum")},n.prototype.nonMaxSuppression=function(t,e,r,i,o){return ot("nonMaxSuppression")},n.prototype.fft=function(t){return ot("fft")},n.prototype.ifft=function(t){return ot("ifft")},n.prototype.complex=function(t,e){return ot("complex")},n.prototype.real=function(t){return ot("real")},n.prototype.imag=function(t){return ot("imag")},n.prototype.cropAndResize=function(t,e,r,i,o,s){return ot("cropAndResize")},n.prototype.depthToSpace=function(t,e,r){return ot("depthToSpace")},n.prototype.split=function(t,e,r){return ot("split")},n.prototype.sparseToDense=function(t,e,r,i){return ot("sparseToDense")},n.prototype.diag=function(t){return ot("diag")},n.prototype.fill=function(t,e,r){return ot("fill")},n.prototype.onesLike=function(t){return ot("onesLike")},n.prototype.zerosLike=function(t){return ot("zerosLike")},n.prototype.linspace=function(t,e,r){return ot("linspace")},n.prototype.dispose=function(){return ot("dispose")},n}();function ot(n){throw new Error("'"+n+"' not yet implemented or not found in the registry. Did you forget to import the kernel?")}function Gi(n,t){for(var e=n.length,r=[],i=0;i<e;i++){var o=e-1-i,s=n[o]||1;(t[t.length-1-i]||1)>1&&s===1&&r.unshift(o)}return r}function In(n,t){for(var e=[],r=0;r<t.length;r++){var i=n[n.length-r-1],o=t.length-r-1,s=t[o];(i==null||i===1&&s>1)&&e.unshift(o)}return e}function fr(n,t){for(var e=[],r=Math.max(n.length,t.length),i=0;i<r;i++){var o=n[n.length-i-1];o==null&&(o=1);var s=t[t.length-i-1];if(s==null&&(s=1),o===1)e.unshift(s);else if(s===1)e.unshift(o);else{if(o!==s)throw Error("Operands could not be broadcast together with shapes "+n+" and "+t+".");e.unshift(o)}}return e}function _o(n,t,e,r,i,o,s){s===void 0&&(s="channelsLast");var u,l=Da(t),d=l[0],A=l[1];if(s==="channelsLast")u=[d,A,n[3],n[3]];else{if(s!=="channelsFirst")throw new Error("Unknown dataFormat "+s);u=[d,A,n[1],n[1]]}return oo(n,u,e,r,i,o,!1,s)}function oa(n,t,e,r,i,o,s){s===void 0&&(s="NDHWC");var u,l,d=Cs(t),A=d[0],O=d[1],D=d[2];if(s==="NDHWC")l="channelsLast",u=[A,O,D,n[4],n[4]];else{if(s!=="NCDHW")throw new Error("Unknown dataFormat "+s);l="channelsFirst",u=[A,O,D,n[1],n[1]]}return aa(n,u,e,r,i,!1,l,o)}function oo(n,t,e,r,i,o,s,u){s===void 0&&(s=!1),u===void 0&&(u="channelsLast");var l=[-1,-1,-1,-1],d=l[0],A=l[1],O=l[2],D=l[3];if(u==="channelsLast")d=n[0],A=n[1],O=n[2],D=n[3];else{if(u!=="channelsFirst")throw new Error("Unknown dataFormat "+u);d=n[0],D=n[1],A=n[2],O=n[3]}var H,te=t[0],se=t[1],ae=t[3],ue=Da(e),ye=ue[0],we=ue[1],ve=Da(r),Ee=ve[0],Te=ve[1],Fe=Fo(te,Ee),Le=Fo(se,Te),Me=function(tt,ct,bt,mt,ht,At,ft,xt){var St,Lt,$t;if(typeof tt=="number"){St={top:tt,bottom:tt,left:tt,right:tt,type:tt===0?"VALID":"NUMBER"};var ir=function(hr,Ur,Ir,Xr,ln){Xr==null&&(Xr=Es(hr,Ur,Ir));var cn=hr[0],Fi=hr[1],Li=sa((cn-Ur+2*Xr)/Ir+1,ln);ee(ge(Li),function(){return"The output # of rows ("+Li+") must be an integer. Change the stride and/or zero pad parameters"});var ci=sa((Fi-Ur+2*Xr)/Ir+1,ln);return ee(ge(ci),function(){return"The output # of columns ("+ci+") must be an integer. Change the stride and/or zero pad parameters"}),[Li,ci]}([ct,bt],At,mt,tt,xt);Lt=ir[0],$t=ir[1]}else if(tt==="same"){Lt=Math.ceil(ct/mt),$t=Math.ceil(bt/ht);var ur=Math.max(0,(Lt-1)*mt+At-ct),vr=Math.max(0,($t-1)*ht+ft-bt),pr=Math.floor(ur/2),mr=ur-pr,lr=Math.floor(vr/2);St={top:pr,bottom:mr,left:lr,right:vr-lr,type:"SAME"}}else{if(tt!=="valid")throw Error("Unknown padding parameter: "+tt);St={top:0,bottom:0,left:0,right:0,type:"VALID"},Lt=Math.ceil((ct-At+1)/mt),$t=Math.ceil((bt-ft+1)/ht)}return{padInfo:St,outHeight:Lt,outWidth:$t}}(i,A,O,ye,we,Fe,Le,o),Ne=Me.padInfo,Ze=Me.outHeight,Xe=Me.outWidth,qe=s?ae*D:ae;return u==="channelsFirst"?H=[d,qe,Ze,Xe]:u==="channelsLast"&&(H=[d,Ze,Xe,qe]),{batchSize:d,dataFormat:u,inHeight:A,inWidth:O,inChannels:D,outHeight:Ze,outWidth:Xe,outChannels:qe,padInfo:Ne,strideHeight:ye,strideWidth:we,filterHeight:te,filterWidth:se,effectiveFilterHeight:Fe,effectiveFilterWidth:Le,dilationHeight:Ee,dilationWidth:Te,inShape:n,outShape:H,filterShape:t}}function aa(n,t,e,r,i,o,s,u){o===void 0&&(o=!1),s===void 0&&(s="channelsLast");var l=[-1,-1,-1,-1,-1],d=l[0],A=l[1],O=l[2],D=l[3],H=l[4];if(s==="channelsLast")d=n[0],A=n[1],O=n[2],D=n[3],H=n[4];else{if(s!=="channelsFirst")throw new Error("Unknown dataFormat "+s);d=n[0],H=n[1],A=n[2],O=n[3],D=n[4]}var te,se=t[0],ae=t[1],ue=t[2],ye=t[4],we=Cs(e),ve=we[0],Ee=we[1],Te=we[2],Fe=Cs(r),Le=Fe[0],Me=Fe[1],Ne=Fe[2],Ze=Fo(se,Le),Xe=Fo(ae,Me),qe=Fo(ue,Ne),tt=function(ft,xt,St,Lt,$t,ir,ur,vr,pr,mr,lr){var hr,Ur,Ir,Xr;if(typeof ft=="number"){hr={top:ft,bottom:ft,left:ft,right:ft,front:ft,back:ft,type:ft===0?"VALID":"NUMBER"};var ln=function(ea,eo,ol,ta,Ui,al){Ui==null&&(Ui=Es(ea,eo,ta));var q0=ea[0],eb=ea[1],tb=ea[2],sl=sa((q0-eo+2*Ui)/ta+1,al);ee(ge(sl),function(){return"The output # of depths ("+sl+") must be an integer. Change the stride and/or zero pad parameters"});var ul=sa((eb-eo+2*Ui)/ta+1,al);ee(ge(ul),function(){return"The output # of rows ("+ul+") must be an integer. Change the stride and/or zero pad parameters"});var ll=sa((tb-eo+2*Ui)/ta+1,al);return ee(ge(ll),function(){return"The output # of columns ("+ll+") must be an integer. Change the stride and/or zero pad parameters"}),[sl,ul,ll,ol]}([xt,St,Lt,1],vr,1,$t,ft,lr);Ur=ln[0],Ir=ln[1],Xr=ln[2]}else if(ft==="same"){Ur=Math.ceil(xt/$t),Ir=Math.ceil(St/ir),Xr=Math.ceil(Lt/ur);var cn=(Ur-1)*$t+vr-xt,Fi=(Ir-1)*ir+pr-St,Li=(Xr-1)*ur+mr-Lt,ci=Math.floor(cn/2),qo=cn-ci,$i=Math.floor(Fi/2),mo=Fi-$i,qi=Math.floor(Li/2);hr={top:$i,bottom:mo,left:qi,right:Li-qi,front:ci,back:qo,type:"SAME"}}else{if(ft!=="valid")throw Error("Unknown padding parameter: "+ft);hr={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},Ur=Math.ceil((xt-vr+1)/$t),Ir=Math.ceil((St-pr+1)/ir),Xr=Math.ceil((Lt-mr+1)/ur)}return{padInfo:hr,outDepth:Ur,outHeight:Ir,outWidth:Xr}}(i,A,O,D,ve,Ee,Te,Ze,Xe,qe,u),ct=tt.padInfo,bt=tt.outDepth,mt=tt.outHeight,ht=tt.outWidth,At=o?ye*H:ye;return s==="channelsFirst"?te=[d,At,bt,mt,ht]:s==="channelsLast"&&(te=[d,bt,mt,ht,At]),{batchSize:d,dataFormat:s,inDepth:A,inHeight:O,inWidth:D,inChannels:H,outDepth:bt,outHeight:mt,outWidth:ht,outChannels:At,padInfo:ct,strideDepth:ve,strideHeight:Ee,strideWidth:Te,filterDepth:se,filterHeight:ae,filterWidth:ue,effectiveFilterDepth:Ze,effectiveFilterHeight:Xe,effectiveFilterWidth:qe,dilationDepth:Le,dilationHeight:Me,dilationWidth:Ne,inShape:n,outShape:te,filterShape:t}}function Es(n,t,e,r){r===void 0&&(r=1);var i=Fo(t,r);return Math.floor((n[0]*(e-1)-e+i)/2)}function Da(n){return typeof n=="number"?[n,n,n]:n.length===2?[n[0],n[1],1]:n}function Cs(n){return typeof n=="number"?[n,n,n]:n}function Fo(n,t){return t<=1?n:n+(n-1)*(t-1)}function sa(n,t){if(!t)return n;switch(t){case"round":return Math.round(n);case"ceil":return Math.ceil(n);case"floor":return Math.floor(n);default:throw new Error("Unknown roundingMode "+t)}}function Eo(n){var t=Da(n),e=t[0],r=t[1],i=t[2];return e===1&&r===1&&i===1}function Zn(n,t){return Eo(n)||Eo(t)}function Pa(n){if(n==="NHWC")return"channelsLast";if(n==="NCHW")return"channelsFirst";throw new Error("Unknown dataFormat "+n)}function Ss(n,t,e){if(t==="complex64"){if(n.dtype==="complex64")return n.clone();var r=en(n.shape),i=n.toFloat(),o=e.complex(i,r);return r.dispose(),i.dispose(),o}if(!S(n.dtype,t))return ze.makeTensorFromDataId(n.dataId,n.shape,t);if(n.dtype==="complex64"){var s=e.real(n);return o=s.cast(t),s.dispose(),o}if(t==="int32")return e.int(n);if(t==="bool"){var u=Tt(0,n.dtype);return o=e.notEqual(n,u),u.dispose(),o}throw new Error("Error in Cast: failed to cast "+n.dtype+" to "+t)}function Ba(n,t){return ze.makeTensorFromDataId(n.dataId,t,n.dtype)}function Is(n,t,e){var r=(t-n)/(e-1),i=Be(e,"float32");i[0]=n;for(var o=1;o<i.length;o++)i[o]=i[o-1]+r;return Sn(i,"float32")}var lb=Object.freeze({castTensor:Ss,reshapeTensor:Ba,linspaceImpl:Is,upcastType:rr,axesAreInnerMostDims:bo,combineLocations:Bo,computeOutAndReduceShapes:yn,expandShapeToKeepDim:On,assertAxesAreInnerMostDims:It,getAxesPermutation:Vt,getUndoAxesPermutation:Qr,getInnerMostAxes:Pr,getBroadcastDims:Gi,getReductionAxes:In,assertAndGetBroadcastShape:fr,assertParamsConsistent:qr,computeOutShape:mi,computePool2DInfo:_o,computePool3DInfo:oa,computeConv2DInfo:oo,computeConv3DInfo:aa,computeDefaultPad:Es,tupleValuesAreOne:Eo,eitherStridesOrDilationsAreOne:Zn,convertConv2DDataFormat:Pa,PARALLELIZE_THRESHOLD:bs,computeOptimalWindowSize:Ra});function Ts(n,t){if(n.length!==t.length)throw new Error("Cannot merge real and imag arrays of different lengths. real:"+n.length+", imag: "+t.length+".");for(var e=new Float32Array(2*n.length),r=0;r<e.length;r+=2)e[r]=n[r/2],e[r+1]=t[r/2];return e}function Sl(n,t){return{real:n[2*t],imag:n[2*t+1]}}function fp(n,t,e,r){n[2*r]=t,n[2*r+1]=e}function dp(n,t,e){var r=(e?2:-2)*Math.PI*(n/t);return{real:Math.cos(r),imag:Math.sin(r)}}function pp(n,t,e){var r=function(o,s,u){return function(l,d,A){for(var O=0,D=l.length,H=0,te=!1;O<D;){var se=A(d,l[H=O+(D-O>>>1)]);se>0?O=H+1:(D=H,te=!se)}return te?O:-O-1}(o,s,u||hp)}(n,t,e),i=r<0?-(r+1):r;n.splice(i,0,t)}function hp(n,t){return n>t?1:n<t?-1:0}function Rs(n,t,e,r,i){return Il(n,t,e,r,i,0).selectedIndices}function Os(n,t,e,r,i,o){var s=Il(n,t,e,r,i,o,!0);return s.numValidOutputs.dispose(),{selectedIndices:s.selectedIndices,selectedScores:s.selectedScores}}function Il(n,t,e,r,i,o,s,u){s===void 0&&(s=!1),u===void 0&&(u=!1);for(var l=Array.from(t).map(function(ve,Ee){return{score:ve,boxIndex:Ee,suppressBeginIndex:0}}).filter(function(ve){return ve.score>i}).sort(Tl),d=o>0?-.5/o:0,A=[],O=[];A.length<e&&l.length>0;){var D=l.pop(),H=D.score,te=D.boxIndex,se=D.suppressBeginIndex;if(H<i)break;for(var ae=!1,ue=A.length-1;ue>=se;--ue){var ye=vp(n,te,A[ue]);if(ye>=r){ae=!0;break}if(D.score=D.score*mp(r,d,ye),D.score<=i)break}D.suppressBeginIndex=A.length,ae||(D.score===H?(A.push(te),O.push(D.score)):D.score>i&&pp(l,D,Tl))}var we=A.length;return u&&(A.fill(0,we),O.fill(0,we)),{selectedIndices:Sn(A,"int32"),selectedScores:Sn(O,"float32"),numValidOutputs:Tt(we,"int32")}}function vp(n,t,e){var r=n.subarray(4*t,4*t+4),i=n.subarray(4*e,4*e+4),o=Math.min(r[0],r[2]),s=Math.min(r[1],r[3]),u=Math.max(r[0],r[2]),l=Math.max(r[1],r[3]),d=Math.min(i[0],i[2]),A=Math.min(i[1],i[3]),O=Math.max(i[0],i[2]),D=Math.max(i[1],i[3]),H=(u-o)*(l-s),te=(O-d)*(D-A);if(H<=0||te<=0)return 0;var se=Math.max(o,d),ae=Math.max(s,A),ue=Math.min(u,O),ye=Math.min(l,D),we=Math.max(ue-se,0)*Math.max(ye-ae,0);return we/(H+te-we)}function mp(n,t,e){var r=Math.exp(t*e*e);return e<=n?r:0}function Tl(n,t){return n.score-t.score||n.score===t.score&&t.boxIndex-n.boxIndex}function Rl(n,t,e){var r=new Array(n.rank).fill(0),i=n.shape.slice();return t.map(function(o){i[e]=o;var s=n.slice(r,i);return r[e]+=o,s})}function Ol(n,t){for(var e=new Array(n.rank),r=0;r<e.length;r++)e[r]=n.shape[r]*t[r];var i=nr(e,n.dtype);for(r=0;r<i.values.length;++r){for(var o=i.indexToLoc(r),s=new Array(n.rank),u=0;u<s.length;u++)s[u]=o[u]%n.shape[u];var l=n.locToIndex(s);i.values[r]=n.values[l]}return i.toTensor()}function kl(n,t,e,r,i){for(var o=t[t.length-1],s=[n.length/o,o],u=s[0],l=s[1],d=V(e,u*r),A=V("int32",u*r),O=0;O<u;O++){for(var D=O*l,H=n.subarray(D,D+l),te=[],se=0;se<H.length;se++)te.push({value:H[se],index:se});te.sort(function(ve,Ee){return Ee.value-ve.value});var ae=O*r,ue=d.subarray(ae,ae+r),ye=A.subarray(ae,ae+r);for(se=0;se<r;se++)ue[se]=te[se].value,ye[se]=te[se].index}var we=t.slice();return we[we.length-1]=r,[Un(d,we,e),Un(A,we,"int32")]}function ks(n,t){for(var e=[],r=0;r<t.length;r++)t[r]&&e.push(r);var i=nr(n,"int32"),o=nr([e.length,n.length],"int32");for(r=0;r<e.length;r++){var s=i.indexToLoc(e[r]),u=r*n.length;o.values.set(s,u)}return o.toTensor()}var gp=function(n,t){this.outputShape=[],this.outputShape=n,this.variableNames=t.map(function(i,o){return"T"+o});var e=[];this.variableNames.forEach(function(i){e.push("float v"+i+" = get"+i+"AtOutCoords();")});var r=this.variableNames.map(function(i){return"v"+i}).join(" + ");this.userCode=`
void main() {
`+e.join(`
`)+`
float result = `+r+`;
setOutput(result);
}
`},yp=function(n,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.variableNames=t.map(function(i,o){return"T"+o});var e=[];this.variableNames.forEach(function(i){e.push("vec4 v"+i+" = get"+i+"AtOutCoords();")});var r=this.variableNames.map(function(i){return"v"+i}).join(" + ");this.userCode=`
void main() {
`+e.join(`
`)+`
vec4 result = `+r+`;
setOutput(result);
}
`},bp=function(n,t,e){this.variableNames=["A"];var r=n.windowSize,i=n.batchSize,o=n.inSize,s=Math.ceil(o/r);e||this.variableNames.push("bestIndicesA"),this.outputShape=[i,s];var u=t==="max"?">":"<",l=e?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode=`
void main() {
ivec2 coords = getOutputCoords();
int batch = coords[0];
int outIdx = coords[1];
int inOffset = outIdx * `+r+`;
int bestIndex = inOffset;
float bestValue = getA(batch, bestIndex);
for (int i = 0; i < `+r+`; i++) {
int inIdx = `+l+`;
float candidate = getA(batch, inIdx);
if (candidate `+u+` bestValue) {
bestValue = candidate;
bestIndex = inIdx;
}
}
setOutput(float(bestIndex));
}
`};function jl(n,t){return["x","y","z","w","u","v"].slice(0,t).map(function(e){return n+"."+e})}function ti(n,t){return t===1?[n]:jl(n,t)}function zn(){var n,t,e,r,i,o,s,u,l,d;return M().getNumber("WEBGL_VERSION")===2?(n="#version 300 es",t="in",e="out",r="in",i="texture",o="outputColor",s="out vec4 outputColor;",u=`
bool isnan_custom(float val) {
return (val > 0.0 || val < 0.0) ? false : val != 0.0;
}
bvec4 isnan_custom(vec4 val) {
return bvec4(isnan_custom(val.x),
isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));
}
#define isnan(value) isnan_custom(value)
`,l="",d=`
#define round(value) newRound(value)
int newRound(float value) {
return int(floor(value + 0.5));
}
ivec4 newRound(vec4 value) {
return ivec4(floor(value + vec4(0.5)));
}
`):(n="",t="attribute",e="varying",r="varying",i="texture2D",o="gl_FragColor",s="",u=`
#define isnan(value) isnan_custom(value)
bool isnan_custom(float val) {
return (val > 0. || val < 1. || val == 0.) ? false : true;
}
bvec4 isnan_custom(vec4 val) {
return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));
}
`,l=`
uniform float INFINITY;
bool isinf(float val) {
return abs(val) == INFINITY;
}
bvec4 isinf(vec4 val) {
return equal(abs(val), vec4(INFINITY));
}
`,d=`
int round(float value) {
return int(floor(value + 0.5));
}
ivec4 round(vec4 value) {
return ivec4(floor(value + vec4(0.5)));
}
`),{version:n,attribute:t,varyingVs:e,varyingFs:r,texture2D:i,output:o,defineOutput:s,defineSpecialNaN:u,defineSpecialInf:l,defineRound:d}}function Co(n,t,e){e===void 0&&(e="index");var r=rt(t);return r.map(function(i,o){return"int "+n[o]+" = "+e+" / "+i+"; "+(o===r.length-1?"int "+n[o+1]+" = "+e+" - "+n[o]+" * "+i:"index -= "+n[o]+" * "+i)+";"}).join("")}function js(n){var t=rt(n).map(function(e){return e.toString()});return`
int getFlatIndex(ivec3 coords) {
return coords.x * `+t[0]+" + coords.y * "+t[1]+` + coords.z;
}
`}var Dl=`
const float FLOAT_MAX = 1.70141184e38;
const float FLOAT_MIN = 1.17549435e-38;
lowp vec4 encode_float(highp float v) {
if (isnan(v)) {
return vec4(255, 255, 255, 255);
}
highp float av = abs(v);
if(av < FLOAT_MIN) {
return vec4(0.0, 0.0, 0.0, 0.0);
} else if(v > FLOAT_MAX) {
return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;
} else if(v < -FLOAT_MAX) {
return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;
}
highp vec4 c = vec4(0,0,0,0);
highp float e = floor(log2(av));
highp float m = exp2(fract(log2(av))) - 1.0;
c[2] = floor(128.0 * m);
m -= c[2] / 128.0;
c[1] = floor(32768.0 * m);
m -= c[1] / 32768.0;
c[0] = floor(8388608.0 * m);
highp float ebias = e + 127.0;
c[3] = floor(ebias / 2.0);
ebias -= c[3] * 2.0;
c[2] += floor(ebias) * 128.0;
c[3] += 128.0 * step(0.0, -v);
return c / 255.0;
}
`;function wp(n,t,e,r){var i=[];n.forEach(function(H){var te=ce(H.shapeInfo.logicalShape);H.shapeInfo.isUniform?i.push("uniform float "+H.name+(te>1?"["+te+"]":"")+";"):(i.push("uniform sampler2D "+H.name+";"),i.push("uniform int offset"+H.name+";"))});var o,s,u=i.join(`
`),l=n.map(function(H){return function(te,se,ae){ae===void 0&&(ae=!1);var ue="";ue+=ae?Pl(te):Lo(te);var ye=te.shapeInfo.logicalShape,we=se.logicalShape;return ye.length<=we.length&&(ue+=ae?function(ve,Ee){var Te,Fe=ve.name,Le=Fe.charAt(0).toUpperCase()+Fe.slice(1),Me="get"+Le+"AtOutCoords",Ne=ve.shapeInfo.logicalShape.length,Ze=Ee.logicalShape.length,Xe=Gi(ve.shapeInfo.logicalShape,Ee.logicalShape),qe=Jr(Ze),tt=Ze-Ne,ct=["x","y","z","w","u","v"];Te=Ne===0?"":Ze<2&&Xe.length>=1?"coords = 0;":Xe.map(function(St){return"coords."+ct[St+tt]+" = 0;"}).join(`
`);var bt="";bt=Ze<2&&Ne>0?"coords":ve.shapeInfo.logicalShape.map(function(St,Lt){return"coords."+ct[Lt+tt]}).join(", ");var mt="return outputValue;",ht=ce(ve.shapeInfo.logicalShape)===1,At=ce(Ee.logicalShape)===1;if(Ne!==1||ht||At){if(ht&&!At)mt=Ze===1?`
return vec4(outputValue.x, outputValue.x, 0., 0.);
`:`
return vec4(outputValue.x);
`;else if(Xe.length){var ft=Ne-2,xt=Ne-1;Xe.indexOf(ft)>-1&&Xe.indexOf(xt)>-1?mt="return vec4(outputValue.x);":Xe.indexOf(ft)>-1?mt="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":Xe.indexOf(xt)>-1&&(mt="return vec4(outputValue.xx, outputValue.zz);")}}else mt=`
return vec4(outputValue.xy, outputValue.xy);
`;return`
vec4 `+Me+`() {
`+qe+` coords = getOutputCoords();
`+Te+`
vec4 outputValue = get`+Le+"("+bt+`);
`+mt+`
}
`}(te,se):function(ve,Ee){var Te=ve.name,Fe=Te.charAt(0).toUpperCase()+Te.slice(1),Le="get"+Fe+"AtOutCoords",Me=Ee.texShape,Ne=ve.shapeInfo.texShape,Ze=ve.shapeInfo.logicalShape.length,Xe=Ee.logicalShape.length;if(!ve.shapeInfo.isUniform&&Ze===Xe&&ve.shapeInfo.flatOffset==null&&le(Ne,Me))return`
float `+Le+`() {
return sampleTexture(`+Te+`, resultUV);
}
`;var qe,tt=Jr(Xe),ct=Gi(ve.shapeInfo.logicalShape,Ee.logicalShape),bt=Xe-Ze,mt=["x","y","z","w","u","v"];qe=Ze===0?"":Xe<2&&ct.length>=1?"coords = 0;":ct.map(function(At){return"coords."+mt[At+bt]+" = 0;"}).join(`
`);var ht="";return ht=Xe<2&&Ze>0?"coords":ve.shapeInfo.logicalShape.map(function(At,ft){return"coords."+mt[ft+bt]}).join(", "),`
float `+Le+`() {
`+tt+` coords = getOutputCoords();
`+qe+`
return get`+Fe+"("+ht+`);
}
`}(te,se)),ue}(H,t,r)}).join(`
`),d=t.texShape,A=zn(),O=function(H){return`
float sampleTexture(sampler2D textureSampler, vec2 uv) {
return `+H.texture2D+`(textureSampler, uv).r;
}
`}(A),D=function(H){return H.version+`
precision highp float;
precision highp int;
precision highp sampler2D;
`+H.varyingFs+` vec2 resultUV;
`+H.defineOutput+`
const vec2 halfCR = vec2(0.5, 0.5);
struct ivec5
{
int x;
int y;
int z;
int w;
int u;
};
struct ivec6
{
int x;
int y;
int z;
int w;
int u;
int v;
};
uniform float NAN;
`+H.defineSpecialNaN+`
`+H.defineSpecialInf+`
`+H.defineRound+`
int imod(int x, int y) {
return x - y * (x / y);
}
int idiv(int a, int b, float sign) {
int res = a / b;
int mod = imod(a, b);
if (sign < 0. && mod != 0) {
res -= 1;
}
return res;
}
//Based on the work of Dave Hoskins
//https://www.shadertoy.com/view/4djSRW
#define HASHSCALE1 443.8975
float random(float seed){
vec2 p = resultUV * seed;
vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);
p3 += dot(p3, p3.yzx + 19.19);
return fract((p3.x + p3.y) * p3.z);
}
`+Ap+`
`+xp+`
`+Ep+`
`}(A);return t.isPacked?(o=function(H,te){switch(H.length){case 0:return`
int getOutputCoords() {
return 0;
}
`;case 1:return function(ve,Ee){var Te=[Math.ceil(Ee[0]/2),Math.ceil(Ee[1]/2)];return Te[0]===1?`
int getOutputCoords() {
return 2 * int(resultUV.x * `+Te[1]+`.0);
}
`:Te[1]===1?`
int getOutputCoords() {
return 2 * int(resultUV.y * `+Te[0]+`.0);
}
`:`
int getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+Te[0]+", "+Te[1]+`));
return 2 * (resTexRC.x * `+Te[1]+` + resTexRC.y);
}
`}(0,te);case 2:return function(ve,Ee){var Te=[Math.ceil(Ee[0]/2),Math.ceil(Ee[1]/2)];if(le(ve,Ee))return`
ivec2 getOutputCoords() {
return 2 * ivec2(resultUV.yx * vec2(`+Te[0]+", "+Te[1]+`));
}
`;var Fe=Math.ceil(ve[1]/2);return`
ivec2 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+Te[0]+", "+Te[1]+`));
int index = resTexRC.x * `+Te[1]+` + resTexRC.y;
int r = 2 * (index / `+Fe+`);
int c = imod(index, `+Fe+`) * 2;
return ivec2(r, c);
}
`}(H,te);case 3:return se=H,ae=te,ue=[Math.ceil(ae[0]/2),Math.ceil(ae[1]/2)],ye=Math.ceil(se[2]/2),we=ye*Math.ceil(se[1]/2),`
ivec3 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+ue[0]+", "+ue[1]+`));
int index = resTexRC.x * `+ue[1]+` + resTexRC.y;
int b = index / `+we+`;
index -= b * `+we+`;
int r = 2 * (index / `+ye+`);
int c = imod(index, `+ye+`) * 2;
return ivec3(b, r, c);
}
`;default:return function(ve,Ee){for(var Te=[Math.ceil(Ee[0]/2),Math.ceil(Ee[1]/2)],Fe=Math.ceil(ve[ve.length-1]/2),Le=Fe*Math.ceil(ve[ve.length-2]/2),Me=Le,Ne="",Ze="b, r, c",Xe=2;Xe<ve.length-1;Xe++)Me*=ve[ve.length-Xe-1],Ne=`
int b`+Xe+" = index / "+Me+`;
index -= b`+Xe+" * "+Me+`;
`+Ne,Ze="b"+Xe+", "+Ze;return`
ivec`+ve.length+` getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+Te[0]+", "+Te[1]+`));
int index = resTexRC.x * `+Te[1]+` + resTexRC.y;
`+Ne+`
int b = index / `+Le+`;
index -= b * `+Le+`;
int r = 2 * (index / `+Fe+`);
int c = imod(index, `+Fe+`) * 2;
return ivec`+ve.length+"("+Ze+`);
}
`}(H,te)}var se,ae,ue,ye,we}(t.logicalShape,d),s=function(H){return`
void setOutput(vec4 val) {
`+H.output+` = val;
}
`}(A)):(o=function(H,te){switch(H.length){case 0:return`
int getOutputCoords() {
return 0;
}
`;case 1:return function(ue,ye){return ye[0]===1?`
int getOutputCoords() {
return int(resultUV.x * `+ye[1]+`.0);
}
`:ye[1]===1?`
int getOutputCoords() {
return int(resultUV.y * `+ye[0]+`.0);
}
`:`
int getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+ye[0]+", "+ye[1]+`));
return resTexRC.x * `+ye[1]+` + resTexRC.y;
}
`}(0,te);case 2:return function(ue,ye){return le(ue,ye)?`
ivec2 getOutputCoords() {
return ivec2(resultUV.yx * vec2(`+ye[0]+", "+ye[1]+`));
}
`:ue[1]===1?`
ivec2 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+ye[0]+", "+ye[1]+`));
int index = resTexRC.x * `+ye[1]+` + resTexRC.y;
return ivec2(index, 0);
}
`:ue[0]===1?`
ivec2 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+ye[0]+", "+ye[1]+`));
int index = resTexRC.x * `+ye[1]+` + resTexRC.y;
return ivec2(0, index);
}
`:`
ivec2 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+ye[0]+", "+ye[1]+`));
int index = resTexRC.x * `+ye[1]+` + resTexRC.y;
int r = index / `+ue[1]+`;
int c = index - r * `+ue[1]+`;
return ivec2(r, c);
}
`}(H,te);case 3:return se=te,ae=Co(["r","c","d"],H),`
ivec3 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+se[0]+", "+se[1]+`));
int index = resTexRC.x * `+se[1]+` + resTexRC.y;
`+ae+`
return ivec3(r, c, d);
}
`;case 4:return function(ue,ye){var we=Co(["r","c","d","d2"],ue);return`
ivec4 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+ye[0]+", "+ye[1]+`));
int index = resTexRC.x * `+ye[1]+` + resTexRC.y;
`+we+`
return ivec4(r, c, d, d2);
}
`}(H,te);case 5:return function(ue,ye){var we=Co(["r","c","d","d2","d3"],ue);return`
ivec5 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx * vec2(`+ye[0]+`,
`+ye[1]+`));
int index = resTexRC.x * `+ye[1]+` + resTexRC.y;
`+we+`
ivec5 outShape = ivec5(r, c, d, d2, d3);
return outShape;
}
`}(H,te);case 6:return function(ue,ye){var we=Co(["r","c","d","d2","d3","d4"],ue);return`
ivec6 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+ye[0]+", "+ye[1]+`));
int index = resTexRC.x * `+ye[1]+` + resTexRC.y;
`+we+`
ivec6 result = ivec6(r, c, d, d2, d3, d4);
return result;
}
`}(H,te);default:throw new Error(H.length+"-D output sampling is not yet supported")}var se,ae}(t.logicalShape,d),s=function(H){return`
void setOutput(float val) {
`+H.output+` = vec4(val, 0, 0, 0);
}
`}(A)),r&&(D+=Cp),[D,O,s,u,o,l,e].join(`
`)}function Lo(n){var t=n.shapeInfo.logicalShape;switch(t.length){case 0:return function(e){var r=e.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1);if(e.shapeInfo.isUniform)return"float "+i+"() {return "+r+";}";var o=e.shapeInfo.texShape,s=o[0],u=o[1];if(s===1&&u===1)return`
float `+i+`() {
return sampleTexture(`+r+`, halfCR);
}
`;var l=e.shapeInfo.texShape,d=l[0],A=l[1],O=So(r);return`
float `+i+`() {
vec2 uv = uvFromFlat(`+d+", "+A+", "+O+`);
return sampleTexture(`+r+`, uv);
}
`}(n);case 1:return function(e){var r=e.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1);if(e.shapeInfo.isUniform)return`
float `+i+`(int index) {
`+Uo(e)+`
}
`;var o=e.shapeInfo.texShape,s=o[0],u=o[1];if(u===1&&s===1)return`
float `+i+`(int index) {
return sampleTexture(`+r+`, halfCR);
}
`;var l=So(r);return u===1?`
float `+i+`(int index) {
vec2 uv = vec2(0.5, (float(index + `+l+") + 0.5) / "+s+`.0);
return sampleTexture(`+r+`, uv);
}
`:s===1?`
float `+i+`(int index) {
vec2 uv = vec2((float(index + `+l+") + 0.5) / "+u+`.0, 0.5);
return sampleTexture(`+r+`, uv);
}
`:`
float `+i+`(int index) {
vec2 uv = uvFromFlat(`+s+", "+u+", index + "+l+`);
return sampleTexture(`+r+`, uv);
}
`}(n);case 2:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,o="get"+i.charAt(0).toUpperCase()+i.slice(1),s=e.shapeInfo.texShape;if(s!=null&&le(r,s)){var u=s[0],l=s[1];return`
float `+o+`(int row, int col) {
vec2 uv = (vec2(col, row) + halfCR) / vec2(`+l+".0, "+u+`.0);
return sampleTexture(`+i+`, uv);
}
`}var d=q(r),A=d.newShape,O=d.keptDims,D=A;if(D.length<r.length){var H=Wo(e,D);return`
`+Lo(H)+`
float `+o+`(int row, int col) {
return `+o+"("+zo(["row","col"],O)+`);
}
`}if(e.shapeInfo.isUniform)return`
float `+o+`(int row, int col) {
int index = round(dot(vec2(row, col), vec2(`+r[1]+`, 1)));
`+Uo(e)+`
}
`;var te=s[0],se=s[1],ae=So(i);return se===1?`
float `+o+`(int row, int col) {
float index = dot(vec3(row, col, `+ae+"), vec3("+r[1]+`, 1, 1));
vec2 uv = vec2(0.5, (index + 0.5) / `+te+`.0);
return sampleTexture(`+i+`, uv);
}
`:te===1?`
float `+o+`(int row, int col) {
float index = dot(vec3(row, col, `+ae+"), vec3("+r[1]+`, 1, 1));
vec2 uv = vec2((index + 0.5) / `+se+`.0, 0.5);
return sampleTexture(`+i+`, uv);
}
`:`
float `+o+`(int row, int col) {
// Explicitly use integer operations as dot() only works on floats.
int index = row * `+r[1]+" + col + "+ae+`;
vec2 uv = uvFromFlat(`+te+", "+se+`, index);
return sampleTexture(`+i+`, uv);
}
`}(n);case 3:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,o="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[1]*r[2],u=r[2],l=q(r),d=l.newShape,A=l.keptDims,O=d;if(O.length<r.length){var D=Wo(e,O);return`
`+Lo(D)+`
float `+o+`(int row, int col, int depth) {
return `+o+"("+zo(["row","col","depth"],A)+`);
}
`}if(e.shapeInfo.isUniform)return`
float `+o+`(int row, int col, int depth) {
int index = round(dot(vec3(row, col, depth),
vec3(`+s+", "+u+`, 1)));
`+Uo(e)+`
}
`;var H=e.shapeInfo.texShape,te=H[0],se=H[1],ae=e.shapeInfo.flatOffset;if(se===s&&ae==null)return`
float `+o+`(int row, int col, int depth) {
float texR = float(row);
float texC = dot(vec2(col, depth), vec2(`+u+`, 1));
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+se+".0, "+te+`.0);
return sampleTexture(`+i+`, uv);
}
`;if(se===u&&ae==null)return`
float `+o+`(int row, int col, int depth) {
float texR = dot(vec2(row, col), vec2(`+r[1]+`, 1));
float texC = float(depth);
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+se+".0, "+te+`.0);
return sampleTexture(`+i+`, uv);
}
`;var ue=So(i);return`
float `+o+`(int row, int col, int depth) {
// Explicitly use integer operations as dot() only works on floats.
int index = row * `+s+" + col * "+u+" + depth + "+ue+`;
vec2 uv = uvFromFlat(`+te+", "+se+`, index);
return sampleTexture(`+i+`, uv);
}
`}(n);case 4:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,o="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[3],u=r[2]*s,l=r[1]*u,d=q(r),A=d.newShape,O=d.keptDims;if(A.length<r.length){var D=Wo(e,A);return`
`+Lo(D)+`
float `+o+`(int row, int col, int depth, int depth2) {
return `+o+"("+zo(["row","col","depth","depth2"],O)+`);
}
`}if(e.shapeInfo.isUniform)return`
float `+o+`(int row, int col, int depth, int depth2) {
int index = round(dot(vec4(row, col, depth, depth2),
vec4(`+l+", "+u+", "+s+`, 1)));
`+Uo(e)+`
}
`;var H=e.shapeInfo.flatOffset,te=e.shapeInfo.texShape,se=te[0],ae=te[1];if(ae===l&&H==null)return`
float `+o+`(int row, int col, int depth, int depth2) {
float texR = float(row);
float texC =
dot(vec3(col, depth, depth2),
vec3(`+u+", "+s+`, 1));
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+ae+".0, "+se+`.0);
return sampleTexture(`+i+`, uv);
}
`;if(ae===s&&H==null)return`
float `+o+`(int row, int col, int depth, int depth2) {
float texR = dot(vec3(row, col, depth),
vec3(`+r[1]*r[2]+", "+r[2]+`, 1));
float texC = float(depth2);
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+ae+".0, "+se+`.0);
return sampleTexture(`+i+`, uv);
}
`;var ue=So(i);return`
float `+o+`(int row, int col, int depth, int depth2) {
// Explicitly use integer operations as dot() only works on floats.
int index = row * `+l+" + col * "+u+` +
depth * `+s+` + depth2;
vec2 uv = uvFromFlat(`+se+", "+ae+", index + "+ue+`);
return sampleTexture(`+i+`, uv);
}
`}(n);case 5:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,o="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[4],u=r[3]*s,l=r[2]*u,d=r[1]*l,A=q(r),O=A.newShape,D=A.keptDims;if(O.length<r.length){var H=Wo(e,O);return`
`+Lo(H)+`
float `+o+`(int row, int col, int depth, int depth2, int depth3) {
return `+o+"("+zo(["row","col","depth","depth2","depth3"],D)+`);
}
`}if(e.shapeInfo.isUniform)return`
float `+o+`(int row, int col, int depth, int depth2, int depth3) {
float index = dot(
vec4(row, col, depth, depth2),
vec4(`+d+", "+l+", "+u+", "+s+`)) +
depth3;
`+Uo(e)+`
}
`;var te=e.shapeInfo.flatOffset,se=e.shapeInfo.texShape,ae=se[0],ue=se[1];if(ue===d&&te==null)return`
float `+o+`(int row, int col, int depth, int depth2, int depth3) {
int texR = row;
float texC = dot(vec4(col, depth, depth2, depth3),
vec4(`+l+", "+u+", "+s+`, 1));
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+ue+".0, "+ae+`.0);
return sampleTexture(`+i+`, uv);
}
`;if(ue===s&&te==null)return`
float `+o+`(int row, int col, int depth, int depth2, int depth3) {
float texR = dot(
vec4(row, col, depth, depth2),
vec4(`+r[1]*r[2]*r[3]+`,
`+r[2]*r[3]+", "+r[3]+`, 1));
int texC = depth3;
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+ue+".0, "+ae+`.0);
return sampleTexture(`+i+`, uv);
}
`;var ye=So(i);return`
float `+o+`(int row, int col, int depth, int depth2, int depth3) {
// Explicitly use integer operations as dot() only works on floats.
int index = row * `+d+" + col * "+l+" + depth * "+u+` +
depth2 * `+s+" + depth3 + "+ye+`;
vec2 uv = uvFromFlat(`+ae+", "+ue+`, index);
return sampleTexture(`+i+`, uv);
}
`}(n);case 6:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,o="get"+i.charAt(0).toUpperCase()+i.slice(1),s=q(r),u=s.newShape,l=s.keptDims;if(u.length<r.length){var d=Wo(e,u);return`
`+Lo(d)+`
float `+o+`(int row, int col, int depth,
int depth2, int depth3, int depth4) {
return `+o+"("+zo(["row","col","depth","depth2","depth3","depth4"],l)+`);
}
`}var A=r[5],O=r[4]*A,D=r[3]*O,H=r[2]*D,te=r[1]*H;if(e.shapeInfo.isUniform)return`
float `+o+`(int row, int col, int depth,
int depth2, int depth3, int depth4) {
int index = round(dot(
vec4(row, col, depth, depth2),
vec4(`+te+", "+H+", "+D+", "+O+`)) +
dot(
vec2(depth3, depth4),
vec2(`+A+`, 1)));
`+Uo(e)+`
}
`;var se=e.shapeInfo.flatOffset,ae=e.shapeInfo.texShape,ue=ae[0],ye=ae[1];if(ye===te&&se==null)return`
float `+o+`(int row, int col, int depth,
int depth2, int depth3, int depth4) {
int texR = row;
float texC = dot(vec4(col, depth, depth2, depth3),
vec4(`+H+", "+D+", "+O+", "+A+`)) +
float(depth4);
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+ye+".0, "+ue+`.0);
return sampleTexture(`+i+`, uv);
}
`;if(ye===A&&se==null)return`
float `+o+`(int row, int col, int depth,
int depth2, int depth3, int depth4) {
float texR = dot(vec4(row, col, depth, depth2),
vec4(`+r[1]*r[2]*r[3]*r[4]+`,
`+r[2]*r[3]*r[4]+`,
`+r[3]*r[4]+`,
`+r[4]+`)) + float(depth3);
int texC = depth4;
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+ye+".0, "+ue+`.0);
return sampleTexture(`+i+`, uv);
}
`;var we=So(i);return`
float `+o+`(int row, int col, int depth,
int depth2, int depth3, int depth4) {
// Explicitly use integer operations as dot() only works on floats.
int index = row * `+te+" + col * "+H+" + depth * "+D+` +
depth2 * `+O+" + depth3 * "+A+" + depth4 + "+we+`;
vec2 uv = uvFromFlat(`+ue+", "+ye+`, index);
return sampleTexture(`+i+`, uv);
}
`}(n);default:throw new Error(t.length+"-D input sampling is not yet supported")}}function Pl(n){var t,e,r;switch(n.shapeInfo.logicalShape.length){case 0:return t=n.name,e="get"+t.charAt(0).toUpperCase()+t.slice(1),r=zn(),`
vec4 `+e+`() {
return `+r.texture2D+"("+t+`, halfCR);
}
`;case 1:return function(i){var o=i.name,s="get"+o.charAt(0).toUpperCase()+o.slice(1),u=i.shapeInfo.texShape,l=[Math.ceil(u[0]/2),Math.ceil(u[1]/2)],d=zn();return`
vec4 `+s+`(int index) {
vec2 uv = packedUVfrom1D(
`+l[0]+", "+l[1]+`, index);
return `+d.texture2D+"("+o+`, uv);
}
`}(n);case 2:return function(i){var o=i.shapeInfo.logicalShape,s=i.name,u="get"+s.charAt(0).toUpperCase()+s.slice(1),l=i.shapeInfo.texShape,d=l[0],A=l[1],O=zn();if(l!=null&&le(o,l))return`
vec4 `+u+`(int row, int col) {
vec2 uv = (vec2(col, row) + halfCR) / vec2(`+A+".0, "+d+`.0);
return `+O.texture2D+"("+s+`, uv);
}
`;var D=[Math.ceil(l[0]/2),Math.ceil(l[1]/2)],H=Math.ceil(o[1]/2);return`
vec4 `+u+`(int row, int col) {
vec2 uv = packedUVfrom2D(`+H+", "+D[0]+", "+D[1]+`, row, col);
return `+O.texture2D+"("+s+`, uv);
}
`}(n);case 3:return function(i){var o=i.shapeInfo.logicalShape,s=i.name,u="get"+s.charAt(0).toUpperCase()+s.slice(1),l=i.shapeInfo.texShape,d=[Math.ceil(l[0]/2),Math.ceil(l[1]/2)];if(o[0]===1){var A=o.slice(1),O=Wo(i,A);return`
`+Pl(O)+`
vec4 `+u+`(int b, int row, int col) {
return `+u+"("+zo(["b","row","col"],[1,2])+`);
}
`}var D=d[0],H=d[1],te=Math.ceil(o[2]/2),se=te*Math.ceil(o[1]/2),ae=zn();return`
vec4 `+u+`(int b, int row, int col) {
vec2 uv = packedUVfrom3D(
`+D+", "+H+", "+se+", "+te+`, b, row, col);
return `+ae.texture2D+"("+s+`, uv);
}
`}(n);default:return function(i){for(var o=i.shapeInfo.logicalShape,s=o.length,u=i.name,l="get"+u.charAt(0).toUpperCase()+u.slice(1),d=i.shapeInfo.texShape,A=[Math.ceil(d[0]/2),Math.ceil(d[1]/2)],O=A[0],D=A[1],H=Math.ceil(o[s-1]/2),te=H*Math.ceil(o[s-2]/2),se="int b, int row, int col",ae="b * "+te+" + (row / 2) * "+H+" + (col / 2)",ue=2;ue<s-1;ue++)se="int b"+ue+", "+se,te*=o[s-ue-1],ae="b"+ue+" * "+te+" + "+ae;var ye=zn();return`
vec4 `+l+"("+se+`) {
int index = `+ae+`;
int texR = index / `+D+`;
int texC = index - texR * `+D+`;
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+D+", "+O+`);
return `+ye.texture2D+"("+u+`, uv);
}
`}(n)}}var Ap=`
vec2 uvFromFlat(int texNumR, int texNumC, int index) {
int texR = index / texNumC;
int texC = index - texR * texNumC;
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
}
vec2 packedUVfrom1D(int texNumR, int texNumC, int index) {
int texelIndex = index / 2;
int texR = texelIndex / texNumC;
int texC = texelIndex - texR * texNumC;
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
}
`,xp=`
vec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,
int texNumC, int row, int col) {
int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);
int texR = texelIndex / texNumC;
int texC = texelIndex - texR * texNumC;
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
}
`,Ep=`
vec2 packedUVfrom3D(int texNumR, int texNumC,
int texelsInBatch, int texelsInLogicalRow, int b,
int row, int col) {
int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);
int texR = index / texNumC;
int texC = index - texR * texNumC;
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
}
`,Cp=`
float getChannel(vec4 frag, vec2 innerDims) {
vec2 modCoord = mod(innerDims, 2.);
return modCoord.x == 0. ?
(modCoord.y == 0. ? frag.r : frag.g) :
(modCoord.y == 0. ? frag.b : frag.a);
}
float getChannel(vec4 frag, int dim) {
float modCoord = mod(float(dim), 2.);
return modCoord == 0. ? frag.r : frag.g;
}
`;function So(n){return"offset"+n}function Uo(n){var t=n.name,e=ce(n.shapeInfo.logicalShape);return e<2?"return "+t+";":`
for (int i = 0; i < `+e+`; i++) {
if (i == index) {
return `+t+`[i];
}
}
`}function Jr(n){if(n<=1)return"int";if(n===2)return"ivec2";if(n===3)return"ivec3";if(n===4)return"ivec4";if(n===5)return"ivec5";if(n===6)return"ivec6";throw Error("GPU for rank "+n+" is not yet supported")}function Wo(n,t){var e=JSON.parse(JSON.stringify(n));return e.shapeInfo.logicalShape=t,e}function zo(n,t){return t.map(function(e){return n[e]}).join(", ")}var Sp=function(n,t,e,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,ee(n.length>2,function(){return"Packed arg"+(e.charAt(0).toUpperCase()+e.slice(1))+" supports only inputs with rank above 2."});var i=n[n.length-1],o=Math.ceil(i/t);this.outputShape=n.slice(0,-1),o>1&&this.outputShape.push(o),r||this.variableNames.push("bestIndicesA");var s,u,l=this.outputShape,d=l.length,A=Jr(d),O=ti("coords",d);if(o===1){var D=Jr(u=d+1);s=`
`+D+" sourceLocR = "+D+"("+O.join()+`, 0);
++`+O[d-1]+`;
`+D+" sourceLocG = "+D+"("+O.join()+`, 0);
++`+O[d-2]+`;
`+D+" sourceLocA = "+D+"("+O.join()+`, 0);
--`+O[d-1]+`;
`+D+" sourceLocB = "+D+"("+O.join()+`, 0);
--`+O[d-2]+";"}else u=d,s=`
`+A+` sourceLocR = coords;
++`+O[d-1]+`;
`+A+` sourceLocG = coords;
++`+O[d-2]+`;
`+A+` sourceLocA = coords;
--`+O[d-1]+`;
`+A+` sourceLocB = coords;
--`+O[d-2]+";";var H=["x","y","z","w","u","v"].slice(0,u),te="."+H[u-1],se=H.map(function(Le){return"int "+Le}),ae=ti("sourceLocR",u-1).concat("inIdx.r"),ue=ti("sourceLocG",u-1).concat("inIdx.g"),ye=ti("sourceLocB",u-1).concat("inIdx.b"),we=ti("sourceLocA",u-1).concat("inIdx.a"),ve=e==="max"?"greaterThan":"lessThan",Ee=r?"":`
inIdx = round(vec4(getBestIndicesAChannel(`+ae.join()+`),
getBestIndicesAChannel(`+ue.join()+`),
getBestIndicesAChannel(`+ye.join()+`),
getBestIndicesAChannel(`+we.join()+")));",Te=`vec4(
getAChannel(`+ae.join()+`),
hasNextCol ? getAChannel(`+ue.join()+`) : 0.,
hasNextRow ? getAChannel(`+ye.join()+`) : 0.,
hasNextRow && hasNextCol ? getAChannel(`+we.join()+") : 0.)",Fe=r?"":`
float getBestIndicesAChannel(`+se.join()+`) {
return getChannel(getBestIndicesA(`+H.join()+`),
vec2(`+H.slice(-2).join()+`));
}`;this.userCode=`
float getAChannel(`+se.join()+`) {
return getChannel(getA(`+H.join()+`),
vec2(`+H.slice(-2).join()+`));
}
`+Fe+`
void main() {
`+A+` coords = getOutputCoords();
bool hasNextCol = `+O[d-1]+" < "+(l[d-1]-1)+`;
bool hasNextRow = `+O[d-2]+" < "+(l[d-2]-1)+`;
`+s+`
ivec4 srcIdx = ivec4(sourceLocR`+te+", sourceLocG"+te+`,
sourceLocB`+te+", sourceLocA"+te+") * "+t+`;
ivec4 inIdx = srcIdx;
vec4 bestIndex = vec4(inIdx);
vec4 bestValue = `+Te+`;
for (int i = 0; i < `+t+`; i++) {
inIdx = srcIdx;
`+Ee+`
vec4 candidate = `+Te+`;
bvec4 nan = isnan(candidate);
bvec4 replace = bvec4(
vec4(`+ve+`(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));
bestValue = vec4(replace.x ? candidate.x : bestValue.x,
replace.y ? candidate.y : bestValue.y,
replace.z ? candidate.z : bestValue.z,
replace.w ? candidate.w : bestValue.w);
bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));
srcIdx++;
}
setOutput(bestIndex);
}
`},Ip=function(n){this.variableNames=["dy"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,o=n.dilationHeight,s=n.dilationWidth,u=n.effectiveFilterHeight,l=n.effectiveFilterWidth,d=u-1-n.padInfo.top,A=l-1-n.padInfo.left,O=1/(t*e);this.userCode=`
const ivec2 pads = ivec2(`+d+", "+A+`);
const float avgMultiplier = float(`+O+`);
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
ivec2 dyRCCorner = coords.yz - pads;
int dyRCorner = dyRCCorner.x;
int dyCCorner = dyRCCorner.y;
// Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wR = 0; wR < `+u+`;
wR += `+o+`) {
float dyR = float(dyRCorner + wR) / `+r+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
for (int wC = 0; wC < `+l+`;
wC+= `+s+`) {
float dyC = float(dyCCorner + wC) / `+i+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
float dyValue = getDy(b, idyR, idyC, d);
dotProd += dyValue * avgMultiplier;
}
}
setOutput(dotProd);
}
`},Tp=function(n){this.variableNames=["dy"],this.outputShape=n.inShape;var t=n.filterDepth,e=n.filterHeight,r=n.filterWidth,i=n.strideDepth,o=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,d=n.dilationWidth,A=n.effectiveFilterDepth,O=n.effectiveFilterHeight,D=n.effectiveFilterWidth,H=A-1-n.padInfo.front,te=O-1-n.padInfo.top,se=D-1-n.padInfo.left,ae=1/(t*e*r);this.userCode=`
const ivec3 pads = ivec3(`+H+", "+te+", "+se+`);
const float avgMultiplier = float(`+ae+`);
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int ch = coords.u;
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
int dyDCorner = dyCorner.x;
int dyRCorner = dyCorner.y;
int dyCCorner = dyCorner.z;
// Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get
// dx(xD, xR, xC, ch).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wD = 0; wD < `+A+`;
wD += `+u+`) {
float dyD = float(dyDCorner + wD) / `+i+`.0;
if (dyD < 0.0 || dyD >= `+n.outDepth+`.0 || fract(dyD) > 0.0) {
continue;
}
int idyD = int(dyD);
for (int wR = 0; wR < `+O+`;
wR += `+l+`) {
float dyR = float(dyRCorner + wR) / `+o+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
for (int wC = 0; wC < `+D+`;
wC += `+d+`) {
float dyC = float(dyCCorner + wC) / `+s+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
float dyValue = getDy(batch, idyD, idyR, idyC, ch);
dotProd += dyValue * avgMultiplier;
}
}
}
setOutput(dotProd);
}
`},Rp=function(n,t,e,r,i,o){this.outputShape=[],this.variableNames=["x","mean","variance"],fr(n,t),fr(n,e);var s="0.0";r!=null&&(fr(n,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");var u="1.0";i!=null&&(fr(n,i),this.variableNames.push("scale"),u="getScaleAtOutCoords()"),this.outputShape=n,this.userCode=`
void main() {
float x = getXAtOutCoords();
float mean = getMeanAtOutCoords();
float variance = getVarianceAtOutCoords();
float offset = `+s+`;
float scale = `+u+`;
float inv = scale * inversesqrt(variance + float(`+o+`));
setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));
}
`},Op=function(n,t,e,r,i,o){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],fr(n,t),fr(n,e);var s="vec4(0.0)";r!=null&&(fr(n,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");var u="vec4(1.0)";i!=null&&(fr(n,i),this.variableNames.push("scale"),u="getScaleAtOutCoords()"),this.outputShape=n,this.userCode=`
void main() {
vec4 offset = `+s+`;
vec4 scale = `+u+`;
vec4 x = getXAtOutCoords();
vec4 mean = getMeanAtOutCoords();
vec4 variance = getVarianceAtOutCoords();
vec4 inv = scale * inversesqrt(variance + vec4(`+o+`));
setOutput((x - mean) * inv + offset);
}
`},kp="return areal * breal - aimag * bimag;",jp="return areal * bimag + aimag * breal;",Bl=function(n,t,e){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=fr(t,e),this.userCode=`
float binaryOpComplex(
float areal, float aimag, float breal, float bimag) {
`+n+`
}
void main() {
float areal = getARealAtOutCoords();
float aimag = getAImagAtOutCoords();
float breal = getBRealAtOutCoords();
float bimag = getBImagAtOutCoords();
setOutput(binaryOpComplex(areal, aimag, breal, bimag));
}
`},Ds="return a + b;",Ps="return a - b;",Ml="return a * b;",Nl="return (a < 0.) ? b * a : a;",vn=function(n,t,e){this.variableNames=["A","B"],this.outputShape=fr(t,e),this.userCode=`
float binaryOperation(float a, float b) {
`+n+`
}
void main() {
float a = getAAtOutCoords();
float b = getBAtOutCoords();
setOutput(binaryOperation(a, b));
}
`},_l=`
vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));
return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);
`,Qi=function(n,t,e,r){r===void 0&&(r=!1),this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=fr(t,e);var i=this.outputShape.length,o="";if(r)if(i===0||ce(this.outputShape)===1)o=`
result.y = 0.;
result.z = 0.;
result.w = 0.;
`;else if(o=`
`+Jr(i)+` coords = getOutputCoords();
`,i===1)o+=`
result.y = (coords + 1) >= `+this.outputShape[0]+` ? 0. : result.y;
result.z = 0.;
result.w = 0.;
`;else{var s=ti("coords",i);o+=`
bool nextRowOutOfBounds =
(`+s[i-2]+" + 1) >= "+this.outputShape[i-2]+`;
bool nextColOutOfBounds =
(`+s[i-1]+" + 1) >= "+this.outputShape[i-1]+`;
result.y = nextColOutOfBounds ? 0. : result.y;
result.z = nextRowOutOfBounds ? 0. : result.z;
result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;
`}this.userCode=`
vec4 binaryOperation(vec4 a, vec4 b) {
`+n+`
}
void main() {
vec4 a = getAAtOutCoords();
vec4 b = getBAtOutCoords();
vec4 result = binaryOperation(a, b);
`+o+`
setOutput(result);
}
`},Dp=function(){function n(t){this.variableNames=["A"],this.outputShape=t,this.userCode=`
uniform float minVal;
uniform float maxVal;
void main() {
float value = getAAtOutCoords();
if (isnan(value)) {
setOutput(value);
return;
}
setOutput(clamp(value, minVal, maxVal));
}
`}return n.prototype.getCustomSetupFunc=function(t,e){var r=this;return function(i,o){r.minLoc==null&&(r.minLoc=i.getUniformLocationNoThrow(o,"minVal"),r.maxLoc=i.getUniformLocationNoThrow(o,"maxVal")),i.gl.uniform1f(r.minLoc,t),i.gl.uniform1f(r.maxLoc,e)}},n}(),Pp=function(){function n(t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.userCode=`
uniform float minVal;
uniform float maxVal;
void main() {
vec4 value = getAAtOutCoords();
if (any(isnan(value))) {
setOutput(value);
return;
}
setOutput(clamp(value, vec4(minVal), vec4(maxVal)));
}
`}return n.prototype.getCustomSetupFunc=function(t,e){var r=this;return function(i,o){r.minLoc==null&&(r.minLoc=i.getUniformLocationNoThrow(o,"minVal"),r.maxLoc=i.getUniformLocationNoThrow(o,"maxVal")),i.gl.uniform1f(r.minLoc,t),i.gl.uniform1f(r.maxLoc,e)}},n}(),Bp=function(n){this.variableNames=["real","imag"],this.outputShape=n,this.userCode=`
void main() {
float re = abs(getRealAtOutCoords());
float im = abs(getImagAtOutCoords());
float mx = max(re, im);
// sadly the length function in glsl is not underflow-safe
// (at least not on Intel GPUs). So the safe solution is
// to ensure underflow-safety in all cases.
setOutput(
mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))
);
}
`},Mp=function(n){this.outputShape=[],this.outputShape=mi(n,1),this.variableNames=n.map(function(u,l){return"T"+l});var t=new Array(n.length-1);t[0]=n[0][1];for(var e=1;e<t.length;e++)t[e]=t[e-1]+n[e][1];var r=["if (yC < "+t[0]+") setOutput(getT0(yR, yC));"];for(e=1;e<t.length;e++){var i=t[e-1];r.push("else if (yC < "+t[e]+") setOutput(getT"+e+"(yR, yC-"+i+"));")}var o=t.length,s=t[t.length-1];r.push("else setOutput(getT"+o+"(yR, yC-"+s+"));"),this.userCode=`
void main() {
ivec2 coords = getOutputCoords();
int yR = coords.x;
int yC = coords.y;
`+r.join(`
`)+`
}
`},Np=function(n,t){this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[],this.outputShape=mi(n,t);var e=this.outputShape,r=e.length,i=Jr(r),o=ti("coords",r),s=["x","y","z","w","u","v"].slice(0,r);this.variableNames=n.map(function(ae,ue){return"T"+ue});var u=new Array(n.length-1);u[0]=n[0][t];for(var l=1;l<u.length;l++)u[l]=u[l-1]+n[l][t];var d=s[t],A=s.slice(-2),O=s.join(),D="if ("+d+" < "+u[0]+`) {
return getChannel(
getT0(`+O+"), vec2("+A.join()+`));
}`;for(l=1;l<u.length;l++){var H=u[l-1];D+=`
if (`+d+" < "+u[l]+" && "+d+" >= "+u[l-1]+`) {
return getChannel(
getT`+l+"("+Ma(s,d,H)+`),
vec2(`+Ma(A,d,H)+`));
}`}var te=u.length,se=u[u.length-1];D+=`
return getChannel(
getT`+te+"("+Ma(s,d,se)+`),
vec2(`+Ma(A,d,se)+"));",this.userCode=`
float getValue(`+s.map(function(ae){return"int "+ae})+`) {
`+D+`
}
void main() {
`+i+` coords = getOutputCoords();
vec4 result = vec4(getValue(`+o+`), 0., 0., 0.);
`+o[r-1]+" = "+o[r-1]+` + 1;
if (`+o[r-1]+" < "+e[r-1]+`) {
result.g = getValue(`+o+`);
}
`+o[r-2]+" = "+o[r-2]+` + 1;
if (`+o[r-2]+" < "+e[r-2]+`) {
result.a = getValue(`+o+`);
}
`+o[r-1]+" = "+o[r-1]+` - 1;
if (`+o[r-2]+" < "+e[r-2]+` &&
`+o[r-1]+" < "+e[r-1]+`) {
result.b = getValue(`+o+`);
}
setOutput(result);
}
`};function Ma(n,t,e){var r=n.indexOf(t);return n.map(function(i,o){return o===r?i+" - "+e:i}).join()}var _p=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideHeight,e=n.strideWidth,r=n.padInfo.top,i=n.padInfo.left,o=n.dataFormat==="channelsLast";this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int wR = coords.x;
int wC = coords.y;
int d1 = coords.z;
int d2 = coords.w;
// Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int b = 0; b < `+n.batchSize+`; b++) {
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
int xR = wR + yR * `+t+" - "+r+`;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
int xC = wC + yC * `+e+" - "+i+`;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
if (`+o+`) {
float dyValue = getDy(b, yR, yC, d2);
float xValue = getX(b, xR, xC, d1);
dotProd += (xValue * dyValue);
} else {
float dyValue = getDy(b, d2, yR, yC);
float xValue = getX(b, d1, xR, xC);
dotProd += (xValue * dyValue);
}
}
}
}
setOutput(dotProd);
}
`},Fp=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,o=n.dataFormat==="channelsLast",s=t-1-n.padInfo.top,u=e-1-n.padInfo.left,l=o?1:2,d=o?2:3,A=o?3:1;this.userCode=`
const ivec2 pads = ivec2(`+s+", "+u+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords[0];
int d1 = coords[`+A+`];
ivec2 dyCorner = ivec2(coords[`+l+"], coords["+d+`]) - pads;
int dyRCorner = dyCorner.x;
int dyCCorner = dyCorner.y;
// Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wR = 0; wR < `+t+`; wR++) {
float dyR = float(dyRCorner + wR) / `+r+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
int wRPerm = `+t+` - 1 - wR;
for (int wC = 0; wC < `+e+`; wC++) {
float dyC = float(dyCCorner + wC) / `+i+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
int wCPerm = `+e+` - 1 - wC;
for (int d2 = 0; d2 < `+n.outChannels+`; d2++) {
if (`+o+`) {
float xValue = getDy(batch, idyR, idyC, d2);
float wValue = getW(wRPerm, wCPerm, d1, d2);
dotProd += xValue * wValue;
} else {
float xValue = getDy(batch, d2, idyR, idyC);
float wValue = getW(wRPerm, wCPerm, d1, d2);
dotProd += xValue * wValue;
}
}
}
}
setOutput(dotProd);
}
`},Lp=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideDepth,e=n.strideHeight,r=n.strideWidth,i=n.padInfo.front,o=n.padInfo.top,s=n.padInfo.left;this.userCode=`
void main() {
ivec5 coords = getOutputCoords();
int wF = coords.x;
int wR = coords.y;
int wC = coords.z;
int d1 = coords.w;
int d2 = coords.u;
float dotProd = 0.0;
for (int b = 0; b < `+n.batchSize+`; b++) {
for (int yF = 0; yF < `+n.outDepth+`; yF++) {
int xF = wF + yF * `+t+" - "+i+`;
if (xF < 0 || xF >= `+n.inDepth+`) {
continue;
}
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
int xR = wR + yR * `+e+" - "+o+`;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
int xC = wC + yC * `+r+" - "+s+`;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
float dyValue = getDy(b, yF, yR, yC, d2);
float xValue = getX(b, xF, xR, xC, d1);
dotProd += (xValue * dyValue);
}
}
}
}
setOutput(dotProd);
}
`},Up=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterDepth,e=n.filterHeight,r=n.filterWidth,i=n.strideDepth,o=n.strideHeight,s=n.strideWidth,u=t-1-n.padInfo.front,l=e-1-n.padInfo.top,d=r-1-n.padInfo.left;this.userCode=`
const ivec3 pads = ivec3(`+u+", "+l+", "+d+`);
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int d1 = coords.u;
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
int dyFCorner = dyCorner.x;
int dyRCorner = dyCorner.y;
int dyCCorner = dyCorner.z;
float dotProd = 0.0;
for (int wF = 0; wF < `+t+`; wF++) {
float dyF = float(dyFCorner + wF) / `+i+`.0;
if (dyF < 0.0 || dyF >= `+n.outDepth+`.0 || fract(dyF) > 0.0) {
continue;
}
int idyF = int(dyF);
int wFPerm = `+t+` - 1 - wF;
for (int wR = 0; wR < `+e+`; wR++) {
float dyR = float(dyRCorner + wR) / `+o+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
int wRPerm = `+e+` - 1 - wR;
for (int wC = 0; wC < `+r+`; wC++) {
float dyC = float(dyCCorner + wC) / `+s+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
int wCPerm = `+r+` - 1 - wC;
for (int d2 = 0; d2 < `+n.outChannels+`; d2++) {
float xValue = getDy(batch, idyF, idyR, idyC, d2);
float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);
dotProd += xValue * wValue;
}
}
}
}
setOutput(dotProd);
}
`},Wp=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideHeight,e=n.strideWidth,r=n.padInfo.top,i=n.padInfo.left,o=n.outChannels/n.inChannels;this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int wR = coords.x;
int wC = coords.y;
int d1 = coords.z;
int dm = coords.w;
int d2 = d1 * `+o+` + dm;
float dotProd = 0.0;
// TO DO: Vec4 over the batch size
for (int b = 0; b < `+n.batchSize+`; b++) {
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
int xR = wR + yR * `+t+" - "+r+`;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
int xC = wC + yC * `+e+" - "+i+`;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
float dyValue = getDy(b, yR, yC, d2);
float xValue = getX(b, xR, xC, d1);
dotProd += (xValue * dyValue);
}
}
}
setOutput(dotProd);
}
`},zp=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,o=t-1-n.padInfo.top,s=e-1-n.padInfo.left,u=n.outChannels/n.inChannels;this.userCode=`
const ivec2 pads = ivec2(`+o+", "+s+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords[0];
int d1 = coords[3];
ivec2 dyCorner = coords.yz - pads;
int dyRCorner = dyCorner.x;
int dyCCorner = dyCorner.y;
float dotProd = 0.0;
for (int wR = 0; wR < `+t+`; wR++) {
float dyR = float(dyRCorner + wR) / `+r+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
int wRPerm = `+t+` - 1 - wR;
for (int wC = 0; wC < `+e+`; wC++) {
float dyC = float(dyCCorner + wC) / `+i+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
int wCPerm = `+e+` - 1 - wC;
// TO DO: Vec4 over the channelMul
for (int dm = 0; dm < `+u+`; dm++) {
int d2 = d1 * `+u+` + dm;
float xValue = getDy(batch, idyR, idyC, d2);
float wValue = getW(wRPerm, wCPerm, d1, dm);
dotProd += xValue * wValue;
}
}
}
setOutput(dotProd);
}
`},Fl=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.outputShape=n.outShape;var i=n.padInfo.top,o=n.padInfo.left,s=n.strideHeight,u=n.strideWidth,l=n.dilationHeight,d=n.dilationWidth,A=n.filterHeight,O=n.filterWidth,D=4*Math.floor(n.inChannels/4),H=n.inChannels%4,te=n.dataFormat==="channelsLast",se=te?1:2,ae=te?2:3,ue=te?3:1,ye="",we="";e&&(ye=r?`float activation(float a) {
float b = getPreluActivationWeightsAtOutCoords();
`+e+`
}`:`
float activation(float x) {
`+e+`
}
`,we="result = activation(result);");var ve=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
`+ye+`
const ivec2 strides = ivec2(`+s+", "+u+`);
const ivec2 pads = ivec2(`+i+", "+o+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords[0];
int d2 = coords[`+ue+`];
ivec2 xRCCorner =
ivec2(coords[`+se+"], coords["+ae+`]) * strides - pads;
int xRCorner = xRCCorner.x;
int xCCorner = xRCCorner.y;
// Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wR = 0; wR < `+A+`; wR++) {
int xR = xRCorner + wR * `+l+`;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+O+`; wC++) {
int xC = xCCorner + wC * `+d+`;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
for (int d1 = 0; d1 < `+D+`; d1 += 4) {
vec4 wValues = vec4(
getW(wR, wC, d1, d2),
getW(wR, wC, d1 + 1, d2),
getW(wR, wC, d1 + 2, d2),
getW(wR, wC, d1 + 3, d2)
);
if (`+te+`) {
vec4 xValues = vec4(
getX(batch, xR, xC, d1),
getX(batch, xR, xC, d1 + 1),
getX(batch, xR, xC, d1 + 2),
getX(batch, xR, xC, d1 + 3)
);
dotProd += dot(xValues, wValues);
} else {
vec4 xValues = vec4(
getX(batch, d1, xR, xC),
getX(batch, d1 + 1, xR, xC),
getX(batch, d1 + 2, xR, xC),
getX(batch, d1 + 3, xR, xC)
);
dotProd += dot(xValues, wValues);
}
}
if (`+(H===1)+`) {
if (`+te+`) {
dotProd +=
getX(batch, xR, xC, `+D+`) *
getW(wR, wC, `+D+`, d2);
} else {
dotProd +=
getX(batch, `+D+`, xR, xC) *
getW(wR, wC, `+D+`, d2);
}
} else if (`+(H===2)+`) {
vec2 wValues = vec2(
getW(wR, wC, `+D+`, d2),
getW(wR, wC, `+D+` + 1, d2)
);
if (`+te+`) {
vec2 xValues = vec2(
getX(batch, xR, xC, `+D+`),
getX(batch, xR, xC, `+D+` + 1)
);
dotProd += dot(xValues, wValues);
} else {
vec2 xValues = vec2(
getX(batch, `+D+`, xR, xC),
getX(batch, `+D+` + 1, xR, xC)
);
dotProd += dot(xValues, wValues);
}
} else if (`+(H===3)+`) {
vec3 wValues = vec3(
getW(wR, wC, `+D+`, d2),
getW(wR, wC, `+D+` + 1, d2),
getW(wR, wC, `+D+` + 2, d2)
);
if (`+te+`) {
vec3 xValues = vec3(
getX(batch, xR, xC, `+D+`),
getX(batch, xR, xC, `+D+` + 1),
getX(batch, xR, xC, `+D+` + 2)
);
dotProd += dot(xValues, wValues);
} else {
vec3 xValues = vec3(
getX(batch, `+D+`, xR, xC),
getX(batch, `+D+` + 1, xR, xC),
getX(batch, `+D+` + 2, xR, xC)
);
dotProd += dot(xValues, wValues);
}
}
}
}
float result = dotProd;
`+ve+`
`+we+`
setOutput(result);
}
`},Hp=function(n){this.variableNames=["x","W"],this.outputShape=n.outShape;var t=n.padInfo.front,e=n.padInfo.top,r=n.padInfo.left,i=n.strideDepth,o=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,d=n.dilationWidth,A=n.filterDepth,O=n.filterHeight,D=n.filterWidth,H=4*Math.floor(n.inChannels/4),te=n.inChannels%4;this.userCode=`
const ivec3 strides = ivec3(`+i+", "+o+", "+s+`);
const ivec3 pads = ivec3(`+t+", "+e+", "+r+`);
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int d2 = coords.u;
ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
int xFCorner = xFRCCorner.x;
int xRCorner = xFRCCorner.y;
int xCCorner = xFRCCorner.z;
// Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get
// y(yF, yR, yC, d2). ? = to be determined. : = across all
// values in that axis.
float dotProd = 0.0;
for (int wF = 0; wF < `+A+`; wF++) {
int xF = xFCorner + wF * `+u+`;
if (xF < 0 || xF >= `+n.inDepth+`) {
continue;
}
for (int wR = 0; wR < `+O+`; wR++) {
int xR = xRCorner + wR * `+l+`;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+D+`; wC++) {
int xC = xCCorner + wC * `+d+`;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
for (int d1 = 0; d1 < `+H+`; d1 += 4) {
vec4 xValues = vec4(
getX(batch, xF, xR, xC, d1),
getX(batch, xF, xR, xC, d1 + 1),
getX(batch, xF, xR, xC, d1 + 2),
getX(batch, xF, xR, xC, d1 + 3)
);
vec4 wValues = vec4(
getW(wF, wR, wC, d1, d2),
getW(wF, wR, wC, d1 + 1, d2),
getW(wF, wR, wC, d1 + 2, d2),
getW(wF, wR, wC, d1 + 3, d2)
);
dotProd += dot(xValues, wValues);
}
if (`+(te===1)+`) {
dotProd +=
getX(batch, xF, xR, xC, `+H+`) *
getW(wF, wR, wC, `+H+`, d2);
} else if (`+(te===2)+`) {
vec2 xValues = vec2(
getX(batch, xF, xR, xC, `+H+`),
getX(batch, xF, xR, xC, `+H+` + 1)
);
vec2 wValues = vec2(
getW(wF, wR, wC, `+H+`, d2),
getW(wF, wR, wC, `+H+` + 1, d2)
);
dotProd += dot(xValues, wValues);
} else if (`+(te===3)+`) {
vec3 xValues = vec3(
getX(batch, xF, xR, xC, `+H+`),
getX(batch, xF, xR, xC, `+H+` + 1),
getX(batch, xF, xR, xC, `+H+` + 2)
);
vec3 wValues = vec3(
getW(wF, wR, wC, `+H+`, d2),
getW(wF, wR, wC, `+H+` + 1, d2),
getW(wF, wR, wC, `+H+` + 2, d2)
);
dotProd += dot(xValues, wValues);
}
}
}
}
setOutput(dotProd);
}
`},Ll=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.outputShape=n.outShape;var i=n.inHeight,o=n.inWidth,s=n.padInfo.top,u=n.padInfo.left,l=n.strideHeight,d=n.strideWidth,A=n.dilationHeight,O=n.dilationWidth,D=n.filterHeight,H=n.filterWidth,te=n.outChannels/n.inChannels,se="",ae="";e&&(se=r?`float activation(float a) {
float b = getPreluActivationWeightsAtOutCoords();
`+e+`
}`:`
float activation(float x) {
`+e+`
}
`,ae="result = activation(result);");var ue=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
`+se+`
const ivec2 strides = ivec2(`+l+", "+d+`);
const ivec2 pads = ivec2(`+s+", "+u+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords.x;
ivec2 xRCCorner = coords.yz * strides - pads;
int d2 = coords.w;
int d1 = d2 / `+te+`;
int q = d2 - d1 * `+te+`;
int xRCorner = xRCCorner.x;
int xCCorner = xRCCorner.y;
// Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
// TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.
for (int wR = 0; wR < `+D+`; wR++) {
int xR = xRCorner + wR * `+A+`;
if (xR < 0 || xR >= `+i+`) {
continue;
}
for (int wC = 0; wC < `+H+`; wC++) {
int xC = xCCorner + wC * `+O+`;
if (xC < 0 || xC >= `+o+`) {
continue;
}
float xVal = getX(batch, xR, xC, d1);
float wVal = getW(wR, wC, d1, q);
dotProd += xVal * wVal;
}
}
float result = dotProd;
`+ue+`
`+ae+`
setOutput(result);
}
`},Ul=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n.outShape;for(var i=n.inHeight,o=n.inWidth,s=n.padInfo.top,u=n.padInfo.left,l=n.strideHeight,d=n.strideWidth,A=n.dilationHeight,O=n.dilationWidth,D=n.filterHeight,H=n.filterWidth,te=H,se="int xR; int xC; int xCOffset;",ae=0;ae<D;ae++)for(var ue=0;ue<H;ue++)se+=`
vec4 xTexelR`+ae+"C"+2*ue+` = vec4(0.);
vec4 wR`+ae+"C"+ue+` = vec4(0.);
vec4 xR`+ae+"C"+ue+" = vec4(0.);";for(ae=0;ae<D;ae++)for(var ye=0;ye<te;ye++){if(se+=`
xR = xRCorner + `+ae*A+`;
xC = xCCorner + `+(ue=2*ye)*O+`;
`,d===1){if(ue<H&&(se+=u%2==1?`
xCOffset = xC + 1;
if(xR >= 0 && xR < `+i+" && xCOffset >= 0 && xCOffset < "+o+`) {
xTexelR`+ae+"C"+ue+` = getX(batch, xR, xCOffset, d1);
// Need to manually clear unused channels in case
// we're reading from recycled texture.
if(xCOffset + 1 >= `+o+`) {
xTexelR`+ae+"C"+ue+`.zw = vec2(0.);
}
} else {
xTexelR`+ae+"C"+ue+` = vec4(0.);
}
xCOffset = xC + 1 - 2;
if(xR >= 0 && xR < `+i+" && xCOffset >= 0 && xCOffset < "+o+`) {
vec4 previous = getX(batch, xR, xCOffset, d1);
// Need to manually clear unused channels in case
// we're reading from recycled texture.
if(xCOffset + 1 >= `+o+`) {
previous.zw = vec2(0.);
}
xR`+ae+"C"+ue+" = vec4(previous.zw, xTexelR"+ae+"C"+ue+`.xy);
} else {
xR`+ae+"C"+ue+" = vec4(0, 0, xTexelR"+ae+"C"+ue+`.xy);
}
`:`
if(xR >= 0 && xR < `+i+" && xC >= 0 && xC < "+o+`) {
xTexelR`+ae+"C"+ue+` = getX(batch, xR, xC, d1);
} else {
xTexelR`+ae+"C"+ue+` = vec4(0.);
}
xR`+ae+"C"+ue+" = xTexelR"+ae+"C"+ue+`;
`,ue+1<H)){var we=u%2==0?ie(O):O;O%2==0&&u%2==1||O%2!=0&&u%2!=1?(se+=`
xCOffset = xC + `+u%2+" + "+we+`;
if(xR >= 0 && xR < `+i+` &&
xCOffset >= 0 && xCOffset < `+o+`) {
xTexelR`+ae+"C"+(ue+2)+` = getX(batch, xR, xCOffset, d1);
}
`,O>1&&(se+=`
xCOffset -= 2;
if(xR >= 0 && xR < `+i+` &&
xCOffset >= 0 && xCOffset < `+o+`) {
xTexelR`+ae+"C"+ue+` = getX(batch, xR, xCOffset, d1);
} else {
xTexelR`+ae+"C"+ue+` = vec4(0.);
}
`),se+=`
xR`+ae+"C"+(ue+1)+` = vec4(
xTexelR`+ae+"C"+ue+".zw, xTexelR"+ae+"C"+(ue+2)+`.xy);
`):se+=`
xCOffset = xC + `+we+`;
if(xR >= 0 && xR < `+i+` &&
xCOffset >= 0 && xCOffset < `+o+`) {
xTexelR`+ae+"C"+(ue+2)+` = getX(batch, xR, xCOffset, d1);
}
xR`+ae+"C"+(ue+1)+" = xTexelR"+ae+"C"+(ue+2)+`;
`}}else ue<H&&(se+=`
if(xR >= 0 && xR < `+i+`) {
`,u%2==1?(se+=`
xCOffset = xC + 1 - `+d+`;
if(xCOffset >= 0 && xCOffset < `+o+`) {
xTexelR`+ae+"C"+ue+` = getX(batch, xR, xCOffset, d1);
} else {
xTexelR`+ae+"C"+ue+` = vec4(0.);
}
if(xC + 1 >= 0 && xC + 1 < `+o+`) {
xTexelR`+ae+"C"+(ue+2)+` = getX(batch, xR, xC + 1, d1);
} else {
xTexelR`+ae+"C"+(ue+2)+` = vec4(0.);
}
xR`+ae+"C"+ue+` = vec4(
xTexelR`+ae+"C"+ue+".zw, xTexelR"+ae+"C"+(ue+2)+`.zw);
`,ue+1<H&&(se+=`
vec4 final = vec4(0.);
xCOffset = xC + 1 + `+d+`;
if(xCOffset >= 0 && xCOffset < `+o+`) {
final = getX(batch, xR, xCOffset, d1);
}
xR`+ae+"C"+(ue+1)+" = vec4(xTexelR"+ae+"C"+(ue+2)+`.xy, final.xy);
`)):(se+=`
if(xC >= 0 && xC < `+o+`) {
xTexelR`+ae+"C"+ue+` = getX(batch, xR, xC, d1);
} else {
xTexelR`+ae+"C"+ue+` = vec4(0.);
}
xCOffset = xC + `+d+`;
if(xCOffset >= 0 && xCOffset < `+o+`) {
xTexelR`+ae+"C"+(ue+2)+` = getX(batch, xR, xCOffset, d1);
} else {
xTexelR`+ae+"C"+(ue+2)+` = vec4(0.);
}
xR`+ae+"C"+ue+` = vec4(
xTexelR`+ae+"C"+ue+".xy, xTexelR"+ae+"C"+(ue+2)+`.xy);
`,ue+1<H&&(se+=`
xR`+ae+"C"+(ue+1)+` = vec4(
xTexelR`+ae+"C"+ue+".zw, xTexelR"+ae+"C"+(ue+2)+`.zw);
`)),se+="}");ue<H&&(se+=`
vec4 wTexelR`+ae+"C"+ue+" = getW("+ae+", "+ue+`, d1, q);
wR`+ae+"C"+ue+" = vec4(wTexelR"+ae+"C"+ue+".xz, wTexelR"+ae+"C"+ue+`.xz);
`,ue+1<H&&(se+=`
vec4 wTexelR`+ae+"C"+(ue+1)+" = getW("+ae+", "+(ue+1)+`, d1, q);
wR`+ae+"C"+(ue+1)+` =
vec4(wTexelR`+ae+"C"+(ue+1)+".xz, wTexelR"+ae+"C"+(ue+1)+".xz);"))}for(ae=0;ae<D;ae++)for(ue=0;ue<H;ue++)se+="dotProd += xR"+ae+"C"+ue+" * wR"+ae+"C"+ue+";";var ve="",Ee="";e&&(ve=r?`vec4 activation(vec4 a) {
vec4 b = getPreluActivationWeightsAtOutCoords();
`+e+`
}`:`vec4 activation(vec4 x) {
`+e+`
}`,Ee="result = activation(result);");var Te=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
`+ve+`
const ivec2 strides = ivec2(`+l+", "+d+`);
const ivec2 pads = ivec2(`+s+", "+u+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords.x;
ivec2 xRCCorner = coords.yz * strides - pads;
int d2 = coords.w;
int d1 = d2;
int q = 0;
int xRCorner = xRCCorner.x;
int xCCorner = xRCCorner.y;
vec4 dotProd = vec4(0.);
`+se+`
vec4 result = dotProd;
`+Te+`
`+Ee+`
setOutput(result);
}
`},Vp=function(n,t,e,r,i){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];var o=n[0],s=n[1],u=n[2],l=n[3],d=t[0],A=e[0],O=e[1];this.outputShape=[d,A,O,l];var D=r==="bilinear"?1:0,H=[s-1+".0",u-1+".0"],te=H[0],se=H[1],ae=A>1?[""+(s-1)/(A-1),"(y2-y1) * height_ratio","y1*"+te+" + float(y)*(height_scale)"]:["0.0","0.0","0.5 * (y1+y2) * "+te],ue=ae[0],ye=ae[1],we=ae[2],ve=O>1?[""+(u-1)/(O-1),"(x2-x1) * width_ratio","x1*"+se+" + float(x)*(width_scale)"]:["0.0","0.0","0.5 * (x1+x2) * "+se],Ee=ve[0],Te=ve[1],Fe=ve[2];this.userCode=`
const float height_ratio = float(`+ue+`);
const float width_ratio = float(`+Ee+`);
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int y = coords[1];
int x = coords[2];
int d = coords[3];
// get box vals
float y1 = getBoxes(b,0);
float x1 = getBoxes(b,1);
float y2 = getBoxes(b,2);
float x2 = getBoxes(b,3);
// get image in batch index
int bInd = round(getBoxInd(b));
if(bInd < 0 || bInd >= `+o+`) {
return;
}
float height_scale = `+ye+`;
float width_scale = `+Te+`;
float in_y = `+we+`;
if( in_y < 0.0 || in_y > `+te+` ) {
setOutput(float(`+i+`));
return;
}
float in_x = `+Fe+`;
if( in_x < 0.0 || in_x > `+se+` ) {
setOutput(float(`+i+`));
return;
}
vec2 sourceFracIndexCR = vec2(in_x,in_y);
if(`+D+` == 1) {
// Compute the four integer indices.
ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);
ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));
float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);
float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);
float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);
float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);
vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);
float top = topLeft + (topRight - topLeft) * fracCR.x;
float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;
float newValue = top + (bottom - top) * fracCR.y;
setOutput(newValue);
} else {
// Compute the coordinators of nearest neighbor point.
ivec2 sourceNearestCR = ivec2(floor(
sourceFracIndexCR + vec2(0.5,0.5)));
float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);
setOutput(newValue);
}
}
`},Gp=function(n,t,e){this.variableNames=["x"],this.outputShape=n;var r=n.length,i=n[n.length-1],o=e?"<":">";this.userCode=`
int getIndex(int i) {
`+(e?"return "+i+" -i - 1;":"return i;")+`
}
void main() {
`+Jr(r)+` coords = getOutputCoords();
int end = `+Wl(r,"coords")+`;
float val = 0.0;
for (int i = `+i+` - 1; i >= 0; i -= 1) {
int idx = getIndex(i);
if (idx `+o+` end) {
continue;
}
if (idx == end && `+t+`) {
continue;
}
`+Wl(r,"coords")+` = idx;
val += getX(`+function(s,u){if(s===1)return""+u;if(s===2)return u+".x, "+u+".y";if(s===3)return u+".x, "+u+".y, "+u+".z";if(s===4)return u+".x, "+u+".y, "+u+".z, "+u+".w";throw Error("Cumulative sum for rank "+s+" is not yet supported")}(r,"coords")+`);
}
setOutput(val);
}
`};function Wl(n,t){if(n===1)return""+t;if(n===2)return t+".y";if(n===3)return t+".z";if(n===4)return t+".w";throw Error("Cumulative sum for rank "+n+" is not yet supported")}var Qp=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=mn.DENSE;var t=at(n),e=zn();this.outputShape=n,this.userCode=`
ivec3 outCoordsFromFlatIndex(int index) {
`+Co(["r","c","d"],n)+`
return ivec3(r, c, d);
}
void main() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+t[0]+", "+t[1]+`));
int index = 4 * (resTexRC.x * `+t[1]+` + resTexRC.y);
vec4 result = vec4(0.);
for (int i=0; i<4; i++) {
int flatIndex = index + i;
ivec3 rc = outCoordsFromFlatIndex(flatIndex);
result[i] = getA(rc.x, rc.y, rc.z);
}
`+e.output+` = result;
}
`},Xp=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=mn.DENSE;var t=at(n),e=zn();this.outputShape=n,this.userCode=`
ivec3 outCoordsFromFlatIndex(int index) {
`+Co(["r","c","d"],n)+`
return ivec3(r, c, d);
}
void main() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+t[0]+", "+t[1]+`));
int index = 4 * (resTexRC.x * `+t[1]+` + resTexRC.y);
vec4 result = vec4(0.);
for (int i=0; i<4; i++) {
int flatIndex = index + i;
ivec3 rc = outCoordsFromFlatIndex(flatIndex);
result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));
}
`+e.output+` = result;
}
`},Kp=function(){function n(t,e,r){this.variableNames=["x"],this.outputShape=[],this.outputShape=t,this.blockSize=e,this.dataFormat=r,this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int h = `+this.getHeightCoordString()+`;
int w = `+this.getWidthCoordString()+`;
int d = `+this.getDepthCoordString()+`;
int in_h = h / `+e+`;
int offset_h = imod(h, `+e+`);
int in_w = w / `+e+`;
int offset_w = imod(w, `+e+`);
int offset_d = (offset_h * `+e+` + offset_w) *
`+this.getOutputDepthSize()+`;
int in_d = d + offset_d;
float result = `+this.getInputSamplingString()+`;
setOutput(result);
}
`}return n.prototype.getHeightCoordString=function(){return this.dataFormat==="NHWC"?"coords[1]":"coords[2]"},n.prototype.getWidthCoordString=function(){return this.dataFormat==="NHWC"?"coords[2]":"coords[3]"},n.prototype.getDepthCoordString=function(){return this.dataFormat==="NHWC"?"coords[3]":"coords[1]"},n.prototype.getOutputDepthSize=function(){return this.dataFormat==="NHWC"?this.outputShape[3]:this.outputShape[1]},n.prototype.getInputSamplingString=function(){return this.dataFormat==="NHWC"?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"},n}(),Zp=function(n){this.variableNames=["X"],this.outputShape=[n,n],this.userCode=`
void main() {
ivec2 coords = getOutputCoords();
float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;
setOutput(val);
}
`},Jp=function(n){this.variableNames=["A"],this.outTexUsage=He.DOWNLOAD;var t=zn();this.outputShape=n,this.userCode=`
`+Dl+`
void main() {
float x = getAAtOutCoords();
`+t.output+` = encode_float(x);
}
`},Yp=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=He.DOWNLOAD;var t=zn();this.outputShape=n,this.userCode=`
`+Dl+`
void main() {
ivec3 coords = getOutputCoords();
float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));
`+t.output+` = encode_float(x);
}
`},$p=function(n,t,e){e===void 0&&(e=!1),this.variableNames=["A"];var r=zn(),i=t[0],o=t[1];this.outputShape=n;var s="result";e&&(s="floor(result * 255. + 0.5)"),this.userCode=`
`+js(n)+`
void main() {
ivec3 coords = getOutputCoords();
int flatIndex = getFlatIndex(coords);
int offset = imod(flatIndex, 4);
flatIndex = idiv(flatIndex, 4, 1.);
int r = flatIndex / `+o+`;
int c = imod(flatIndex, `+o+`);
vec2 uv = (vec2(c, r) + halfCR) / vec2(`+o+".0, "+i+`.0);
vec4 values = `+r.texture2D+`(A, uv);
float result;
if(offset == 0) {
result = values[0];
} else if(offset == 1) {
result = values[1];
} else if(offset == 2) {
result = values[2];
} else {
result = values[3];
}
`+r.output+" = vec4("+s+`, 0., 0., 0.);
}
`},qp=function(n,t,e){e===void 0&&(e=!1),this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var r=zn(),i=t[0],o=t[1];this.outputShape=n;var s="",u="result";e&&(u="floor(result * 255. + 0.5)");for(var l=0;l<=1;l++)for(var d=0;d<=1;d++){var A=2*l+d;s+=`
localCoords = coords;
if(localCoords[2] + `+d+" < "+n[2]+`) {
localCoords[2] += `+d+`;
if(localCoords[1] + `+l+" < "+n[1]+`) {
localCoords[1] += `+l+`;
flatIndex = getFlatIndex(localCoords);
offset = imod(flatIndex, 4);
flatIndex = idiv(flatIndex, 4, 1.);
r = flatIndex / `+o+`;
c = imod(flatIndex, `+o+`);
uv = (vec2(c, r) + halfCR) / vec2(`+o+".0, "+i+`.0);
values = `+r.texture2D+`(A, uv);
if(offset == 0) {
result[`+A+`] = values[0];
} else if(offset == 1) {
result[`+A+`] = values[1];
} else if(offset == 2) {
result[`+A+`] = values[2];
} else {
result[`+A+`] = values[3];
}
}
}
`}this.userCode=`
`+js(n)+`
void main() {
ivec3 coords = getOutputCoords();
vec4 result = vec4(0.);
int flatIndex, r, c, offset;
ivec3 localCoords;
vec2 uv;
vec4 values;
`+s+`
`+r.output+" = "+u+`;
}
`},eh="return real * expR - imag * expI;",th="return real * expI + imag * expR;",zl=function(n,t,e){this.variableNames=["real","imag"];var r=t[1];this.outputShape=t;var i=e?"2.0 * "+Math.PI:"-2.0 * "+Math.PI,o=e?r+".0":"1.0";this.userCode=`
const float exponentMultiplier = `+i+`;
float unaryOpComplex(float real, float expR, float imag, float expI) {
`+n+`
}
float mulMatDFT(int batch, int index) {
float indexRatio = float(index) / float(`+r+`);
float exponentMultiplierTimesIndexRatio =
exponentMultiplier * indexRatio;
float result = 0.0;
for (int i = 0; i < `+r+`; i++) {
// x = (-2|2 * PI / N) * index * i;
float x = exponentMultiplierTimesIndexRatio * float(i);
float expR = cos(x);
float expI = sin(x);
float real = getReal(batch, i);
float imag = getImag(batch, i);
result +=
unaryOpComplex(real, expR, imag, expI) / `+o+`;
}
return result;
}
void main() {
ivec2 coords = getOutputCoords();
setOutput(mulMatDFT(coords[0], coords[1]));
}
`},rh=function(){function n(t,e){this.outputShape=[],this.variableNames=["x"],this.outputShape=t,this.userCode=`
uniform float value;
void main() {
// Input can be obtained from uniform value.
setOutput(value);
}
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;return function(r,i){e.valueLoc==null&&(e.valueLoc=r.getUniformLocationNoThrow(i,"value")),r.gl.uniform1f(e.valueLoc,t)}},n}(),nh=function(n,t,e){this.variableNames=["A","indices"];var r=n.slice();r[e]=t,this.outputShape=r,this.rank=r.length;var i=Jr(this.rank),o=function(s,u){var l=s.length;if(l>4)throw Error("Gather for rank "+l+" is not yet supported");if(l===1)return"int(getIndices(resRC))";for(var d=["resRC.x","resRC.y","resRC.z","resRC.w"],A=[],O=0;O<s.length;O++)O===u?A.push("int(getIndices("+d[O]+"))"):A.push(""+d[O]);return A.join()}(n,e);this.userCode=`
void main() {
`+i+` resRC = getOutputCoords();
setOutput(getA(`+o+`));
}
`},ih=function(n,t,e){this.sliceDim=n,this.strides=t,this.variableNames=["x","indices"],this.outputShape=e;var r=Jr(t.length),i=Jr(e.length),o=this.sliceDim>1?"strides[j]":"strides";this.userCode=`
`+r+" strides = "+r+"("+this.strides+`);
void main() {
`+i+` coords = getOutputCoords();
int flattenIndex = 0;
for (int j = 0; j < `+this.sliceDim+`; j++) {
int index = round(getIndices(coords[0], j));
flattenIndex += index * `+o+`;
}
setOutput(getX(flattenIndex, coords[1]));
}
`};function Hl(n,t){var e=zn();return jr(n,t,e.version+`
precision highp float;
`+e.attribute+` vec3 clipSpacePos;
`+e.attribute+` vec2 uv;
`+e.varyingVs+` vec2 resultUV;
void main() {
gl_Position = vec4(clipSpacePos, 1);
resultUV = uv;
}`)}function Vl(n,t){return wn(n,t,new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]))}function Gl(n,t){return _n(n,t,new Uint16Array([0,1,2,2,1,3]))}function ua(n,t,e,r,i,o,s){Xn(e,r);var u=hn(n,t),l=n.TEXTURE_2D;return vt(n,t,function(){return n.bindTexture(l,u)}),vt(n,t,function(){return n.texParameteri(l,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE)}),vt(n,t,function(){return n.texParameteri(l,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE)}),vt(n,t,function(){return n.texParameteri(l,n.TEXTURE_MIN_FILTER,n.NEAREST)}),vt(n,t,function(){return n.texParameteri(l,n.TEXTURE_MAG_FILTER,n.NEAREST)}),vt(n,t,function(){return n.texImage2D(l,0,i,e,r,0,o,s,null)}),vt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)}),u}function Ql(n,t,e,r,i){var o=pt(e,r);return ua(n,t,o[0],o[1],i.internalFormatFloat,i.textureFormatFloat,n.FLOAT)}function Xl(n,t,e,r,i){var o=pt(e,r);return ua(n,t,o[0],o[1],i.internalFormatHalfFloat,i.textureFormatFloat,i.textureTypeHalfFloat)}function Kl(n,t,e,r,i){var o=pt(e,r);return ua(n,t,o[0],o[1],n.RGBA,n.RGBA,n.UNSIGNED_BYTE)}function Zl(n,t,e,r,i){var o=Nt(e,r);return ua(n,t,o[0],o[1],i.internalFormatPackedFloat,n.RGBA,n.FLOAT)}function Jl(n,t,e,r,i){var o=Nt(e,r);return ua(n,t,o[0],o[1],i.internalFormatPackedHalfFloat,n.RGBA,i.textureTypeHalfFloat)}function Yl(n,t,e,r){return vt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,r)}),ri(n,t,e,"clipSpacePos",r,3,20,0)&&ri(n,t,e,"uv",r,2,20,12)}function $l(n,t,e,r,i,o,s){var u,l,d;vt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)}),o instanceof Uint8Array?(u=new Uint8Array(r*i*4),l=n.UNSIGNED_BYTE,d=n.RGBA):(u=new Float32Array(r*i*4),l=n.FLOAT,d=s.internalFormatPackedFloat),u.set(o),vt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,d,r,i,0,n.RGBA,l,u)}),vt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})}function ql(n,t,e,r){vt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)}),r.data instanceof Uint8Array?vt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,n.RGBA,r.width,r.height,0,n.RGBA,n.UNSIGNED_BYTE,r.data)}):vt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r)}),vt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})}function ec(n,t,e,r,i){var o=n.createBuffer();vt(n,t,function(){return n.bindBuffer(n.PIXEL_PACK_BUFFER,o)});var s=16*e*r;return vt(n,t,function(){return n.bufferData(n.PIXEL_PACK_BUFFER,s,n.STREAM_READ)}),vt(n,t,function(){return n.readPixels(0,0,r,e,n.RGBA,n.FLOAT,0)}),vt(n,t,function(){return n.bindBuffer(n.PIXEL_PACK_BUFFER,null)}),o}function tc(n,t,e){var r=n,i=new Float32Array(e);return r.bindBuffer(r.PIXEL_PACK_BUFFER,t),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,i),r.bindBuffer(r.PIXEL_PACK_BUFFER,null),i}function rc(n,t,e,r,i){var o=pt(e,r),s=o[0],u=o[1],l=new Uint8Array(e*r*4);return vt(n,t,function(){return n.readPixels(0,0,s,u,i.downloadTextureFormat,n.UNSIGNED_BYTE,l)}),new Float32Array(l.buffer)}function nc(n,t,e,r,i,o,s,u){var l=n,d=new Float32Array(function(A,O){var D=Nt(A,O);return D[0]*D[1]*4}(o,s));return l.bindBuffer(l.PIXEL_PACK_BUFFER,t),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,d),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),d}function ic(n,t,e,r){var i=new Float32Array(e*r*4);return vt(n,t,function(){return n.readPixels(0,0,r,e,n.RGBA,n.FLOAT,i)}),i}var oh=Object.freeze({createVertexShader:Hl,createVertexBuffer:Vl,createIndexBuffer:Gl,createFloat32MatrixTexture:Ql,createFloat16MatrixTexture:Xl,createUnsignedBytesMatrixTexture:Kl,createPackedMatrixTexture:Zl,createFloat16PackedMatrixTexture:Jl,bindVertexProgramAttributeStreams:Yl,uploadDenseMatrixToTexture:$l,uploadPixelDataToTexture:ql,createBufferFromOutputTexture:ec,downloadFloat32MatrixFromBuffer:tc,downloadByteEncodedFloatMatrixFromOutputTexture:rc,downloadPackedMatrixFromBuffer:nc,downloadMatrixFromPackedOutputTexture:ic}),oc=function(){function n(t){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];var e=M().getNumber("WEBGL_VERSION");t!=null?(this.gl=t,yt(e,t)):this.gl=dt(e);var r="WEBGL_color_buffer_float";if(M().getNumber("WEBGL_VERSION")===1){if(this.textureFloatExtension=Mr(this.gl,this.debug,"OES_texture_float"),Hr(this.gl,"OES_texture_half_float"))this.textureHalfFloatExtension=Mr(this.gl,this.debug,"OES_texture_half_float");else if(M().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(r),Hr(this.gl,"EXT_color_buffer_half_float"))this.colorBufferHalfFloatExtension=Mr(this.gl,this.debug,"EXT_color_buffer_half_float");else if(M().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(r="EXT_color_buffer_float",Hr(this.gl,r))this.colorBufferFloatExtension=this.gl.getExtension(r);else{if(!Hr(this.gl,"EXT_color_buffer_half_float"))throw new Error("GL context does not support color renderable floats");this.colorBufferHalfFloatExtension=this.gl.getExtension("EXT_color_buffer_half_float")}this.vertexBuffer=Vl(this.gl,this.debug),this.indexBuffer=Gl(this.gl,this.debug),this.framebuffer=nn(this.gl,this.debug),this.textureConfig=Bt(this.gl,this.textureHalfFloatExtension)}return Object.defineProperty(n.prototype,"debug",{get:function(){return M().getBool("DEBUG")},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){var t=this;if(!this.disposed){this.program!=null&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),this.outputTexture!=null&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");var e=this.gl;vt(e,this.debug,function(){return e.finish()}),vt(e,this.debug,function(){return e.bindFramebuffer(e.FRAMEBUFFER,null)}),vt(e,this.debug,function(){return e.deleteFramebuffer(t.framebuffer)}),vt(e,this.debug,function(){return e.bindBuffer(e.ARRAY_BUFFER,null)}),vt(e,this.debug,function(){return e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}),vt(e,this.debug,function(){return e.deleteBuffer(t.indexBuffer)}),this.disposed=!0}},n.prototype.createFloat32MatrixTexture=function(t,e){return this.throwIfDisposed(),Ql(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createFloat16MatrixTexture=function(t,e){return this.throwIfDisposed(),Xl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createUnsignedBytesMatrixTexture=function(t,e){return this.throwIfDisposed(),Kl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.uploadPixelDataToTexture=function(t,e){this.throwIfDisposed(),ql(this.gl,this.debug,t,e)},n.prototype.uploadDenseMatrixToTexture=function(t,e,r,i){this.throwIfDisposed(),$l(this.gl,this.debug,t,e,r,i,this.textureConfig)},n.prototype.createFloat16PackedMatrixTexture=function(t,e){return this.throwIfDisposed(),Jl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createPackedMatrixTexture=function(t,e){return this.throwIfDisposed(),Zl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.deleteMatrixTexture=function(t){var e=this;this.throwIfDisposed(),this.outputTexture===t&&(Rn(this.gl,this.debug,this.framebuffer),this.outputTexture=null),vt(this.gl,this.debug,function(){return e.gl.deleteTexture(t)})},n.prototype.downloadByteEncodedFloatMatrixFromOutputTexture=function(t,e,r){var i=this;return this.downloadMatrixDriver(t,function(){return rc(i.gl,i.debug,e,r,i.textureConfig)})},n.prototype.downloadPackedMatrixFromBuffer=function(t,e,r,i,o,s){return nc(this.gl,t,0,0,0,o,s,this.textureConfig)},n.prototype.downloadFloat32MatrixFromBuffer=function(t,e){return tc(this.gl,t,e)},n.prototype.createBufferFromTexture=function(t,e,r){this.bindTextureToFrameBuffer(t);var i=ec(this.gl,this.debug,e,r,this.textureConfig);return this.unbindTextureToFrameBuffer(),i},n.prototype.createAndWaitForFence=function(){var t=this.createFence(this.gl);return this.pollFence(t)},n.prototype.createFence=function(t){var e,r,i=this;if(M().getBool("WEBGL_FENCE_API_ENABLED")){var o=t,s=o.fenceSync(o.SYNC_GPU_COMMANDS_COMPLETE,0);t.flush(),r=function(){var u=o.clientWaitSync(s,0,0);return u===o.ALREADY_SIGNALED||u===o.CONDITION_SATISFIED},e=s}else M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(e=this.beginQuery(),this.endQuery(),r=function(){return i.isQueryAvailable(e,M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}):r=function(){return!0};return{query:e,isFencePassed:r}},n.prototype.downloadMatrixFromPackedTexture=function(t,e,r){var i=this;return this.downloadMatrixDriver(t,function(){return ic(i.gl,i.debug,e,r)})},n.prototype.createProgram=function(t){this.throwIfDisposed();var e=this.gl,r=Kr(e,this.debug,t),i=Hl(e,this.debug),o=Rt(e,this.debug);return vt(e,this.debug,function(){return e.attachShader(o,i)}),vt(e,this.debug,function(){return e.attachShader(o,r)}),_r(e,this.debug,o),this.debug&&xr(e,this.debug,o),this.vertexAttrsAreBound||(this.setProgram(o),this.vertexAttrsAreBound=Yl(e,this.debug,this.program,this.vertexBuffer)),o},n.prototype.deleteProgram=function(t){var e=this;this.throwIfDisposed(),t===this.program&&(this.program=null),t!=null&&vt(this.gl,this.debug,function(){return e.gl.deleteProgram(t)})},n.prototype.setProgram=function(t){var e=this;this.throwIfDisposed(),this.program=t,this.program!=null&&this.debug&&xr(this.gl,this.debug,this.program),vt(this.gl,this.debug,function(){return e.gl.useProgram(t)})},n.prototype.getUniformLocation=function(t,e,r){return r===void 0&&(r=!0),this.throwIfDisposed(),r?on(this.gl,this.debug,t,e):Fr(this.gl,t,e)},n.prototype.getAttributeLocation=function(t,e){var r=this;return this.throwIfDisposed(),vt(this.gl,this.debug,function(){return r.gl.getAttribLocation(t,e)})},n.prototype.getUniformLocationNoThrow=function(t,e){return this.throwIfDisposed(),this.gl.getUniformLocation(t,e)},n.prototype.setInputMatrixTexture=function(t,e,r){this.throwIfDisposed(),this.throwIfNoProgram(),Jn(this.gl,this.debug,this.program,t,e,r)},n.prototype.setOutputMatrixTexture=function(t,e,r){this.setOutputMatrixTextureDriver(t,r,e)},n.prototype.setOutputPackedMatrixTexture=function(t,e,r){this.throwIfDisposed();var i=Nt(e,r),o=i[0],s=i[1];this.setOutputMatrixTextureDriver(t,o,s)},n.prototype.setOutputMatrixWriteRegion=function(t,e,r,i){this.setOutputMatrixWriteRegionDriver(r,t,i,e)},n.prototype.setOutputPackedMatrixWriteRegion=function(t,e,r,i){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")},n.prototype.debugValidate=function(){this.program!=null&&xr(this.gl,this.debug,this.program),an(this.gl)},n.prototype.executeProgram=function(){this.throwIfDisposed(),this.throwIfNoProgram();var t=this.gl;this.debug&&this.debugValidate(),vt(t,this.debug,function(){return t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0)})},n.prototype.blockUntilAllProgramsCompleted=function(){var t=this;this.throwIfDisposed(),vt(this.gl,this.debug,function(){return t.gl.finish()})},n.prototype.getQueryTimerExtension=function(){return this.disjointQueryTimerExtension==null&&(this.disjointQueryTimerExtension=Mr(this.gl,this.debug,M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension},n.prototype.getQueryTimerExtensionWebGL2=function(){return this.getQueryTimerExtension()},n.prototype.getQueryTimerExtensionWebGL1=function(){return this.getQueryTimerExtension()},n.prototype.beginQuery=function(){if(M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2){var t=this.gl,e=this.getQueryTimerExtensionWebGL2(),r=t.createQuery();return t.beginQuery(e.TIME_ELAPSED_EXT,r),r}var i=this.getQueryTimerExtensionWebGL1(),o=i.createQueryEXT();return i.beginQueryEXT(i.TIME_ELAPSED_EXT,o),o},n.prototype.endQuery=function(){if(M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")!==2){var t=this.getQueryTimerExtensionWebGL1();t.endQueryEXT(t.TIME_ELAPSED_EXT)}else{var e=this.gl,r=this.getQueryTimerExtensionWebGL2();e.endQuery(r.TIME_ELAPSED_EXT)}},n.prototype.waitForQueryAndGetTime=function(t){return E(this,void 0,void 0,function(){var e=this;return C(this,function(r){switch(r.label){case 0:return[4,fe(function(){return e.disposed||e.isQueryAvailable(t,M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))})];case 1:return r.sent(),[2,this.getQueryTime(t,M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))]}})})},n.prototype.getQueryTime=function(t,e){if(e===0)return null;if(e===2){var r=this.gl;return r.getQueryParameter(t,r.QUERY_RESULT)/1e6}var i=this.getQueryTimerExtensionWebGL1();return i.getQueryObjectEXT(t,i.QUERY_RESULT_EXT)/1e6},n.prototype.isQueryAvailable=function(t,e){if(e===0)return!0;if(e===2){var r=this.gl,i=this.getQueryTimerExtensionWebGL2(),o=r.getQueryParameter(t,r.QUERY_RESULT_AVAILABLE);return this.disjoint==null&&(this.disjoint=this.gl.getParameter(i.GPU_DISJOINT_EXT)),o&&!this.disjoint}return o=(i=this.getQueryTimerExtensionWebGL1()).getQueryObjectEXT(t,i.QUERY_RESULT_AVAILABLE_EXT),this.disjoint==null&&(this.disjoint=this.gl.getParameter(i.GPU_DISJOINT_EXT)),o&&!this.disjoint},n.prototype.pollFence=function(t){var e=this;return new Promise(function(r){e.addItemToPoll(function(){return t.isFencePassed()},function(){return r()})})},n.prototype.pollItems=function(){for(var t=function(r){for(var i=0;i<r.length&&r[i]();++i);return i-1}(this.itemsToPoll.map(function(r){return r.isDoneFn})),e=0;e<=t;++e)(0,this.itemsToPoll[e].resolveFn)();this.itemsToPoll=this.itemsToPoll.slice(t+1)},n.prototype.addItemToPoll=function(t,e){var r=this;this.itemsToPoll.push({isDoneFn:t,resolveFn:e}),this.itemsToPoll.length>1||fe(function(){return r.pollItems(),r.itemsToPoll.length===0})},n.prototype.bindTextureToFrameBuffer=function(t){this.throwIfDisposed(),An(this.gl,this.debug,t,this.framebuffer),this.debug&&an(this.gl)},n.prototype.unbindTextureToFrameBuffer=function(){this.outputTexture!=null?(An(this.gl,this.debug,this.outputTexture,this.framebuffer),this.debug&&an(this.gl)):Rn(this.gl,this.debug,this.framebuffer)},n.prototype.downloadMatrixDriver=function(t,e){this.bindTextureToFrameBuffer(t);var r=e();return this.unbindTextureToFrameBuffer(),r},n.prototype.setOutputMatrixTextureDriver=function(t,e,r){this.throwIfDisposed();var i=this.gl;An(i,this.debug,t,this.framebuffer),this.debug&&an(i),this.outputTexture=t,vt(i,this.debug,function(){return i.viewport(0,0,e,r)}),vt(i,this.debug,function(){return i.scissor(0,0,e,r)})},n.prototype.setOutputMatrixWriteRegionDriver=function(t,e,r,i){var o=this;this.throwIfDisposed(),vt(this.gl,this.debug,function(){return o.gl.scissor(t,e,r,i)})},n.prototype.throwIfDisposed=function(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")},n.prototype.throwIfNoProgram=function(){if(this.program==null)throw new Error("No GPU program is currently set.")},n}();function ac(n,t){if(n.length!==t.length)throw Error("Binary was compiled with "+n.length+" inputs, but was executed with "+t.length+" inputs");n.forEach(function(e,r){var i=e.logicalShape,o=t[r],s=o.shape;if(!le(i,s))throw Error("Binary was compiled with different shapes than the current args. Shapes "+i+" and "+s+" must match");if(!e.isUniform||!o.isUniform){var u=e.texShape,l=o.isUniform?null:o.texData.texShape;if(!le(u,l))throw Error("Binary was compiled with different texture shapes than the current args. Shape "+u+" and "+l+" must match")}})}var ah=function(n,t,e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n;for(var r=e.filterWidth,i=e.inChannels,o=e.strideWidth,s=e.strideHeight,u=e.padInfo,l=e.outWidth,d=e.dilationWidth,A=e.dilationHeight,O=e.dataFormat,D=u.left,H=u.top,te=i*r,se=zn(),ae=O==="channelsLast",ue=ae?0:1,ye=ae?1:2,we="",ve=0;ve<=1;ve++)for(var Ee=0;Ee<=1;Ee++)we+=`
blockIndex = rc.y + `+Ee+`;
pos = rc.x + `+ve+`;
if(blockIndex < `+n[1]+" && pos < "+n[0]+`) {
offsetY = int(blockIndex / (`+l+")) * "+s+" - "+H+`;
d0 = offsetY + `+A+" * (pos / "+te+`);
if(d0 < `+t[ue]+` && d0 >= 0) {
offsetX = int(mod(float(blockIndex), `+l+".) * "+o+". - "+D+`.);
d1 = offsetX + `+d+" * (int(mod(float(pos), "+te+".) / "+i+`.));
if(d1 < `+t[ye]+` && d1 >= 0) {
ch = int(mod(float(pos), `+i+`.));
if (`+ae+`) {
innerDims = vec2(d1, ch);
result[`+(2*ve+Ee)+`] = getChannel(
getA(d0, int(innerDims.x),
int(innerDims.y)), innerDims);
} else {
innerDims = vec2(d0, d1);
result[`+(2*ve+Ee)+`] = getChannel(
getA(ch, int(innerDims.x),
int(innerDims.y)), innerDims);
}
}
}
}
`;this.userCode=`
void main() {
ivec2 rc = getOutputCoords();
vec4 result = vec4(0);
int blockIndex, pos, offsetY, d0, offsetX, d1, ch;
vec2 innerDims;
`+we+`
`+se.output+` = result;
}
`},sh=function(n,t,e,r,i){this.variableNames=["x"],this.outputShape=[];var o,s=t,u=n[3]-1;this.outputShape=n;var l="float("+e+") + float("+r+") * sum";o=i===.5?"inversesqrt("+l+")":i===1?"1.0/("+l+")":"exp(log("+l+") * float(-"+i+"));",this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int r = coords[1];
int c = coords[2];
int d = coords[3];
float x = getX(b, r, c, d);
float sum = 0.0;
for (int j = -`+s+"; j <= "+s+`; j++) {
int idx = d + j;
if (idx >= 0 && idx <= `+u+`) {
float z = getX(b, r, c, idx);
sum += z * z;
}
}
float val = x * `+o+`;
setOutput(val);
}
`},uh=function(n,t,e,r,i){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=n,this.depth=n[3],this.depthRadius=t,this.bias=e,this.alpha=r,this.beta=i,this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int r = coords[1];
int c = coords[2];
float result = 0.0;
for (int d = 0; d < `+this.depth+`; ++d) {
int depthBegin = int(max(0.0, float(d - `+t+`)));
int depthEnd = int(min(float(`+this.depth+`),
float(d + `+t+` + 1)));
const int MIN_DEPTH_BEGIN = 0;
const int MAX_DEPTH_END = `+this.depth+`;
float norm = 0.0;
for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {
if (k < depthBegin){
continue;
}
else if (k >= depthBegin && k < depthEnd) {
norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);
}
else {
break;
}
}
norm = float(`+r+") * norm + float("+e+`);
for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){
if (k < depthBegin){
continue;
}
else if (k >= depthBegin && k < depthEnd){
float dyi = -2.0 * float(`+r+`)
* float(`+i+`)
* getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)
/ norm;
if (k == d) {
dyi += pow(norm, -1.0 * `+i+`);
}
if (k == coords[3]) {
dyi *= getDy(b, r, c, d);
result += dyi;
}
}
else {
break;
}
}
}
setOutput(result);
}
`},lh=function(n,t,e,r,i){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;var o,s=t,u=n[3]-1;this.outputShape=n;var l="float("+e+") + float("+r+") * sum";o=i===.5?"inversesqrt("+l+")":i===1?"1.0/("+l+")":"exp(log("+l+") * float(-"+i+"));",this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords.x;
int r = coords.y;
int c = coords.z;
int d = coords.w;
bool hasNextCol = d < `+this.outputShape[3]+`;
bool hasNextRow = c < `+this.outputShape[2]+`;
vec4 sum = vec4(0.);
vec4 xFragAtOutputCoords = getX(b, r, c, d);
vec4 xAtOutputCoords = vec4(
getChannel(xFragAtOutputCoords, vec2(c, d)),
hasNextCol ?
getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,
hasNextRow ?
getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,
(hasNextRow && hasNextCol) ?
getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0
);
int firstChannel = d - `+s+`;
vec2 cache = vec2(0.);
if(firstChannel >= 0){
vec4 firstChannelFrag = getX(b, r, c, firstChannel);
cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));
if(hasNextRow){
cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));
}
}
ivec2 depth = ivec2(d, d + 1);
for (int j = - `+s+"; j <= "+s+`; j++) {
ivec2 idx = depth + j;
bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));
bvec2 belowUpperBound = lessThanEqual(idx, ivec2(`+u+`));
bool depthInRange = aboveLowerBound.x && belowUpperBound.x;
bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;
if(depthInRange || depthPlusOneInRange){
vec4 z = vec4(0.);
vec4 xFragAtCurrentDepth;
z.xz = cache.xy;
if(depthPlusOneInRange && hasNextCol){
xFragAtCurrentDepth = idx.y != d ?
getX(b, r, c, idx.y) : xFragAtOutputCoords;
z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));
if(hasNextRow){
z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));
}
}
cache.xy = z.yw;
sum += z * z;
}
}
vec4 result = xAtOutputCoords * `+o+`;
setOutput(result);
}
`},ch=function(n){this.variableNames=["dy","maxPos"],this.outputShape=n.inShape;var t=n.strideHeight,e=n.strideWidth,r=n.dilationHeight,i=n.effectiveFilterHeight,o=n.effectiveFilterWidth,s=i-1-n.padInfo.top,u=o-1-n.padInfo.left,l=i*o-1;this.userCode=`
const ivec2 pads = ivec2(`+s+", "+u+`);
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
ivec2 dyRCCorner = coords.yz - pads;
int dyRCorner = dyRCCorner.x;
int dyCCorner = dyRCCorner.y;
// Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wR = 0; wR < `+i+`;
wR += `+r+`) {
float dyR = float(dyRCorner + wR) / `+t+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
for (int wC = 0; wC < `+o+`; wC++) {
float dyC = float(dyCCorner + wC) / `+e+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
float dyValue = getDy(b, idyR, idyC, d);
int maxPosValue = `+l+` - int(getMaxPos(b, idyR, idyC, d));
// Get the current value, check it against the value from the
// position matrix.
int curPosValue = wR * `+o+` + wC;
float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);
dotProd += dyValue * mask;
}
}
setOutput(dotProd);
}
`},fh=function(n){this.variableNames=["dy","maxPos"],this.outputShape=n.inShape;var t=n.strideDepth,e=n.strideHeight,r=n.strideWidth,i=n.dilationDepth,o=n.dilationHeight,s=n.dilationWidth,u=n.effectiveFilterDepth,l=n.effectiveFilterHeight,d=n.effectiveFilterWidth,A=u-1-n.padInfo.front,O=l-1-n.padInfo.top,D=d-1-n.padInfo.left,H=u*l*d-1;this.userCode=`
const ivec3 pads = ivec3(`+A+", "+O+", "+D+`);
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int ch = coords.u;
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
int dyDCorner = dyCorner.x;
int dyRCorner = dyCorner.y;
int dyCCorner = dyCorner.z;
// Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get
// dx(xD, xR, xC, ch).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wD = 0; wD < `+u+`;
wD += `+i+`) {
float dyD = float(dyDCorner + wD) / `+t+`.0;
if (dyD < 0.0 || dyD >= `+n.outDepth+`.0 || fract(dyD) > 0.0) {
continue;
}
int idyD = int(dyD);
for (int wR = 0; wR < `+l+`;
wR += `+o+`) {
float dyR = float(dyRCorner + wR) / `+e+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
for (int wC = 0; wC < `+d+`;
wC += `+s+`) {
float dyC = float(dyCCorner + wC) / `+r+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
float dyValue = getDy(batch, idyD, idyR, idyC, ch);
int maxPosValue = `+H+` -
int(getMaxPos(batch, idyD, idyR, idyC, ch));
// Get the current value, check it against the value from the
// position matrix.
int curPosValue =
wD * `+l+" * "+d+` +
wR * `+d+` + wC;
float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);
dotProd += dyValue * mask;
}
}
}
setOutput(dotProd);
}
`},Bs=function(n,t,e,r,i,o,s){e===void 0&&(e=!1),r===void 0&&(r=!1),i===void 0&&(i=!1),o===void 0&&(o=null),s===void 0&&(s=!1),this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t;var u=e?n[1]:n[2],l=Math.ceil(u/2),d=e?"i * 2, rc.y":"rc.y, i * 2",A=r?"rc.z, i * 2":"i * 2, rc.z",O=e?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],D=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],H="",te="";o&&(H=s?`vec4 activation(vec4 a) {
vec4 b = getPreluActivationWeightsAtOutCoords();
`+o+`
}`:`vec4 activation(vec4 x) {
`+o+`
}`,te="result = activation(result);");var se=i?"result += getBiasAtOutCoords();":"";i&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),this.userCode=`
`+H+`
const float sharedDimension = `+l+`.0;
vec4 dot2x2ARowBCol(ivec3 rc) {
vec4 result = vec4(0);
for (int i = 0; i < `+l+`; i++) {
vec4 a = getMatrixA(rc.x, `+d+`);
vec4 b = getMatrixB(rc.x, `+A+`);
// These swizzled products need to be separately added.
// See: https://github.com/tensorflow/tfjs/issues/1735
result += (`+O[0]+" * "+D[0]+`);
result += (`+O[1]+" * "+D[1]+`);
}
return result;
}
void main() {
ivec3 rc = getOutputCoords();
vec4 result = dot2x2ARowBCol(rc);
`+se+`
`+te+`
setOutput(result);
}
`},dh=function(){function n(t,e,r){this.variableNames=["probs"],this.outputShape=[t,r],this.userCode=`
uniform float seed;
void main() {
ivec2 coords = getOutputCoords();
int batch = coords[0];
float r = random(seed);
float cdf = 0.0;
for (int i = 0; i < `+(e-1)+`; i++) {
cdf += getProbs(batch, i);
if (r < cdf) {
setOutput(float(i));
return;
}
}
// If no other event happened, last event happened.
setOutput(float(`+(e-1)+`));
}
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;return function(r,i){e.seedLoc==null&&(e.seedLoc=r.getUniformLocation(i,"seed")),r.gl.uniform1f(e.seedLoc,t)}},n}(),ph=function(n,t,e,r){this.variableNames=["indices"],this.outputShape=[n,t],this.userCode=`
void main() {
ivec2 coords = getOutputCoords();
int index = round(getIndices(coords.x));
setOutput(mix(float(`+r+"), float("+e+`),
float(index == coords.y)));
}
`},hh=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=n;var t=n.length;if(t===0)this.userCode=`
void main() {
setOutput(vec4(getA(), 0., 0., 0.));
}
`;else{var e=ti("rc",t),r=Jr(t),i=function(u,l,d){if(u===1)return"rc > "+l[0];for(var A="",O=u-2;O<u;O++)A+=d[O]+" >= "+l[O],O<u-1&&(A+="||");return A}(t,n,e),o=function(u,l,d,A){if(u===1)return"";var O=A.slice(-2);return`
int r = `+O[0]+`;
int c = `+O[1]+`;
int rp1 = r + 1;
int cp1 = c + 1;
bool cEdge = cp1 >= `+l+`;
bool rEdge = rp1 >= `+d+`;
`}(t,n[n.length-1],n[n.length-2],e),s=function(u,l){var d=u.length,A=function(O,D){for(var H=[],te=0;te<=1;te++)for(var se=0;se<=1;se++){for(var ae=(te===0?"r":"rp1")+", "+(se===0?"c":"cp1"),ue=2;ue<O;ue++)ae=D[D.length-1-ue]+","+ae;H.push(ae)}return H}(d,l);return d===1?`getA(rc),
rc + 1 >= `+u[0]+` ? 0. : getA(rc + 1),
0, 0`:"getA("+A[0]+`),
cEdge ? 0. : getA(`+A[1]+`),
rEdge ? 0. : getA(`+A[2]+`),
rEdge || cEdge ? 0. : getA(`+A[3]+")"}(n,e);this.userCode=`
void main() {
`+r+` rc = getOutputCoords();
if(`+i+`) {
setOutput(vec4(0));
} else {
`+o+`
setOutput(vec4(`+s+`));
}
}
`}},vh=function(n,t,e){this.variableNames=["x"],this.outputShape=t.map(function(l,d){return l[0]+n[d]+l[1]});var r=n.length,i=Jr(r),o=t.map(function(l){return l[0]}).join(","),s=t.map(function(l,d){return l[0]+n[d]}).join(","),u=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=r!==1?`
`+i+" start = "+i+"("+o+`);
`+i+" end = "+i+"("+s+`);
void main() {
`+i+` outC = getOutputCoords();
if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {
setOutput(float(`+e+`));
} else {
`+i+` coords = outC - start;
setOutput(getX(`+u+`));
}
}
`:`
int start = `+o+`;
int end = `+s+`;
void main() {
int outC = getOutputCoords();
if (outC < start || outC >= end) {
setOutput(float(`+e+`));
} else {
setOutput(getX(outC - start));
}
}
`},mh=function(n,t,e){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map(function(ae,ue){return ae[0]+n[ue]+ae[1]});for(var r=n.length,i=Jr(r),o=t.map(function(ae){return ae[0]}).join(","),s=t.map(function(ae,ue){return ae[0]+n[ue]}).join(","),u=ti("rc",r),l=ti("source",r),d=u[r-1]+" < "+this.outputShape[r-1],A=r===1?"source":"vec2("+l.slice(-2).join()+")",O=[i+" rc = outputLoc;",u[r-1]+` += 1;
if(`+d+`) {
`,r===1?"":`}
rc = outputLoc;
`+u[r-2]+` += 1;
if(`+u[r-2]+" < "+this.outputShape[r-2]+") {",r===1?"":" "+u[r-1]+` += 1;
if(`+d+") {"],D=r===1?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))",H="",te=0,se=r===1?2:4;te<se;te++)H+=`
`+O[te]+`
if (`+D+`) {
result[`+te+"] = float("+e+`);
} else {
`+i+` source = rc - start;
result[`+te+"] = getChannel(getX("+l.join()+"), "+A+`);
}
`;H+=r===1?"} ":"}}",this.userCode=`
const `+i+" start = "+i+"("+o+`);
const `+i+" end = "+i+"("+s+`);
void main() {
`+i+` outputLoc = getOutputCoords();
vec4 result = vec4(0.);
`+H+`
setOutput(result);
}
`},Ms=function(n,t,e){if(this.variableNames=["x"],t==="avg"&&e)throw new Error("Cannot compute positions for average pool.");var r=n.filterWidth,i=n.strideHeight,o=n.strideWidth,s=n.dilationHeight,u=n.dilationWidth,l=n.effectiveFilterHeight,d=n.effectiveFilterWidth,A=n.padInfo.top,O=n.padInfo.left;this.outputShape=n.outShape;var D=t==="avg",H="0.0";if(D||(H="-1.0 / 1e-20"),e)this.userCode=`
const ivec2 strides = ivec2(`+i+", "+o+`);
const ivec2 pads = ivec2(`+A+", "+O+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords[0];
int d = coords[3];
ivec2 xRCCorner = coords.yz * strides - pads;
int xRCorner = xRCCorner.x;
int xCCorner = xRCCorner.y;
// max/min x(?, ?, d) to get y(yR, yC, d).
// ? = to be determined
float minMaxValue = 0.0;
float minMaxValueFound = 0.0;
int minMaxPosition = 0;
float avgValue = 0.0;
for (int wR = 0; wR < `+l+`;
wR += `+s+`) {
int xR = xRCorner + wR;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+d+`;
wC += `+u+`) {
int xC = xCCorner + wC;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
float value = getX(batch, xR, xC, d);
// If a min / max value has already been found, use it. If not,
// use the current value.
float currMinMaxValue = mix(
value, minMaxValue, minMaxValueFound);
if (value >= currMinMaxValue) {
minMaxValue = value;
minMaxValueFound = 1.0;
minMaxPosition = wR * `+d+` + wC;
}
}
}
setOutput(float(minMaxPosition));
}
`;else{var te=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="avg"&&(te="avgValue / count");var se=4*Math.floor(r/4),ae=r%4,ue=`
if (`+D+`) {
avgValue += dot(values, ones);
} else {
minMaxValue = max(values, minMaxValue);
}
`;this.userCode=`
const ivec2 strides = ivec2(`+i+", "+o+`);
const ivec2 pads = ivec2(`+A+", "+O+`);
const float initializationValue = `+H+`;
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
float count = 0.0;
float getValue(int batch, int xR, int xC, int d) {
if (xC < 0 || xC >= `+n.inWidth+`) {
return initializationValue;
}
count += 1.0;
return getX(batch, xR, xC, d);
}
void main() {
ivec4 coords = getOutputCoords();
int batch = coords[0];
int d = coords[3];
ivec2 xRCCorner = coords.yz * strides - pads;
int xRCorner = xRCCorner.x;
int xCCorner = xRCCorner.y;
// max/min x(?, ?, d) to get y(yR, yC, d).
// ? = to be determined
vec4 minMaxValue = vec4(`+H+`);
float avgValue = 0.0;
count = 0.0;
for (int wR = 0; wR < `+l+`;
wR += `+s+`) {
int xR = xRCorner + wR;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+se+`; wC += 4) {
int xC = xCCorner + wC * `+u+`;
vec4 values = vec4(
getValue(batch, xR, xC, d),
getValue(batch, xR, xC + `+u+`, d),
getValue(batch, xR, xC + 2 * `+u+`, d),
getValue(batch, xR, xC + 3 * `+u+`, d)
);
`+ue+`
}
int xC = xCCorner + `+se+`;
if (`+(ae===1)+`) {
vec4 values = vec4(
getValue(batch, xR, xC, d),
initializationValue,
initializationValue,
initializationValue
);
`+ue+`
} else if (`+(ae===2)+`) {
vec4 values = vec4(
getValue(batch, xR, xC, d),
getValue(batch, xR, xC + `+u+`, d),
initializationValue,
initializationValue
);
`+ue+`
} else if (`+(ae===3)+`) {
vec4 values = vec4(
getValue(batch, xR, xC, d),
getValue(batch, xR, xC + `+u+`, d),
getValue(batch, xR, xC + 2 * `+u+`, d),
initializationValue
);
`+ue+`
}
}
setOutput(`+te+`);
}
`}},Ns=function(n,t,e){if(this.variableNames=["x"],t==="avg"&&e)throw new Error("Cannot compute positions for average pool.");var r=n.filterWidth,i=n.strideDepth,o=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,d=n.dilationWidth,A=n.effectiveFilterDepth,O=n.effectiveFilterHeight,D=n.effectiveFilterWidth,H=n.padInfo.front,te=n.padInfo.top,se=n.padInfo.left;this.outputShape=n.outShape;var ae=t==="avg",ue="0.0";if(ae||(ue="-1.0 / 1e-20"),e)this.userCode=`
const ivec3 strides =
ivec3(`+i+", "+o+", "+s+`);
const ivec3 pads = ivec3(`+H+", "+te+", "+se+`);
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int ch = coords.u;
ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
int xDCorner = xCorner.x;
int xRCorner = xCorner.y;
int xCCorner = xCorner.z;
// max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).
// ? = to be determined
float minMaxValue = 0.0;
float minMaxValueFound = 0.0;
int minMaxPosition = 0;
for (int wD = 0; wD < `+A+`;
wD += `+u+`) {
int xD = xDCorner + wD;
if (xD < 0 || xD >= `+n.inDepth+`) {
continue;
}
for (int wR = 0; wR < `+O+`;
wR += `+l+`) {
int xR = xRCorner + wR;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+D+`;
wC += `+d+`) {
int xC = xCCorner + wC;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
float value = getX(batch, xD, xR, xC, ch);
// If a min / max value has already been found, use it. If not,
// use the current value.
float currMinMaxValue = mix(
value, minMaxValue, minMaxValueFound);
if (value >= currMinMaxValue) {
minMaxValue = value;
minMaxValueFound = 1.0;
minMaxPosition =
wD * `+O+" * "+D+` +
wR * `+D+` + wC;;
}
}
}
}
setOutput(float(minMaxPosition));
}
`;else{var ye=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="avg"&&(ye="avgValue / count");var we=4*Math.floor(r/4),ve=r%4,Ee=`
if (`+ae+`) {
avgValue += dot(values, ones);
} else {
minMaxValue = max(values, minMaxValue);
}
`;this.userCode=`
const ivec3 strides =
ivec3(`+i+", "+o+", "+s+`);
const ivec3 pads = ivec3(`+H+", "+te+", "+se+`);
const float initializationValue = `+ue+`;
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
float count = 0.0;
float getValue(int batch, int xD, int xR, int xC, int ch) {
if (xC < 0 || xC >= `+n.inWidth+`) {
return initializationValue;
}
count += 1.0;
return getX(batch, xD, xR, xC, ch);
}
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int ch = coords.u;
ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
int xDCorner = xCorner.x;
int xRCorner = xCorner.y;
int xCCorner = xCorner.z;
// max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).
// ? = to be determined
vec4 minMaxValue = vec4(`+ue+`);
float avgValue = 0.0;
count = 0.0;
for (int wD = 0; wD < `+A+`;
wD += `+u+`) {
int xD = xDCorner + wD;
if (xD < 0 || xD >= `+n.inDepth+`) {
continue;
}
for (int wR = 0; wR < `+O+`;
wR += `+l+`) {
int xR = xRCorner + wR;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+we+`; wC += 4) {
int xC = xCCorner + wC * `+d+`;
vec4 values = vec4(
getValue(batch, xD, xR, xC, ch),
getValue(batch, xD, xR, xC + `+d+`, ch),
getValue(batch, xD, xR, xC + 2 * `+d+`, ch),
getValue(batch, xD, xR, xC + 3 * `+d+`, ch)
);
`+Ee+`
}
int xC = xCCorner + `+we+`;
if (`+(ve===1)+`) {
vec4 values = vec4(
getValue(batch, xD, xR, xC, ch),
initializationValue,
initializationValue,
initializationValue
);
`+Ee+`
} else if (`+(ve===2)+`) {
vec4 values = vec4(
getValue(batch, xD, xR, xC, ch),
getValue(batch, xD, xR, xC + `+d+`, ch),
initializationValue,
initializationValue
);
`+Ee+`
} else if (`+(ve===3)+`) {
vec4 values = vec4(
getValue(batch, xD, xR, xC, ch),
getValue(batch, xD, xR, xC + `+d+`, ch),
getValue(batch, xD, xR, xC + 2 * `+d+`, ch),
initializationValue
);
`+Ee+`
}
}
setOutput(`+ye+`);
}
}
`}},gh=function(n,t){this.variableNames=["x"];var e=n.windowSize,r=n.batchSize,i=n.inSize,o=Math.ceil(i/e);this.outputShape=[r,o];var s="0.0",u="";t==="prod"?s="1.0":t==="min"?(s="1.0 / 1e-20",u="min"):t==="max"&&(s="-1.0 / 1e-20",u="max");var l=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="sum"?l="sumValue":t==="prod"?l="prodValue":t==="all"?l="allValue":t==="any"&&(l="anyValue");var d=4*Math.floor(e/4),A=e%4,O=`
if (`+(t==="sum")+`) {
sumValue += dot(values, ones);
} else if (`+(t==="prod")+`) {
vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);
prodValue *= tmp[0] * tmp[1];
} else {
minMaxValue = `+u+`(values, minMaxValue);
}
`,D="vec4";t==="all"?(s="1.0",O=`
bool reducedAllValue = all(values);
float floatedReducedAllValue = float(reducedAllValue);
allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);
`,D="bvec4"):t==="any"&&(s="0.0",O=`
bool reducedAnyValue = any(values);
float floatedReducedAnyValue = float(reducedAnyValue);
anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);
`,D="bvec4");var H="";i%e>0&&(H=`
if (inIdx < 0 || inIdx >= `+i+`) {
return initializationValue;
}
`),this.userCode=`
const float initializationValue = `+s+`;
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
float getValue(int batch, int inIdx) {
`+H+`
return getX(batch, inIdx);
}
void main() {
ivec2 coords = getOutputCoords();
int batch = coords[0];
int outIdx = coords[1];
int inOffset = outIdx * `+e+`;
vec4 minMaxValue = vec4(`+s+`);
float prodValue = 1.0;
float sumValue = 0.0;
float allValue = 1.0;
float anyValue = 0.0;
for (int i = 0; i < `+d+`; i += 4) {
int inIdx = inOffset + i;
`+D+" values = "+D+`(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
getValue(batch, inIdx + 2),
getValue(batch, inIdx + 3)
);
`+O+`
}
int inIdx = inOffset + `+d+`;
if (`+(A===1)+`) {
`+D+" values = "+D+`(
getValue(batch, inIdx),
initializationValue,
initializationValue,
initializationValue
);
`+O+`
} else if (`+(A===2)+`) {
`+D+" values = "+D+`(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
initializationValue,
initializationValue
);
`+O+`
} else if (`+(A===3)+`) {
`+D+" values = "+D+`(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
getValue(batch, inIdx + 2),
initializationValue
);
`+O+`
}
setOutput(`+l+`);
}
`},yh=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n;for(var e="",r=0;r<4;r++){var i="thisRC = rc;";r%2==1&&(i+="thisRC.z += 1;"),r>1&&(i+="thisRC.y += 1;"),e+=`
`+i+`
`+(r>0?"if(thisRC.y < rows && thisRC.z < cols){":"")+`
int flatIndex = getFlatIndex(thisRC);
ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);
vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));
result[`+r+`] =
getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);
`+(r>0?"}":"")+`
`}this.userCode=`
ivec3 inputCoordsFromReshapedOutCoords(int index) {
`+Co(["r","c","d"],t)+`
return ivec3(r, c, d);
}
`+js(n)+`
void main() {
ivec3 rc = getOutputCoords();
vec4 result = vec4(0.);
ivec3 thisRC;
int rows = `+n[1]+`;
int cols = `+n[2]+`;
`+e+`
setOutput(result);
}
`},bh=function(n,t,e){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,i=r[1],o=r[2],s=n.shape,u=s[1],l=s[2],d=[e&&u>1?i-1:i,e&&l>1?o-1:o],A=[e&&u>1?u-1:u,e&&l>1?l-1:l],O=d[0]/A[0],D=d[1]/A[1],H=1/O,te=1/D,se=2*Math.ceil(H)+2,ae=2*Math.ceil(te)+2;this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
int r = coords[1];
int c = coords[2];
float accumulator = 0.0;
const float heightScale = float(`+O+`);
const float widthScale = float(`+D+`);
const float invHeightScale = float(`+H+`);
const float invWidthScale = float(`+te+`);
const int winHeight = int(`+se+`);
const int winWidth = int(`+ae+`);
// Compute bounds for where in dy we will look
float startRLerp = floor(float(r) * invHeightScale);
int startDyR = int(startRLerp - float(winHeight / 2));
float startCLerp = floor(float(c) * invWidthScale);
int startDyC = int(startCLerp - float(winWidth / 2));
// Loop over dy
for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {
int dyR = dyROffset + startDyR;
// Guard against the window exceeding the bounds of dy
if (dyR < 0 || dyR >= `+u+`) {
continue;
}
for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {
int dyC = dyCOffset + startDyC;
// Guard against the window exceeding the bounds of dy
if (dyC < 0 || dyC >= `+l+`) {
continue;
}
float dxR = float(dyR) * heightScale;
int topDxRIndex = int(floor(dxR));
int bottomDxRIndex = int(min(ceil(dxR), `+(i-1)+`.0));
float dxRLerp = dxR - float(topDxRIndex);
float inverseDxRLerp = 1.0 - dxRLerp;
float dxC = float(dyC) * widthScale;
int leftDxCIndex = int(floor(dxC));
int rightDxCIndex = int(min(ceil(dxC), `+(o-1)+`.0));
float dxCLerp = dxC - float(leftDxCIndex);
float inverseDxCLerp = 1.0 - dxCLerp;
if (r == topDxRIndex && c == leftDxCIndex) {
// topLeft
accumulator +=
getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;
}
if (r == topDxRIndex && c == rightDxCIndex) {
// topRight
accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;
}
if (r == bottomDxRIndex && c == leftDxCIndex) {
// bottomLeft
accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;
}
if (r == bottomDxRIndex && c == rightDxCIndex) {
// bottomRight
accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;
}
}
}
// End loop over dy
setOutput(accumulator);
}
`},wh=function(n,t,e,r){this.variableNames=["A"],this.outputShape=[];var i=n[0],o=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?o-1:o,r&&e>1?s-1:s],d=[r&&t>1?t-1:t,r&&e>1?e-1:e];this.userCode=`
const vec2 effectiveInputOverOutputRatioRC = vec2(
`+l[0]/d[0]+`,
`+l[1]/d[1]+`);
const vec2 inputShapeRC = vec2(`+o+".0, "+s+`.0);
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
ivec2 yRC = coords.yz;
// Fractional source index.
vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;
// Compute the four integer indices.
ivec2 sourceFloorRC = ivec2(sourceFracIndexRC);
ivec2 sourceCeilRC = ivec2(
min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));
float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);
float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);
float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);
float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);
vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);
float top = topLeft + (topRight - topLeft) * fracRC.y;
float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;
float newValue = top + (bottom - top) * fracRC.x;
setOutput(newValue);
}
`},Ah=function(n,t,e,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];var i=n[0],o=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?o-1:o,r&&e>1?s-1:s],d=[r&&t>1?t-1:t,r&&e>1?e-1:e];this.userCode=`
const vec3 effectiveInputOverOutputRatioRC = vec3(
`+l[0]/d[0]+`,
`+l[1]/d[1]+`,
`+l[1]/d[1]+`);
const vec3 inputShapeRC = vec3(`+o+".0, "+s+`.0,
`+s+`.0);
float getAValue(int b, int r, int c, int d) {
return getChannel(getA(b, r, c, d), vec2(c, d));
}
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
// Calculate values for next column in yRC.z.
ivec3 yRC = coords.yzz + ivec3(0, 0, 1);
// Fractional source index.
vec3 sourceFracIndexRC = vec3(yRC) * effectiveInputOverOutputRatioRC;
// Compute the four integer indices.
ivec3 sourceFloorRC = ivec3(sourceFracIndexRC);
ivec3 sourceCeilRC = ivec3(
min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));
// Should we calculate next column and row elements in 2x2 packed cell.
bool hasNextCol = d < `+(u-1)+`;
bool hasNextRow = coords.z < `+(e-1)+`;
// In parallel, construct four corners for all four components in
// packed 2x2 cell.
vec4 topLeft = vec4(
getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),
hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)
: 0.0,
hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)
: 0.0,
(hasNextRow && hasNextCol) ?
getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);
vec4 bottomLeft = vec4(
getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),
hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)
: 0.0,
hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)
: 0.0,
(hasNextRow && hasNextCol) ?
getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);
vec4 topRight = vec4(
getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),
hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)
: 0.0,
hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)
: 0.0,
(hasNextRow && hasNextCol) ?
getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);
vec4 bottomRight = vec4(
getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),
hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)
: 0.0,
hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)
: 0.0,
(hasNextRow && hasNextCol) ?
getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);
vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);
vec4 top = mix(topLeft, topRight, fracRC.yyzz);
vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);
vec4 newValue = mix(top, bottom, fracRC.x);
setOutput(newValue);
}
`},xh=function(n,t,e){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,i=r[1],o=r[2],s=n.shape,u=s[1],l=s[2],d=[e&&u>1?i-1:i,e&&l>1?o-1:o],A=[e&&u>1?u-1:u,e&&l>1?l-1:l],O=d[0]/A[0],D=d[1]/A[1],H=1/O,te=1/D,se=2*Math.ceil(H)+2,ae=2*Math.ceil(te)+2;this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
int r = coords[1];
int c = coords[2];
float accumulator = 0.0;
const float heightScale = float(`+O+`);
const float widthScale = float(`+D+`);
const float invHeightScale = float(`+H+`);
const float invWidthScale = float(`+te+`);
const int winHeight = int(`+se+`);
const int winWidth = int(`+ae+`);
// Compute bounds for where in dy we will look
float startRLerp = floor(float(r) * invHeightScale);
int startDyR = int(floor(startRLerp - float(winHeight / 2)));
float startCLerp = floor(float(c) * invWidthScale);
int startDyC = int(floor(startCLerp - float(winWidth / 2)));
// Loop over dy
for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {
int dyR = dyROffset + startDyR;
// Guard against the window exceeding the bounds of dy
if (dyR < 0 || dyR >= `+u+`) {
continue;
}
for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {
int dyC = dyCOffset + startDyC;
// Guard against the window exceeding the bounds of dy
if (dyC < 0 || dyC >= `+l+`) {
continue;
}
float sourceFracRow =
float(`+d[0]+`) *
(float(dyR) / float(`+A[0]+`));
float sourceFracCol =
float(`+d[1]+`) *
(float(dyC) / float(`+A[1]+`));
int sourceNearestRow = int(min(
float(int(`+i+`) - 1),
`+e+` ? float(round(sourceFracRow)) :
float(floor(sourceFracRow))));
int sourceNearestCol = int(min(
float(int(`+o+`) - 1),
`+e+` ? float(round(sourceFracCol)) :
float(floor(sourceFracCol))));
if (r == sourceNearestRow && c == sourceNearestCol) {
accumulator += getDy(b, dyR, dyC, d);
}
}
}
// End loop over dy
setOutput(accumulator);
}
`},Eh=function(n,t,e,r){this.variableNames=["A"],this.outputShape=[];var i=n[0],o=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?o-1:o,r&&e>1?s-1:s],d=[r&&t>1?t-1:t,r&&e>1?e-1:e],A=r?"0.5":"0.0";this.userCode=`
const vec2 effectiveInputOverOutputRatioRC = vec2(
`+l[0]/d[0]+`,
`+l[1]/d[1]+`);
const vec2 inputShapeRC = vec2(`+o+".0, "+s+`.0);
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
ivec2 yRC = coords.yz;
// Fractional source index.
vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;
// Compute the coordinators of nearest neighbor point.
ivec2 sourceNearestRC = ivec2(
min(inputShapeRC - 1.0, floor(sourceFracIndexRC + `+A+`)));
float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);
setOutput(newValue);
}
`},Ch=function(n,t){this.variableNames=["x"];var e=n.length;if(e>4)throw new Error("WebGL backend: Reverse of rank-"+e+" tensor is not yet supported");if(this.outputShape=n,e!==1){var r=n.map(function(o,s){return function(u){return t.indexOf(u)!==-1&&n[u]!==1?n[u]+" - coords["+u+"] - 1":"coords["+u+"]"}(s)}).join(","),i=Jr(e);this.userCode=`
void main() {
`+i+` coords = getOutputCoords();
setOutput(getX(`+r+`));
}
`}else this.userCode=`
void main() {
int coord = getOutputCoords();
setOutput(getX(`+n[0]+` - coord - 1));
}
`},Sh=function(n,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;var e=n.length;if(e>4)throw new Error("WebGL backend: Reverse of rank-"+e+" tensor is not yet supported");this.outputShape=n;var r=ti("rc",e),i=r[e-1]+" + 1 < "+this.outputShape[e-1],o=r[e-2]+" + 1 < "+this.outputShape[e-2],s=Jr(e);function u(l){var d=n.map(function(A,O){return function(D,H){return t.indexOf(D)!==-1&&n[D]!==1?n[D]+" - "+H[D]+" - 1":""+H[D]}(O,l)});return"getChannel(getX("+d.join(",")+"), vec2("+d.slice(-2).join(",")+"))"}this.userCode=e===1?`
void main(){
int rc = getOutputCoords();
vec4 result = vec4(0.);
result.r = getChannel(getX(`+n[0]+` - rc - 1),
`+n[0]+` - rc - 1);
if(`+i+`){
result.g = getChannel(getX(`+n[0]+` - (rc + 1) - 1),
`+n[0]+` - (rc + 1) - 1);
}
setOutput(result);
}
`:`
void main() {
`+s+` rc = getOutputCoords();
vec4 result = vec4(0.);
result.r = `+function(l){return u(l)}(r.slice())+`;
if(`+i+`){
result.g = `+function(l){return l[e-1]="("+l[e-1]+" + 1)",u(l)}(r.slice())+`;
}
if(`+o+`) {
result.b = `+function(l){return l[e-2]="("+l[e-2]+" + 1)",u(l)}(r.slice())+`;
if(`+i+`) {
result.a = `+function(l){return l[e-1]="("+l[e-1]+" + 1)",l[e-2]="("+l[e-2]+" + 1)",u(l)}(r.slice())+`;
}
}
setOutput(result);
}
`},sc=function(n,t,e,r,i,o,s){s===void 0&&(s=!0),this.variableNames=["updates","indices","defaultValue"],this.outputShape=o;var u=Jr(i.length),l=Jr(o.length),d="";e===1?d="i":e===2&&(d="i, j");var A="getIndices("+d+")",O="";r===1?O="i":r===2&&(O="i, coords[1]");var D="getUpdates("+O+")",H=t>1?"strides[j]":"strides";this.userCode=`
`+u+" strides = "+u+"("+i+`);
void main() {
`+l+` coords = getOutputCoords();
float sum = 0.0;
bool found = false;
for (int i = 0; i < `+n+`; i++) {
int flattenedIndex = 0;
for (int j = 0; j < `+t+`; j++) {
int index = round(`+A+`);
flattenedIndex += index * `+H+`;
}
if (flattenedIndex == coords[0]) {
sum += `+D+`;
found = true;
}
}
setOutput(mix(getDefaultValue(), sum, float(found)));
}
`},Ih=function(n,t){this.variableNames=["x","segmentIds"];var e=n.windowSize,r=n.batchSize,i=n.inSize,o=n.numSegments,s=o*Math.ceil(i/e);this.outputShape=[r,s];var u=4*Math.floor(e/4),l=e%4,d=`
sumValue += dot(values, segFilter);
`,A="";i%e>0&&(A=`
if (inIdx < 0 || inIdx >= `+i+`) {
return initializationValue;
}
`);var O="";i%e>0&&(O=`
if (inIdx < 0 || inIdx >= `+i+`) {
return -1.0;
}
`),this.userCode=`
const float initializationValue = 0.0;
float getValue(int batch, int inIdx) {
`+A+`
return getX(batch, inIdx);
}
float getSegmentIdAtIndex(int inIdx) {
`+O+`
return getSegmentIds(inIdx);
}
void main() {
ivec2 coords = getOutputCoords();
int batch = coords[0];
int outIdx = coords[1];
int inOffset = int(floor(float(outIdx) / float(
`+o+")) * float("+e+`));
int currentSeg = int(mod(float(outIdx), float(`+o+`)));
float sumValue = 0.0;
for (int i = 0; i < `+u+`; i += 4) {
int inIdx = inOffset + i;
vec4 values = vec4(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
getValue(batch, inIdx + 2),
getValue(batch, inIdx + 3)
);
vec4 segFilter = vec4(
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0
);
`+d+`
}
int inIdx = inOffset + `+u+`;
if (`+(l===1)+`) {
vec4 values = vec4(
getValue(batch, inIdx),
initializationValue,
initializationValue,
initializationValue
);
int inIdxSeg = int(getSegmentIdAtIndex(inIdx));
vec4 segFilter = vec4(
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
0,
0,
0
);
`+d+`
} else if (`+(l===2)+`) {
vec4 values = vec4(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
initializationValue,
initializationValue
);
vec4 segFilter = vec4(
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
0,
0
);
`+d+`
} else if (`+(l===3)+`) {
vec4 values = vec4(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
getValue(batch, inIdx + 2),
initializationValue
);
vec4 segFilter = vec4(
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,
0
);
`+d+`
}
setOutput(sumValue);
}
`},Th=function(n,t,e){var r,i;if(this.variableNames=["c","a","b"],this.outputShape=t,e>4)throw Error("Where for rank "+e+" is not yet supported");if(e===1)i="resRC",r="resRC";else{for(var o=["resRC.x","resRC.y","resRC.z","resRC.w"],s=[],u=[],l=0;l<t.length;l++)u.push(""+o[l]),l<n&&s.push(""+o[l]);r=s.join(),i=u.join()}var d=Jr(e);this.userCode=`
void main() {
`+d+` resRC = getOutputCoords();
float cVal = getC(`+r+`);
if (cVal >= 1.0) {
setOutput(getA(`+i+`));
} else {
setOutput(getB(`+i+`));
}
}
`},Rh=function(){function n(t){this.variableNames=["source"],this.outputShape=t,this.rank=t.length;var e,r=Jr(this.rank),i="uniform int start["+this.rank+"];",o=function(s){if(s===1)return"sourceLoc";if(s<=6)return _s.slice(0,s).map(function(u){return"sourceLoc."+u}).join(",");throw Error("Slicing for rank "+s+" is not yet supported")}(this.rank);e=`
`+r+` sourceLoc;
`+r+` coords = getOutputCoords();
`+t.map(function(s,u){return"sourceLoc."+_s[u]+" = start["+u+"] + coords."+_s[u]+";"}).join(`
`)+`
`,this.userCode=`
`+i+`
void main() {
`+e+`
setOutput(getSource(`+o+`));
}
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(r,i){e.startLoc==null&&(e.startLoc=r.getUniformLocationNoThrow(i,"start"),e.startLoc==null)||r.gl.uniform1iv(e.startLoc,t)}},n}(),_s=["x","y","z","w","u","v"],Oh=function(){function n(t){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.rank=t.length;var e=Jr(this.rank),r=ti("coords",this.rank),i=ti("sourceLoc",this.rank),o=this.rank===1?"sourceLoc":"vec2("+i.slice(-2).join()+")",s="getChannel(getSource("+i.join()+"), "+o+")",u=`
result.x = `+s+`;
if (++`+r[this.rank-1]+" < "+t[this.rank-1]+`) {
++`+i[this.rank-1]+`;
result.y = `+s+`;
--`+i[this.rank-1]+`;
}
`,l=this.rank===1?"":`
--`+r[this.rank-1]+`;
if (++`+r[this.rank-2]+" < "+t[this.rank-2]+`) {
++`+i[this.rank-2]+`;
result.z = `+s+`;
if (++`+r[this.rank-1]+" < "+t[this.rank-1]+`) {
++`+i[this.rank-1]+`;
result.w = `+s+`;
}
}
`,d=this.rank<=4?`sourceLoc = coords +
`+e+"("+t.map(function(A,O){return"start["+O+"]"}).join()+");":t.map(function(A,O){return i[O]+" = "+r[O]+" + start["+O+"];"}).join(`
`);this.userCode=`
uniform int start[`+this.rank+`];
void main() {
`+e+` coords = getOutputCoords();
`+e+` sourceLoc;
`+d+`
vec4 result = vec4(0.);
`+u+`
`+l+`
setOutput(result);
}
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(r,i){e.startLoc==null&&(e.startLoc=r.getUniformLocationNoThrow(i,"start"),e.startLoc==null)||r.gl.uniform1iv(e.startLoc,t)}},n}(),kh=function(n,t,e){this.variableNames=["x"],this.outputShape=e;var r=e.length,i=Jr(e.length),o=Jr(e.length),s="";if(r===1)s="coords * strides + begin";else{var u=0;s=e.map(function(l,d){return u++,e.length===1?"coords * strides["+d+"] + begin["+d+"]":"coords["+(u-1)+"] * strides["+d+"] + begin["+d+"]"}).join(",")}this.userCode=`
`+i+" begin = "+i+"("+n+`);
`+i+" strides = "+i+"("+t+`);
void main() {
`+o+` coords = getOutputCoords();
setOutput(getX(`+s+`));
}
`},jh=function(){function n(t){this.gpgpu=t,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}return n.prototype.acquireTexture=function(t,e,r){var i,o=uc(e,r),s=lc(t,o,r);if(s in this.freeTextures||(this.freeTextures[s]=[]),s in this.usedTextures||(this.usedTextures[s]=[]),this.freeTextures[s].length>0){this.numFreeTextures--,this.numUsedTextures++,this.log();var u=this.freeTextures[s].shift();return this.usedTextures[s].push(u),u}return this.numUsedTextures++,this.log(),o===it.PACKED_2X2_FLOAT32?i=this.gpgpu.createPackedMatrixTexture(t[0],t[1]):o===it.PACKED_2X2_FLOAT16?i=this.gpgpu.createFloat16PackedMatrixTexture(t[0],t[1]):o===it.UNPACKED_FLOAT32?i=this.gpgpu.createFloat32MatrixTexture(t[0],t[1]):o===it.UNPACKED_FLOAT16?i=this.gpgpu.createFloat16MatrixTexture(t[0],t[1]):o===it.PACKED_4X1_UNSIGNED_BYTE&&(i=this.gpgpu.createUnsignedBytesMatrixTexture(t[0],t[1])),this.usedTextures[s].push(i),i},n.prototype.releaseTexture=function(t,e,r,i){if(this.freeTextures!=null){var o=lc(e,uc(r,i),i);o in this.freeTextures||(this.freeTextures[o]=[]),this.freeTextures[o].push(t),this.numFreeTextures++,this.numUsedTextures--;var s=this.usedTextures[o],u=s.indexOf(t);if(u<0)throw new Error("Cannot release a texture that was never provided by this texture manager");s.splice(u,1),this.log()}},n.prototype.log=function(){if(this.logEnabled){var t=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",this.numFreeTextures+" / "+this.numUsedTextures,"("+t+")")}},n.prototype.getNumUsedTextures=function(){return this.numUsedTextures},n.prototype.getNumFreeTextures=function(){return this.numFreeTextures},n.prototype.dispose=function(){var t=this;if(this.freeTextures!=null){for(var e in this.freeTextures)this.freeTextures[e].forEach(function(r){t.gpgpu.deleteMatrixTexture(r)});for(var e in this.usedTextures)this.usedTextures[e].forEach(function(i){t.gpgpu.deleteMatrixTexture(i)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0}},n}();function uc(n,t){if(n===He.UPLOAD)return it.PACKED_2X2_FLOAT32;if(n===He.RENDER||n==null)return function(e){return M().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?it.PACKED_2X2_FLOAT32:it.UNPACKED_FLOAT32:e?it.PACKED_2X2_FLOAT16:it.UNPACKED_FLOAT16}(t);if(n===He.DOWNLOAD||n===He.PIXELS)return it.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+n)}function lc(n,t,e){return n[0]+"_"+n[1]+"_"+t+"_"+e}var Dh=function(n,t){this.variableNames=["A"];for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[r]*t[r];this.outputShape=e,this.rank=e.length;var i=Jr(this.rank),o=function(s){var u=s.length;if(u>5)throw Error("Tile for rank "+u+" is not yet supported");if(u===1)return"imod(resRC, "+s[0]+")";for(var l=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],d=[],A=0;A<s.length;A++)d.push("imod("+l[A]+", "+s[A]+")");return d.join()}(n);this.userCode=`
void main() {
`+i+` resRC = getOutputCoords();
setOutput(getA(`+o+`));
}
`},Ph=function(n,t){this.variableNames=["A"];for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[t[r]];this.outputShape=e,this.rank=e.length;var i=Jr(this.rank),o=function(s){var u=s.length;if(u>6)throw Error("Transpose for rank "+u+" is not yet supported");for(var l=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],d=new Array(u),A=0;A<s.length;A++)d[s[A]]=l[A];return d.join()}(t);this.userCode=`
void main() {
`+i+` resRC = getOutputCoords();
setOutput(getA(`+o+`));
}
`},Bh=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0;for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[t[r]];if(this.outputShape=e,this.rank=e.length,this.rank>6)throw Error("Packed transpose for rank "+this.rank+" is not yet supported.");var i=Jr(this.rank),o=jl("rc",this.rank),s=new Array(this.rank);for(r=0;r<t.length;r++)s[t[r]]=o[r];var u="vec2("+s.slice(-2).join()+")",l="++"+o[this.rank-1]+" < "+e[this.rank-1],d="getChannel(getA("+s.join()+"), "+u+")";this.userCode=`
void main() {
`+i+` rc = getOutputCoords();
vec4 result = vec4(0.);
result[0] = `+d+`;
if(`+l+`) {
result[1] = `+d+`;
}
--`+o[this.rank-1]+`;
if(++`+o[this.rank-2]+" < "+e[this.rank-2]+`) {
result[2] = `+d+`;
if(`+l+`) {
result[3] = `+d+`;
}
}
setOutput(result);
}
`},Fs=1.7580993408473768,Ls=1.0507009873554805,sr=function(n,t){this.variableNames=["A"],this.outputShape=n,this.userCode=`
float unaryOperation(float x) {
`+t+`
}
void main() {
float x = getAAtOutCoords();
float y = unaryOperation(x);
setOutput(y);
}
`},Ci="if (isnan(x)) return x;",Mh="return x;",cc="return abs(x);",fc=Ci+`
return (x < 0.0) ? 0.0 : x;
`,dc=Ci+`
return (x < 0.0) ? 0.0 : min(6.0, x);
`,pc="return (x >= 0.0) ? x : (exp(x) - 1.0);",Nh=`
// Stable and Attracting Fixed Point (0, 1) for Normalized Weights.
// see: https://arxiv.org/abs/1706.02515
float scaleAlpha = `+Fs+`;
float scale = `+Ls+`;
return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);
`,hc="return -x;",vc="return ceil(x);",mc="return floor(x);",gc="return exp(x);",yc="return exp(x) - 1.0;",_h=Ci+`
return sin(x);
`,Fh=Ci+`
return cos(x);
`,Lh=Ci+`
if (abs(x) > 1.) {
return NAN;
}
return asin(x);
`,Uh=Ci+`
if (abs(x) > 1.) {
return NAN;
}
return acos(x);
`,Wh=Ci+`
return atan(x);
`,zh=Ci+"return log(x + sqrt(x * x + 1.0));",Hh=Ci+`
if (x < 1.0) return NAN;
return log(x + sqrt(x * x - 1.0));`,Vh=Ci+`
if ((x < -1.0) || (x > 1.0)) return NAN;
return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Na="return x;",Gh="return x;",bc=`
vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));
bvec4 isNaN = isnan(x);
result.r = isNaN.r ? x.r : result.r;
result.g = isNaN.g ? x.g : result.g;
result.b = isNaN.b ? x.b : result.b;
result.a = isNaN.a ? x.a : result.a;
return result;
`,wc=`
vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));
bvec4 isNaN = isnan(x);
result.r = isNaN.r ? x.r : result.r;
result.g = isNaN.g ? x.g : result.g;
result.b = isNaN.b ? x.b : result.b;
result.a = isNaN.a ? x.a : result.a;
return result;
`,Ac=`
vec4 result;
result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);
result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);
result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);
result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);
return result;
`,la=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.userCode=`
vec4 unaryOperation(vec4 x) {
`+t+`
}
void main() {
vec4 x = getAAtOutCoords();
vec4 y = unaryOperation(x);
setOutput(y);
}
`},Qh=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=n;var t=n.length,e=ti("rc",t),r=Jr(t),i=function(u,l){if(u===1)return"rc";for(var d="",A=0;A<u;A++)d+=l[A],A<u-1&&(d+=",");return d}(t,e),o=e.slice(-2),s=t<=1?"rc":"vec2("+o.join(",")+")";this.userCode=`
void main() {
`+r+` rc = getOutputCoords();
vec4 packedInput = getA(`+i+`);
setOutput(getChannel(packedInput, `+s+`));
}
`},_a={};function Fa(n,t){if(t===void 0&&(t=!1),n==="linear")return t?Gh:Mh;if(n==="relu")return t?bc:fc;if(n==="elu")return t?Ac:pc;if(n==="relu6")return t?wc:dc;if(n==="prelu")return t?_l:Nl;throw new Error("Activation "+n+" has not been implemented for the WebGL backend.")}var Xh=600,xc=function(n){function t(e){var r,i=n.call(this)||this;if(i.pendingRead=new WeakMap,i.pendingDisposal=new WeakSet,i.dataRefCount=new WeakMap,i.numBytesInGPU=0,i.uploadWaitMs=0,i.downloadWaitMs=0,i.warnedAboutMemory=!1,i.pendingDeletes=0,i.disposed=!1,!M().getBool("HAS_WEBGL"))throw new Error("WebGL is not supported on this device");if(e==null){var o=dt(M().getNumber("WEBGL_VERSION"));i.binaryCache=((r=M().getNumber("WEBGL_VERSION"))in _a||(_a[r]={}),_a[r]),i.gpgpu=new oc(o),i.canvas=o.canvas,i.gpgpuCreatedLocally=!0}else i.gpgpu=e,i.binaryCache={},i.gpgpuCreatedLocally=!1,i.canvas=e.gl.canvas;return i.textureManager=new jh(i.gpgpu),i.numMBBeforeWarning=M().global.screen==null?1024:M().global.screen.height*M().global.screen.width*window.devicePixelRatio*Xh/1024/1024,i.texData=new El(i,ze),i}return I(t,n),t.prototype.numDataIds=function(){return this.texData.numDataIds()+(this.cpuBackend?this.cpuBackend.numDataIds():0)-this.pendingDeletes},t.prototype.write=function(e,r,i){if(M().getBool("DEBUG")&&this.checkNumericalProblems(e),i==="complex64"&&e!=null)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");var o={};return this.texData.set(o,{shape:r,dtype:i,values:e,usage:He.UPLOAD}),o},t.prototype.move=function(e,r,i,o){if(M().getBool("DEBUG")&&this.checkNumericalProblems(r),o==="complex64")throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.texData.set(e,{shape:i,dtype:o,values:r,usage:He.UPLOAD})},t.prototype.readSync=function(e){var r=this.texData.get(e),i=r.values,o=r.dtype,s=r.complexTensors,u=r.slice,l=r.shape,d=r.isPacked;if(u!=null){var A=void 0;A=d?new la(l,Na):new sr(l,Na);var O=this.runWebGLProgram(A,[{dataId:e,shape:l,dtype:o}],o),D=this.readSync(O.dataId);return this.disposeData(O.dataId),D}if(i!=null)return this.convertAndCacheOnCPU(e);if(o==="string")return i;var H,te,se=this.activeTimers!=null;return se&&(H=_e()),o==="complex64"?te=Ts(s.real.dataSync(),s.imag.dataSync()):te=this.getValuesFromTexture(e),se&&(this.downloadWaitMs+=_e()-H),this.convertAndCacheOnCPU(e,te)},t.prototype.read=function(e){return E(this,void 0,void 0,function(){var r,i,o,s,u,l,d,A,O,D,H,te,se,ae,ue,ye,we,ve,Ee,Te,Fe,Le;return C(this,function(Me){switch(Me.label){case 0:if(this.pendingRead.has(e))return r=this.pendingRead.get(e),[2,new Promise(function(Ne){return r.push(Ne)})];if(i=this.texData.get(e),o=i.values,s=i.shape,u=i.slice,l=i.dtype,d=i.complexTensors,A=i.isPacked,u!=null)return O=void 0,O=A?new la(s,Na):new sr(s,Na),D=this.runWebGLProgram(O,[{dataId:e,shape:s,dtype:l}],l),H=this.read(D.dataId),this.disposeData(D.dataId),[2,H];if(o!=null)return[2,this.convertAndCacheOnCPU(e)];if(!M().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&M().getNumber("WEBGL_VERSION")===2)throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");return te=null,l!=="complex64"&&M().get("WEBGL_BUFFER_SUPPORTED")&&(se=this.decode(e),ae=this.texData.get(se.dataId),te=(Le=this.gpgpu).createBufferFromTexture.apply(Le,[ae.texture].concat(at(s)))),this.pendingRead.set(e,[]),l==="complex64"?[3,2]:[4,this.gpgpu.createAndWaitForFence()];case 1:Me.sent(),Me.label=2;case 2:return l!=="complex64"?[3,4]:[4,Promise.all([d.real.data(),d.imag.data()])];case 3:return ye=Me.sent(),we=ye[0],ve=ye[1],ue=Ts(we,ve),[3,5];case 4:te==null?ue=this.getValuesFromTexture(e):(Ee=ce(s),ue=this.gpgpu.downloadFloat32MatrixFromBuffer(te,Ee)),Me.label=5;case 5:return se!=null&&this.disposeData(se.dataId),Te=this.convertAndCacheOnCPU(e,ue),Fe=this.pendingRead.get(e),this.pendingRead.delete(e),Fe.forEach(function(Ne){return Ne(Te)}),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e),this.pendingDeletes--),[2,Te]}})})},t.prototype.checkNumericalProblems=function(e){if(e!=null)for(var r=0;r<e.length;r++){var i=e[r];if(!Ar(i))throw M().getBool("WEBGL_RENDER_FLOAT32_CAPABLE")?Error("The value "+i+" cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'"):Error("The value "+i+" cannot be represented on this device.")}},t.prototype.getValuesFromTexture=function(e){var r,i=this.texData.get(e),o=i.shape,s=i.dtype,u=i.isPacked,l=ce(o);if(M().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")){var d=this.decode(e),A=this.texData.get(d.dataId),O=(r=this.gpgpu).downloadMatrixFromPackedTexture.apply(r,[A.texture].concat(at(o))).subarray(0,l);return this.disposeData(d.dataId),O}var D=M().getBool("WEBGL_PACK")&&u===!0,H=D?rn(o):o,te=D?new Yp(H):new Jp(H),se=this.runWebGLProgram(te,[{shape:H,dtype:s,dataId:e}],"float32"),ae=this.texData.get(se.dataId),ue=this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(ae.texture,ae.texShape[0],ae.texShape[1]).subarray(0,l);return this.disposeData(se.dataId),ue},t.prototype.time=function(e){return E(this,void 0,void 0,function(){var r,i,o,s,u,l,d;return C(this,function(A){switch(A.label){case 0:return r=this.activeTimers,i=[],o=!1,this.programTimersStack==null?(this.programTimersStack=i,o=!0):this.activeTimers.push(i),this.activeTimers=i,e(),s=xe(this.activeTimers.map(function(O){return O.query})).filter(function(O){return O!=null}),u=xe(this.activeTimers.map(function(O){return O.name})).filter(function(O){return O!=null}),this.activeTimers=r,o&&(this.programTimersStack=null),l={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null},M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[4,Promise.all(s)]:[3,2];case 1:return d=A.sent(),l.kernelMs=Ie(d),l.getExtraProfileInfo=function(){return d.map(function(O,D){return{name:u[D],ms:O}}).map(function(O){return O.name+": "+O.ms}).join(", ")},[3,3];case 2:l.kernelMs={error:"WebGL query timers are not supported in this environment."},A.label=3;case 3:return this.uploadWaitMs=0,this.downloadWaitMs=0,[2,l]}})})},t.prototype.memory=function(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU}},t.prototype.startTimer=function(){return M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:_e(),endMs:null}},t.prototype.endTimer=function(e){return M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=_e(),e)},t.prototype.getQueryTime=function(e){return E(this,void 0,void 0,function(){var r;return C(this,function(i){return M().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[2,this.gpgpu.waitForQueryAndGetTime(e)]:[2,(r=e).endMs-r.startMs]})})},t.prototype.disposeData=function(e){if(!this.pendingDisposal.has(e)){if(this.pendingRead.has(e))return this.pendingDisposal.add(e),void this.pendingDeletes++;if(this.texData.has(e)){this.releaseGPUData(e);var r=this.texData.get(e).complexTensors;r!=null&&(r.real.dispose(),r.imag.dispose()),this.texData.delete(e)}}},t.prototype.releaseGPUData=function(e){var r=this.texData.get(e),i=r.texture,o=r.dtype,s=r.texShape,u=r.usage,l=r.isPacked,d=r.slice,A=d&&d.origDataId||e,O=this.dataRefCount.get(A);O>1?this.dataRefCount.set(A,O-1):(this.dataRefCount.delete(A),i!=null&&(this.numBytesInGPU-=this.computeBytes(s,o),this.textureManager.releaseTexture(i,s,u,l)));var D=this.texData.get(e);D.texture=null,D.texShape=null,D.isPacked=!1,D.slice=null},t.prototype.getTexture=function(e){return this.uploadToGPU(e),this.texData.get(e).texture},t.prototype.getDataInfo=function(e){return this.texData.get(e)},t.prototype.getCPUBackend=function(){return M().getBool("WEBGL_CPU_FORWARD")?(this.cpuBackend==null&&(this.cpuBackend=ze.findBackend("cpu")),this.cpuBackend):null},t.prototype.shouldExecuteOnCPU=function(e,r){var i=this;return r===void 0&&(r=128),this.getCPUBackend()!=null&&e.every(function(o){return i.texData.get(o.dataId).texture==null&&o.size<r})},t.prototype.getGPGPUContext=function(){return this.gpgpu},t.prototype.complex=function(e,r){var i=this.makeOutput(e.shape,"complex64");return this.texData.get(i.dataId).complexTensors={real:ze.keep(e.clone()),imag:ze.keep(r.clone())},i},t.prototype.real=function(e){return this.texData.get(e.dataId).complexTensors.real.clone()},t.prototype.imag=function(e){return this.texData.get(e.dataId).complexTensors.imag.clone()},t.prototype.slice=function(e,r,i){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.slice(e,r,i);if(ce(i)===0)return Un([],i,e.dtype);var o=this.texData.get(e.dataId).isPacked,s=As(e.shape,r,i);if(o||!s){var u=M().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Oh(i):new Rh(i),l=u.getCustomSetupFunc(r);return this.compileAndRun(u,[e],null,l)}return this.uploadToGPU(e.dataId),this.shallowSlice(e,r,i)},t.prototype.shallowSlice=function(e,r,i){var o=this.texData.get(e.dataId),s=this.makeOutput(i,e.dtype),u=this.texData.get(s.dataId);Object.assign(u,o),u.shape=i,u.dtype=e.dtype;var l=xs(r,e.strides);o.slice&&(l+=o.slice.flatOffset),u.slice={flatOffset:l,origDataId:o.slice&&o.slice.origDataId||e.dataId};var d=this.dataRefCount.get(u.slice.origDataId)||1;return this.dataRefCount.set(u.slice.origDataId,d+1),s},t.prototype.stridedSlice=function(e,r,i,o){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.stridedSlice(e,r,i,o);var s=Oa(r,i,o);if(s.some(function(l){return l===0}))return Un([],s);var u=new kh(r,o,s);return this.compileAndRun(u,[e])},t.prototype.reverse=function(e,r){var i=M().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Sh(e.shape,r):new Ch(e.shape,r);return this.compileAndRun(i,[e])},t.prototype.concat=function(e,r){if(e[0].dtype==="complex64"){var i=e.map(function(H){return Ln(H)}),o=e.map(function(H){return ki(H)});return Cn(this.concat(i,r),this.concat(o,r))}if(this.shouldExecuteOnCPU(e))return this.cpuBackend.concat(e,r);if(e.length===1)return e[0];if(e.length>M().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER")){var s=Math.floor(e.length/2),u=this.concat(e.slice(0,s),r),l=this.concat(e.slice(s),r);return this.concat([u,l],r)}if(M().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&e[0].rank>1){var d=new Np(e.map(function(H){return H.shape}),r);return this.compileAndRun(d,e)}var A=mi(e.map(function(H){return H.shape}),r),O=e.map(function(H){return H.as2D(-1,ce(H.shape.slice(r)))}),D=new Mp(O.map(function(H){return H.shape}));return this.compileAndRun(D,O).reshape(A)},t.prototype.neg=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.neg(e);if(M().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,hc,e.dtype);var r=new sr(e.shape,hc);return this.compileAndRun(r,[e])},t.prototype.batchMatMul=function(e,r,i,o){var s=i?e.shape[2]:e.shape[1],u=o?r.shape[1]:r.shape[2],l=i?e.shape[1]:e.shape[2],d=e.shape[0];if((s===1||u===1)&&l>1e3){i&&(e=e.transpose([0,2,1])),o&&(r=r.transpose([0,2,1]));var A=u===1?e:e.as3D(d,l,1),O=u===1?2:1,D=u===1?r.as3D(d,1,l):r;return this.multiply(A,D).sum(O,!0)}var H=rr(e.dtype,r.dtype),te=new Bs(e.shape,[d,s,u],i,o);return this.compileAndRun(te,[e,r],H)},t.prototype.fusedBatchMatMul=function(e){var r=e.a,i=e.b,o=e.transposeA,s=e.transposeB,u=e.bias,l=e.activation,d=e.preluActivationWeights,A=o?r.shape[2]:r.shape[1],O=s?i.shape[1]:i.shape[2],D=r.shape[0],H=rr(r.dtype,i.dtype),te=u!=null,se=d!=null,ae=l?Fa(l,!0):null,ue=new Bs(r.shape,[D,A,O],o,s,te,ae,se),ye=[r,i];return u&&ye.push(u),d&&ye.push(d),this.compileAndRun(ue,ye,H)},t.prototype.multiply=function(e,r){if(e.dtype==="complex64"){var i=this.texData.get(e.dataId),o=this.texData.get(r.dataId),s=new Bl(kp,e.shape,r.shape),u=new Bl(jp,e.shape,r.shape),l=[this.makeComplexComponentTensorInfo(e,i.complexTensors.real),this.makeComplexComponentTensorInfo(e,i.complexTensors.imag),this.makeComplexComponentTensorInfo(r,o.complexTensors.real),this.makeComplexComponentTensorInfo(r,o.complexTensors.imag)],d=this.compileAndRun(s,l),A=this.compileAndRun(u,l),O=this.complex(d,A);return d.dispose(),A.dispose(),O}if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.multiply(e,r);if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,Ml,e.dtype);var D=new vn(Ml,e.shape,r.shape);return this.compileAndRun(D,[e,r],e.dtype)},t.prototype.batchNormalization=function(e,r,i,o,s,u){var l=[e,r,i],d=null;u!=null&&(d=u.shape,l.push(u));var A=null;if(s!=null&&(A=s.shape,l.push(s)),M().getBool("WEBGL_PACK_NORMALIZATION")){var O=new Op(e.shape,r.shape,i.shape,d,A,o);return this.compileAndRun(O,l)}var D=new Rp(e.shape,r.shape,i.shape,d,A,o);return this.compileAndRun(D,l)},t.prototype.localResponseNormalization4D=function(e,r,i,o,s){var u=M().getBool("WEBGL_PACK_NORMALIZATION")?new lh(e.shape,r,i,o,s):new sh(e.shape,r,i,o,s);return this.compileAndRun(u,[e])},t.prototype.LRNGrad=function(e,r,i,o,s,u,l){var d=new uh(r.shape,o,s,u,l);return this.compileAndRun(d,[r,i,e])},t.prototype.tile=function(e,r){if(e.dtype==="string"){var i=this.readSync(e.dataId).map(function(s){return st(s)});return Ol(nr(e.shape,e.dtype,i),r)}var o=new Dh(e.shape,r);return this.compileAndRun(o,[e])},t.prototype.pad=function(e,r,i){var o=M().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new mh(e.shape,r,i):new vh(e.shape,r,i);return this.compileAndRun(o,[e])},t.prototype.transpose=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.transpose(e,r);var i=M().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Bh(e.shape,r):new Ph(e.shape,r);return this.compileAndRun(i,[e])},t.prototype.gather=function(e,r,i){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.gather(e,r,i);var o=new nh(e.shape,r.size,i);return this.compileAndRun(o,[e,r])},t.prototype.batchToSpaceND=function(e,r,i){ee(e.rank<=4,function(){return"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"});var o=r.reduce(function(O,D){return O*D}),s=Sa(e.shape,r,o),u=Ia(s.length,r.length),l=Ta(e.shape,r,o),d=ml(i,r.length),A=gl(l,i,r.length);return e.reshape(s).transpose(u).reshape(l).slice(d,A)},t.prototype.spaceToBatchND=function(e,r,i){ee(e.rank<=4,function(){return"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"});var o=r.reduce(function(D,H){return D*H}),s=[[0,0]];s.push.apply(s,i);for(var u=1+r.length;u<e.shape.length;++u)s.push([0,0]);var l=e.pad(s),d=Sa(l.shape,r,o,!1),A=Ia(d.length,r.length,!1),O=Ta(l.shape,r,o,!1);return l.reshape(d).transpose(A).reshape(O)},t.prototype.reduce=function(e,r,i){var o=e.shape[0],s=e.shape[1],u=Ra(s),l=new gh({windowSize:u,inSize:s,batchSize:o},r),d=this.compileAndRun(l,[e],i);return d.shape[1]===1?d:this.reduce(d,r,i)},t.prototype.argReduce=function(e,r,i){i===void 0&&(i=null);var o=e.shape[0],s=e.shape[1];i!=null&&(o=i.shape[0],s=i.shape[1]);var u=Ra(s),l=new bp({windowSize:u,inSize:s,batchSize:o},r,i==null),d=[e];i!=null&&d.push(i);var A=this.compileAndRun(l,d,"int32");return A.shape[1]===1?A:this.argReduce(e,r,A)},t.prototype.argReducePacked=function(e,r,i){i===void 0&&(i=null);var o=i!=null?i.shape:e.shape,s=Ra(o[o.length-1]),u=new Sp(o,s,r,i==null),l=i==null?[e]:[e,i],d=this.compileAndRun(u,l,"int32");return d.rank===e.rank?this.argReducePacked(e,r,d):d},t.prototype.sum=function(e,r){It("sum",r,e.rank);var i=yn(e.shape,r),o=i[0],s=ce(i[1]),u=e.as2D(-1,s),l=Wr(e.dtype);return this.reduce(u,"sum",l).reshape(o)},t.prototype.prod=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.prod(e,r);var i=yn(e.shape,r),o=i[0],s=ce(i[1]),u=e.as2D(-1,s),l=Wr(e.dtype);return this.reduce(u,"prod",l).reshape(o)},t.prototype.unsortedSegmentSum=function(e,r,i){var o=0,s=Vt([o],e.rank),u=e;s!=null&&(u=e.transpose(s),o=Pr(1,e.rank)[0]);var l=function(H,te,se){for(var ae=[],ue=H.length,ye=0;ye<ue;ye++)ye!==te?ae.push(H[ye]):ae.push(se);return ae}(u.shape,o,i),d=ce([u.shape[o]]),A=u.as2D(-1,d),O=Wr(e.dtype),D=this.segOpCompute(A,"unsortedSegmentSum",r,O,i).reshape(l);return s!=null&&(D=D.transpose(Qr(s))),D},t.prototype.segOpCompute=function(e,r,i,o,s){var u=e.shape[0],l=e.shape[1],d=function(D,H){var te,se=!1;for(D<=bs?(te=D,se=!0):te=Qe(D,Math.floor(Math.sqrt(D)));!se;)te>H||te===D?se=!0:te=Qe(D,te+1);return te}(l,s),A=new Ih({windowSize:d,inSize:l,batchSize:u,numSegments:s},r),O=this.compileAndRun(A,[e,i],o);return O.shape[1]===s?O:(i=Ea(0,s).tile([l/d]),this.segOpCompute(O,r,i,o,s))},t.prototype.argMinMaxReduce=function(e,r,i){var o=[r];if(It("arg"+i.charAt(0).toUpperCase()+i.slice(1),o,e.rank),!M().getBool("WEBGL_PACK_REDUCE")||e.rank<=2){var s=yn(e.shape,o),u=s[0],l=ce(s[1]),d=e.as2D(-1,l);return this.argReduce(d,i).reshape(u)}return this.argReducePacked(e,i)},t.prototype.argMin=function(e,r){return this.argMinMaxReduce(e,r,"min")},t.prototype.argMax=function(e,r){return this.argMinMaxReduce(e,r,"max")},t.prototype.cumsum=function(e,r,i,o){if(r!==e.rank-1)throw new Error("WebGL cumsum shader expects an inner-most axis="+(e.rank-1)+" but got axis="+r);var s=new Gp(e.shape,i,o);return this.compileAndRun(s,[e])},t.prototype.equal=function(e,r){if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(equal(a, b));
`,"bool");var i=new vn("return float(a == b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.notEqual=function(e,r){if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(notEqual(a, b));
`,"bool");var i=new vn("return float(a != b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.less=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.less(e,r);if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(lessThan(a, b));
`,"bool");var i=new vn("return float(a < b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.lessEqual=function(e,r){if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(lessThanEqual(a, b));
`,"bool");var i=new vn("return float(a <= b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.greater=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.greater(e,r);if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(greaterThan(a, b));
`,"bool");var i=new vn("return float(a > b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.greaterEqual=function(e,r){if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(greaterThanEqual(a, b));
`,"bool");var i=new vn("return float(a >= b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.logicalNot=function(e){var r=new sr(e.shape,"return float(!(x >= 1.0));");return this.compileAndRun(r,[e])},t.prototype.logicalAnd=function(e,r){if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(
vec4(greaterThanEqual(a, vec4(1.0))) *
vec4(greaterThanEqual(b, vec4(1.0))));
`,"bool");var i=new vn("return float(a >= 1.0 && b >= 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.logicalOr=function(e,r){if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return min(
vec4(greaterThanEqual(a, vec4(1.0))) +
vec4(greaterThanEqual(b, vec4(1.0))),
vec4(1.0));
`,"bool");var i=new vn("return float(a >= 1.0 || b >= 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.select=function(e,r,i){var o=new Th(e.rank,r.shape,r.rank);return this.compileAndRun(o,[e,r,i],rr(r.dtype,i.dtype))},t.prototype.where=function(e){xi("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");var r=e.dataSync();return ks(e.shape,r)},t.prototype.topk=function(e,r,i){return kl(e.dataSync(),e.shape,e.dtype,r)},t.prototype.min=function(e,r){It("min",r,e.rank);var i=yn(e.shape,r),o=i[0],s=ce(i[1]),u=e.as2D(-1,s);return this.reduce(u,"min",u.dtype).reshape(o)},t.prototype.minimum=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.minimum(e,r);var i=M().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Qi(`
vec4 result = vec4(min(a, b));
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
result.r = isNaN.r > 0. ? NAN : result.r;
result.g = isNaN.g > 0. ? NAN : result.g;
result.b = isNaN.b > 0. ? NAN : result.b;
result.a = isNaN.a > 0. ? NAN : result.a;
return result;
`,e.shape,r.shape):new vn(`
if (isnan(a)) return a;
if (isnan(b)) return b;
return min(a, b);
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.mod=function(e,r){var i=M().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Qi(`
vec4 result = mod(a, b);
vec4 isNaN = vec4(equal(b, vec4(0.0)));
result.r = isNaN.r > 0. ? NAN : result.r;
result.g = isNaN.g > 0. ? NAN : result.g;
result.b = isNaN.b > 0. ? NAN : result.b;
result.a = isNaN.a > 0. ? NAN : result.a;
return result;
`,e.shape,r.shape):new vn(`if (b == 0.0) return NAN;
return mod(a, b);`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.max=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.max(e,r);It("max",r,e.rank);var i=yn(e.shape,r),o=i[0],s=ce(i[1]),u=e.as2D(-1,s);return this.reduce(u,"max",u.dtype).reshape(o)},t.prototype.maximum=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.maximum(e,r);var i=M().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Qi(`
vec4 result = vec4(max(a, b));
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
result.r = isNaN.r > 0. ? NAN : result.r;
result.g = isNaN.g > 0. ? NAN : result.g;
result.b = isNaN.b > 0. ? NAN : result.b;
result.a = isNaN.a > 0. ? NAN : result.a;
return result;
`,e.shape,r.shape):new vn(`
if (isnan(a)) return a;
if (isnan(b)) return b;
return max(a, b);
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.all=function(e,r){It("all",r,e.rank);var i=yn(e.shape,r),o=i[0],s=ce(i[1]),u=e.as2D(-1,s);return this.reduce(u,"all",u.dtype).reshape(o)},t.prototype.any=function(e,r){It("any",r,e.rank);var i=yn(e.shape,r),o=i[0],s=ce(i[1]),u=e.as2D(-1,s);return this.reduce(u,"any",u.dtype).reshape(o)},t.prototype.realDivide=function(e,r){if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
// vec4 one = vec4(equal(a, b));
// return one + (vec4(1.0) - one) * a / b;
vec4 result = a / b;
if(a.x == b.x) {
result.x = 1.;
}
if(a.y == b.y) {
result.y = 1.;
}
if(a.z == b.z) {
result.z = 1.;
}
if(a.w == b.w) {
result.w = 1.;
}
return result;
`,"float32",!0);var i=new vn(`
if (a == b) {
return 1.0;
};
return a / b;`,e.shape,r.shape);return this.compileAndRun(i,[e,r],"float32")},t.prototype.floorDiv=function(e,r){if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
ivec4 ia = round(a);
ivec4 ib = round(b);
bvec4 cond = notEqual(ib, ivec4(0));
ivec4 result = ivec4(0);
vec4 s = sign(a) * sign(b);
// Windows (D3D) wants guaranteed non-zero int division at compile-time.
if (cond[0]) {
result[0] = idiv(ia[0], ib[0], s[0]);
}
if (cond[1]) {
result[1] = idiv(ia[1], ib[1], s[1]);
}
if (cond[2]) {
result[2] = idiv(ia[2], ib[2], s[2]);
}
if (cond[3]) {
result[3] = idiv(ia[3], ib[3], s[3]);
}
return vec4(result);
`,"int32");var i=new vn(`
float s = sign(a) * sign(b);
int ia = round(a);
int ib = round(b);
if (ib != 0) {
// Windows (D3D) wants guaranteed non-zero int division at compile-time.
return float(idiv(ia, ib, s));
} else {
return NAN;
}
`,e.shape,r.shape);return this.compileAndRun(i,[e,r],"int32")},t.prototype.add=function(e,r){if(e.dtype==="complex64"&&r.dtype==="complex64")return this.complexSeparableBinaryOp(e,r,Ds);if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.add(e,r);var i=rr(e.dtype,r.dtype);if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,Ds,i);var o=new vn(Ds,e.shape,r.shape);return this.compileAndRun(o,[e,r],i)},t.prototype.packedUnaryOp=function(e,r,i){var o=new la(e.shape,r);return this.compileAndRun(o,[e],i)},t.prototype.packedBinaryOp=function(e,r,i,o,s){s===void 0&&(s=!1);var u=new Qi(i,e.shape,r.shape,s);return this.compileAndRun(u,[e,r],o)},t.prototype.complexSeparableBinaryOp=function(e,r,i){var o=this,s=this.texData.get(e.dataId),u=this.texData.get(r.dataId),l=[[s.complexTensors.real,u.complexTensors.real],[s.complexTensors.imag,u.complexTensors.imag]].map(function(D){var H=D[0],te=D[1],se=o.makeComplexComponentTensorInfo(e,H),ae=o.makeComplexComponentTensorInfo(r,te),ue=new vn(i,e.shape,r.shape);return o.compileAndRun(ue,[se,ae],rr(H.dtype,te.dtype))}),d=l[0],A=l[1],O=this.complex(d,A);return d.dispose(),A.dispose(),O},t.prototype.makeComplexComponentTensorInfo=function(e,r){return{dataId:r.dataId,dtype:r.dtype,shape:e.shape}},t.prototype.addN=function(e){if(e.length===1)return e[0];if(e.length>M().get("WEBGL_MAX_TEXTURES_IN_SHADER")){var r=Math.floor(e.length/2),i=this.addN(e.slice(0,r)),o=this.addN(e.slice(r));return this.addN([i,o])}var s=e.map(function(d){return d.dtype}).reduce(function(d,A){return rr(d,A)}),u=e.map(function(d){return d.shape}),l=M().getBool("WEBGL_PACK")?new yp(e[0].shape,u):new gp(e[0].shape,u);return this.compileAndRun(l,e,s)},t.prototype.subtract=function(e,r){if(e.dtype==="complex64"&&r.dtype==="complex64")return this.complexSeparableBinaryOp(e,r,Ps);if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.subtract(e,r);var i=rr(e.dtype,r.dtype);if(M().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,Ps,e.dtype);var o=new vn(Ps,e.shape,r.shape);return this.compileAndRun(o,[e,r],i)},t.prototype.pow=function(e,r){var i=M().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Qi(`
// isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.
vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));
vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);
vec4 result = multiplier * pow(abs(a), b);
// Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS
bvec4 isExpZero = equal(b, vec4(0.0));
result.r = isExpZero.r ? 1.0 : result.r;
result.g = isExpZero.g ? 1.0 : result.g;
result.b = isExpZero.b ? 1.0 : result.b;
result.a = isExpZero.a ? 1.0 : result.a;
vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));
result.r = isNaN.r > 0. ? NAN : result.r;
result.g = isNaN.g > 0. ? NAN : result.g;
result.b = isNaN.b > 0. ? NAN : result.b;
result.a = isNaN.a > 0. ? NAN : result.a;
return result;
`,e.shape,r.shape):new vn(`
if(a < 0.0 && floor(b) < b){
return NAN;
}
if (b == 0.0) {
return 1.0;
}
return (round(mod(b, 2.0)) != 1) ?
pow(abs(a), b) : sign(a) * pow(abs(a), b);
`,e.shape,r.shape),o=rr(e.dtype,r.dtype);return this.compileAndRun(i,[e,r],o)},t.prototype.ceil=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.ceil(e);if(M().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,vc,e.dtype);var r=new sr(e.shape,vc);return this.compileAndRun(r,[e])},t.prototype.floor=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.floor(e);if(M().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,mc,e.dtype);var r=new sr(e.shape,mc);return this.compileAndRun(r,[e])},t.prototype.sign=function(e){var r=new sr(e.shape,`
if (isnan(x)) { return 0.0; }
return sign(x);
`);return this.compileAndRun(r,[e])},t.prototype.isNaN=function(e){var r=new sr(e.shape,"return float(isnan(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.isInf=function(e){var r=new sr(e.shape,"return float(isinf(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.isFinite=function(e){var r=new sr(e.shape,"return float(!isnan(x) && !isinf(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.round=function(e){var r=new sr(e.shape,`
// OpenGL ES does not support round function.
// The algorithm is based on banker's rounding.
float base = floor(x);
if ((x - base) < 0.5) {
return floor(x);
} else if ((x - base) > 0.5) {
return ceil(x);
} else {
if (mod(base, 2.0) == 0.0) {
return base;
} else {
return base + 1.0;
}
}
`);return this.compileAndRun(r,[e])},t.prototype.exp=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.exp(e);if(M().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,gc,e.dtype);var r=new sr(e.shape,gc);return this.compileAndRun(r,[e])},t.prototype.expm1=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.expm1(e);if(M().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,yc,e.dtype);var r=new sr(e.shape,yc);return this.compileAndRun(r,[e])},t.prototype.softmax=function(e,r){var i=be([r],e.shape),o=this.max(e,i),s=On(o.shape,i),u=this.subtract(e,o.reshape(s)),l=this.exp(u),d=this.sum(l,i).reshape(s);return this.realDivide(l,d)},t.prototype.log=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.log(e);if(M().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,`
vec4 result = log(x);
vec4 isNaN = vec4(lessThan(x, vec4(0.0)));
result.r = isNaN.r == 1.0 ? NAN : result.r;
result.g = isNaN.g == 1.0 ? NAN : result.g;
result.b = isNaN.b == 1.0 ? NAN : result.b;
result.a = isNaN.a == 1.0 ? NAN : result.a;
return result;
`,e.dtype);var r=new sr(e.shape,`if (x < 0.0) return NAN;
return log(x);`);return this.compileAndRun(r,[e])},t.prototype.log1p=function(e){var r=new sr(e.shape,"return log(1.0 + x);");return this.compileAndRun(r,[e])},t.prototype.sqrt=function(e){var r=new sr(e.shape,"return sqrt(x);");return this.compileAndRun(r,[e])},t.prototype.rsqrt=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.rsqrt(e);var r=new sr(e.shape,"return inversesqrt(x);");return this.compileAndRun(r,[e])},t.prototype.reciprocal=function(e){var r=new sr(e.shape,"return 1.0 / x;");return this.compileAndRun(r,[e])},t.prototype.relu=function(e){var r;return r=M().getBool("WEBGL_PACK")?new la(e.shape,bc):new sr(e.shape,fc),this.compileAndRun(r,[e])},t.prototype.relu6=function(e){var r;return r=M().getBool("WEBGL_PACK")?new la(e.shape,wc):new sr(e.shape,dc),this.compileAndRun(r,[e])},t.prototype.prelu=function(e,r){var i=M().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Qi(_l,e.shape,r.shape):new vn(Nl,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.elu=function(e){if(M().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,Ac,e.dtype);var r=new sr(e.shape,pc);return this.compileAndRun(r,[e])},t.prototype.eluDer=function(e,r){var i=M().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Qi(`
vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));
return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));
`,e.shape,r.shape):new vn("return (b >= 1.0) ? a : a * (b + 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.selu=function(e){var r=new sr(e.shape,Nh);return this.compileAndRun(r,[e])},t.prototype.int=function(e){var r=new sr(e.shape,"return float(int(x));");return this.compileAndRun(r,[e],"int32")},t.prototype.clip=function(e,r,i){var o,s=(o=M().getBool("WEBGL_PACK_CLIP")?new Pp(e.shape):new Dp(e.shape)).getCustomSetupFunc(r,i);return this.compileAndRun(o,[e],null,s)},t.prototype.abs=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.abs(e);if(M().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,cc,e.dtype);var r=new sr(e.shape,cc);return this.compileAndRun(r,[e])},t.prototype.complexAbs=function(e){var r=this.texData.get(e.dataId),i=new Bp(e.shape),o=[this.makeComplexComponentTensorInfo(e,r.complexTensors.real),this.makeComplexComponentTensorInfo(e,r.complexTensors.imag)];return this.compileAndRun(i,o)},t.prototype.sigmoid=function(e){var r=new sr(e.shape,"return 1.0 / (1.0 + exp(-1.0 * x));");return this.compileAndRun(r,[e])},t.prototype.softplus=function(e){var r=new sr(e.shape,`
float epsilon = 1.1920928955078125e-7;
float threshold = log(epsilon) + 2.0;
bool too_large = x > -threshold;
bool too_small = x < threshold;
float result;
float exp_x = exp(x);
if (too_large){
result = x;
}
else if (too_small){
result = exp_x;
}
else{
result = log(exp_x + 1.0);
}
return result;
`);return this.compileAndRun(r,[e])},t.prototype.sin=function(e){var r=new sr(e.shape,_h);return this.compileAndRun(r,[e])},t.prototype.cos=function(e){var r=new sr(e.shape,Fh);return this.compileAndRun(r,[e])},t.prototype.tan=function(e){var r=new sr(e.shape,"return tan(x);");return this.compileAndRun(r,[e])},t.prototype.asin=function(e){var r=new sr(e.shape,Lh);return this.compileAndRun(r,[e])},t.prototype.acos=function(e){var r=new sr(e.shape,Uh);return this.compileAndRun(r,[e])},t.prototype.atan=function(e){var r=new sr(e.shape,Wh);return this.compileAndRun(r,[e])},t.prototype.atan2=function(e,r){var i=M().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Qi(`
vec4 result = atan(a, b);
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
result.r = isNaN.r > 0. ? NAN : result.r;
result.g = isNaN.g > 0. ? NAN : result.g;
result.b = isNaN.b > 0. ? NAN : result.b;
result.a = isNaN.a > 0. ? NAN : result.a;
return result;
`,e.shape,r.shape):new vn(`
if (isnan(a)) return a;
if (isnan(b)) return b;
return atan(a, b);
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.sinh=function(e){var r=new sr(e.shape,`
float e2x = exp(x);
return (e2x - 1.0 / e2x) / 2.0;
`);return this.compileAndRun(r,[e])},t.prototype.cosh=function(e){var r=new sr(e.shape,`
float e2x = exp(-x);
return (e2x + 1.0 / e2x) / 2.0;
`);return this.compileAndRun(r,[e])},t.prototype.tanh=function(e){var r=new sr(e.shape,`
float e2x = exp(-2.0 * abs(x));
return sign(x) * (1.0 - e2x) / (1.0 + e2x);
`);return this.compileAndRun(r,[e])},t.prototype.asinh=function(e){var r=new sr(e.shape,zh);return this.compileAndRun(r,[e])},t.prototype.acosh=function(e){var r=new sr(e.shape,Hh);return this.compileAndRun(r,[e])},t.prototype.atanh=function(e){var r=new sr(e.shape,Vh);return this.compileAndRun(r,[e])},t.prototype.erf=function(e){var r=new sr(e.shape,`
// Error function is calculated approximately with elementary function.
// See "Handbook of Mathematical Functions with Formulas,
// Graphs, and Mathematical Tables", Abramowitz and Stegun.
float p = 0.3275911;
float a1 = 0.254829592;
float a2 = -0.284496736;
float a3 = 1.421413741;
float a4 = -1.453152027;
float a5 = 1.061405429;
float sign = sign(x);
x = abs(x);
float t = 1.0 / (1.0 + p * x);
return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));
`);return this.compileAndRun(r,[e])},t.prototype.step=function(e,r){var i=new sr(e.shape,function(o){return o===void 0&&(o=0),Ci+`
return x > 0.0 ? 1.0 : float(`+o+`);
`}(r));return this.compileAndRun(i,[e])},t.prototype.conv2dByMatMul=function(e,r,i,o,s,u){var l=e.shape,d=this.texData.get(e.dataId),A=i.inChannels,O=l[0]*l[1]*l[2],D=i.outChannels,H=i.dataFormat==="channelsLast",te=(O===1||D===1)&&A>1e3,se=l[2]%2!=0&&!!d.isPacked;if(te||!M().getBool("WEBGL_LAZILY_UNPACK")||!M().getBool("WEBGL_PACK_BINARY_OPERATIONS")||!se){var ae=H?l[0]*l[1]*l[2]:l[0]*l[2]*l[3],ue=this.reshape(e,[1,ae,i.inChannels]),ye=this.reshape(r,[1,i.inChannels,i.outChannels]);return this.reshape(this.fusedBatchMatMul({a:ue,b:ye,transposeA:!1,transposeB:!1,bias:o,activation:s,preluActivationWeights:u}),i.outShape)}var we=H?l[0]*l[1]*(l[2]+1):l[0]*l[2]*(l[3]+1),ve={dataId:e.dataId,shape:[1,we,i.inChannels],dtype:e.dtype},Ee=d.shape;d.shape=d.shape.slice(),d.shape[d.shape.length-2]++,ee(ni(d.shape,ve.shape),function(){return"packed reshape "+d.shape+" to "+ve.shape+" isn't free"});var Te=this.reshape(r,[1,i.inChannels,i.outChannels]),Fe=this.fusedBatchMatMul({a:ve,b:Te,transposeA:!1,transposeB:!1,bias:o,activation:s,preluActivationWeights:u}),Le=this.texData.get(Fe.dataId);return ee(Le.isPacked,function(){return"batchMatMul result is expected to be packed"}),d.shape=Ee,Le.shape=i.outShape,ze.makeTensorFromDataId(Fe.dataId,i.outShape,Fe.dtype)},t.prototype.conv2dWithIm2Row=function(e,r,i,o,s,u){var l=i.filterWidth,d=i.filterHeight,A=i.inChannels,O=i.outWidth,D=i.outHeight,H=i.dataFormat==="channelsLast",te=l*d*A,se=D*O,ae=[te,se],ue=e.squeeze([0]),ye=r.reshape([1,te,-1]),we=new ah(ae,ue.shape,i),ve=this.compileAndRun(we,[ue]).reshape([1,ae[0],ae[1]]),Ee=o!=null,Te=u!=null,Fe=s?Fa(s,!0):null,Le=new Bs(ve.shape,[1,se,i.outChannels],!0,!1,Ee,Fe,Te),Me=[ve,ye];o&&Me.push(o),Te&&Me.push(u);var Ne=this.compileAndRun(Le,Me);return H?Ne.reshape([1,D,O,i.outChannels]):Ne.reshape([1,i.outChannels,D,O])},t.prototype.fusedConv2d=function(e){var r=e.input,i=e.filter,o=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights;if(o.filterHeight===1&&o.filterWidth===1&&o.dilationHeight===1&&o.dilationWidth===1&&o.strideHeight===1&&o.strideWidth===1&&(o.padInfo.type==="SAME"||o.padInfo.type==="VALID"))return this.conv2dByMatMul(r,i,o,s,u,l);if(M().getBool("WEBGL_CONV_IM2COL")&&r.shape[0]===1)return this.conv2dWithIm2Row(r,i,o,s,u,l);var d=s!=null,A=l!=null,O=u?Fa(u,!1):null,D=new Fl(o,d,O,A),H=[r,i];return s&&H.push(s),l&&H.push(l),this.compileAndRun(D,H)},t.prototype.conv2d=function(e,r,i){if(i.filterHeight===1&&i.filterWidth===1&&i.dilationHeight===1&&i.dilationWidth===1&&i.strideHeight===1&&i.strideWidth===1&&(i.padInfo.type==="SAME"||i.padInfo.type==="VALID"))return this.conv2dByMatMul(e,r,i);if(M().getBool("WEBGL_CONV_IM2COL")&&e.shape[0]===1)return this.conv2dWithIm2Row(e,r,i);var o=new Fl(i);return this.compileAndRun(o,[e,r])},t.prototype.conv2dDerInput=function(e,r,i){var o=new Fp(i);return this.compileAndRun(o,[e,r])},t.prototype.conv2dDerFilter=function(e,r,i){var o=new _p(i);return this.compileAndRun(o,[e,r])},t.prototype.fusedDepthwiseConv2D=function(e){var r,i=e.input,o=e.filter,s=e.convInfo,u=e.bias,l=e.activation,d=e.preluActivationWeights,A=M().getBool("WEBGL_PACK_DEPTHWISECONV")&&s.strideWidth<=2&&s.outChannels/s.inChannels==1,O=l?Fa(l,A):null,D=[i,o],H=u!=null,te=d!=null;return H&&D.push(u),te&&D.push(d),A?(r=new Ul(s,H,O,te),this.compileAndRun(r,D)):(r=new Ll(s,H,O,te),this.compileAndRun(r,D))},t.prototype.depthwiseConv2D=function(e,r,i){var o;return M().getBool("WEBGL_PACK_DEPTHWISECONV")&&i.strideWidth<=2&&i.outChannels/i.inChannels==1?(o=new Ul(i),this.compileAndRun(o,[e,r])):(o=new Ll(i),this.compileAndRun(o,[e,r]))},t.prototype.depthwiseConv2DDerInput=function(e,r,i){var o=new zp(i);return this.compileAndRun(o,[e,r])},t.prototype.depthwiseConv2DDerFilter=function(e,r,i){var o=new Wp(i);return this.compileAndRun(o,[e,r])},t.prototype.conv3d=function(e,r,i){var o=new Hp(i);return this.compileAndRun(o,[e,r])},t.prototype.conv3dDerInput=function(e,r,i){var o=new Up(i);return this.compileAndRun(o,[e,r])},t.prototype.conv3dDerFilter=function(e,r,i){var o=new Lp(i);return this.compileAndRun(o,[e,r])},t.prototype.maxPool=function(e,r){var i=new Ms(r,"max",!1);return this.compileAndRun(i,[e])},t.prototype.avgPool=function(e,r){var i=new Ms(r,"avg",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.maxPoolBackprop=function(e,r,i,o){var s=new Ms(o,"max",!0),u=this.compileAndRun(s,[r]),l=new ch(o),d=this.compileAndRun(l,[e,u],r.dtype);return u.dispose(),d},t.prototype.avgPoolBackprop=function(e,r,i){var o=new Ip(i);return this.compileAndRun(o,[e],r.dtype)},t.prototype.cast=function(e,r){return Ss(e,r,this)},t.prototype.unstack=function(e,r){for(var i=e.shape[r],o=new Array(e.rank-1),s=0,u=0;u<e.rank;u++)u!==r&&(o[s++]=e.shape[u]);var l=new Array(e.rank).fill(0),d=e.shape.slice();d[r]=1;var A=new Array(i);for(u=0;u<A.length;u++)l[r]=u,A[u]=this.slice(e,l,d).reshape(o);return A},t.prototype.avgPool3d=function(e,r){var i=new Ns(r,"avg",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.avgPool3dBackprop=function(e,r,i){var o=new Tp(i);return this.compileAndRun(o,[e],r.dtype)},t.prototype.maxPool3d=function(e,r){var i=new Ns(r,"max",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.maxPool3dBackprop=function(e,r,i,o){var s=new Ns(o,"max",!0),u=this.compileAndRun(s,[r]),l=new fh(o),d=this.compileAndRun(l,[e,u],r.dtype);return u.dispose(),d},t.prototype.reshape=function(e,r){var i=this.texData.get(e.dataId);if(i.isPacked&&!ni(e.shape,r)&&(i.texture===null||!ni(i.shape,r))){var o=this.packedReshape(e,r);return ze.makeTensorFromDataId(o.dataId,o.shape,o.dtype)}return Ba(e,r)},t.prototype.resizeBilinear=function(e,r,i,o){var s=M().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new Ah(e.shape,r,i,o):new wh(e.shape,r,i,o);return this.compileAndRun(s,[e],"float32")},t.prototype.resizeBilinearBackprop=function(e,r,i){var o=new bh(e,r,i);return this.compileAndRun(o,[e])},t.prototype.resizeNearestNeighbor=function(e,r,i,o){var s=new Eh(e.shape,r,i,o);return this.compileAndRun(s,[e])},t.prototype.resizeNearestNeighborBackprop=function(e,r,i){var o=new xh(e,r,i);return this.compileAndRun(o,[e])},t.prototype.multinomial=function(e,r,i,o){var s=r?e:Vi(e),u=s.shape[0],l=s.shape[1],d=new dh(u,l,i),A=d.getCustomSetupFunc(o);return this.compileAndRun(d,[s],"int32",A)},t.prototype.oneHot=function(e,r,i,o){var s=new ph(e.size,r,i,o);return this.compileAndRun(s,[e])},t.prototype.diag=function(e){var r=new Zp(e.size);return this.compileAndRun(r,[e])},t.prototype.nonMaxSuppression=function(e,r,i,o,s){return xi("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"),Rs(e.dataSync(),r.dataSync(),i,o,s)},t.prototype.cropAndResize=function(e,r,i,o,s,u){var l=new Vp(e.shape,r.shape,o,s,u);return this.compileAndRun(l,[e,r,i],"float32")},t.prototype.depthToSpace=function(e,r,i){ee(r>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+r});var o=e.shape[0],s=i==="NHWC"?e.shape[1]:e.shape[2],u=i==="NHWC"?e.shape[2]:e.shape[3],l=i==="NHWC"?e.shape[3]:e.shape[1],d=s*r,A=u*r,O=l/(r*r),D=new Kp(i==="NHWC"?[o,d,A,O]:[o,O,d,A],r,i);return this.compileAndRun(D,[e])},t.prototype.split=function(e,r,i){return Rl(e,r,i)},t.prototype.scatterND=function(e,r,i){var o=ia(0,e,i),s=o.sliceRank,u=o.numUpdates,l=o.sliceSize,d=o.strides,A=o.outputSize,O=[A/l,l],D=e.reshape([u,s]),H=r.reshape([u,l]);if(A===0)return Ba(Un([]),i);var te=Tt(0),se=new sc(u,s,D.rank,H.rank,d,O);return this.compileAndRun(se,[H,D,te]).reshape(i)},t.prototype.sparseToDense=function(e,r,i,o){var s=ia(0,e,i),u=s.sliceRank,l=s.numUpdates,d=s.strides,A=s.outputSize,O=new sc(l,u,e.rank,r.rank,d,[A,1],!1);return this.compileAndRun(O,[r,e,o]).reshape(i)},t.prototype.fft=function(e){return this.fftImpl(e,!1)},t.prototype.ifft=function(e){return this.fftImpl(e,!0)},t.prototype.fftImpl=function(e,r){var i=this.texData.get(e.dataId),o=new zl(eh,e.shape,r),s=new zl(th,e.shape,r),u=[this.makeComplexComponentTensorInfo(e,i.complexTensors.real),this.makeComplexComponentTensorInfo(e,i.complexTensors.imag)],l=this.compileAndRun(o,u),d=this.compileAndRun(s,u),A=this.complex(l,d).as2D(e.shape[0],e.shape[1]);return l.dispose(),d.dispose(),A},t.prototype.gatherND=function(e,r){var i=r.shape,o=i[i.length-1],s=ys(e,r),u=s[0],l=s[1],d=s[2],A=s[3],O=r.reshape([l,o]),D=e.reshape([e.size/d,d]),H=new ih(o,A,[l,d]);return this.compileAndRun(H,[D,O]).reshape(u)},t.prototype.fill=function(e,r,i){if((i=i||Ue(r))==="string"){var o=Q(i,ce(e));return o.fill(r),ze.makeTensor(o,e,i,this)}var s=new rh(e,r),u=s.getCustomSetupFunc(r);return this.compileAndRun(s,[],i,u)},t.prototype.onesLike=function(e){if(e.dtype==="string")throw new Error("onesLike is not supported under string dtype");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){return this.fill(e.shape,e.dtype==="string"?"":0,e.dtype)},t.prototype.linspace=function(e,r,i){return Is(e,r,i)},t.prototype.makeTensorInfo=function(e,r){var i=this.write(null,e,r);return this.texData.get(i).usage=null,{dataId:i,shape:e,dtype:r}},t.prototype.makeOutput=function(e,r){var i=this.makeTensorInfo(e,r).dataId;return ze.makeTensorFromDataId(i,e,r,this)},t.prototype.unpackTensor=function(e){var r=new Qh(e.shape);return this.runWebGLProgram(r,[e],e.dtype)},t.prototype.packTensor=function(e){var r=new hh(e.shape);return this.runWebGLProgram(r,[e],e.dtype,null,!0)},t.prototype.packedReshape=function(e,r){var i=[Er(e.shape)].concat(Gr(e.shape)),o={dtype:e.dtype,shape:i,dataId:e.dataId},s=[Er(r)].concat(Gr(r)),u=new yh(s,i),l=this.runWebGLProgram(u,[o],e.dtype,null,!0);return{dataId:l.dataId,shape:r,dtype:l.dtype}},t.prototype.decode=function(e){var r,i=this.texData.get(e),o=i.isPacked,s=i.shape,u=i.dtype,l=rn(s);return r=o?new Xp(l):new Qp(l),{dtype:u,shape:s,dataId:this.runWebGLProgram(r,[{shape:l,dtype:u,dataId:e}],u,null,!0).dataId}},t.prototype.runWebGLProgram=function(e,r,i,o,s){var u=this;s===void 0&&(s=!1);var l=this.makeTensorInfo(e.outputShape,i),d=this.texData.get(l.dataId);if(e.packedOutput&&(d.isPacked=!0),e.outPackingScheme===mn.DENSE){var A=at(e.outputShape);d.texShape=A.map(function(we){return 2*we})}if(e.outTexUsage!=null&&(d.usage=e.outTexUsage),ce(l.shape)===0)return d.values=V(l.dtype,0),l;var O=[],D=r.map(function(we){if(we.dtype==="complex64")throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");var ve=u.texData.get(we.dataId);if(ve.texture==null){if(!e.packedInputs&&ce(we.shape)<=M().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:we.shape,texData:null,isUniform:!0,uniformValues:ve.values};e.packedInputs&&(ve.isPacked=!0,ve.shape=we.shape)}else if(!!ve.isPacked!=!!e.packedInputs)we=ve.isPacked?u.unpackTensor(we):u.packTensor(we),O.push(we),ve=u.texData.get(we.dataId);else if(ve.isPacked&&!ni(ve.shape,we.shape)){var Ee=we,Te=we.shape;we.shape=ve.shape,we=u.packedReshape(we,Te),O.push(we),ve=u.texData.get(we.dataId),Ee.shape=Te}return u.uploadToGPU(we.dataId),{shape:we.shape,texData:ve,isUniform:!1}});this.uploadToGPU(l.dataId);var H,te={shape:l.shape,texData:d,isUniform:!1},se=function(we,ve,Ee){var Te="";ve.concat(Ee).forEach(function(Me){var Ne=Me.texData!=null&&Me.texData.slice!=null&&Me.texData.slice.flatOffset>0,Ze=Me.isUniform?"uniform":Me.texData.texShape;Te+=Me.shape+"_"+Ze+"_"+Ne});var Fe=we.userCode,Le=we.constructor.name;return Le+="_"+Te+"_"+Fe}(e,D,te),ae=this.getAndSaveBinary(se,function(){return function(we,ve,Ee,Te){var Fe=ve.userCode,Le=Ee.map(function(ht,At){var ft={logicalShape:ht.shape,texShape:ht.isUniform?null:ht.texData.texShape,isUniform:ht.isUniform,isPacked:!ht.isUniform&&ht.texData.isPacked,flatOffset:null};return ht.texData!=null&&ht.texData.slice!=null&&ht.texData.slice.flatOffset>0&&(ft.flatOffset=ht.texData.slice.flatOffset),{name:ve.variableNames[At],shapeInfo:ft}}),Me=Le.map(function(ht){return ht.shapeInfo}),Ne={logicalShape:Te.shape,texShape:Te.texData.texShape,isUniform:!1,isPacked:Te.texData.isPacked,flatOffset:null},Ze=wp(Le,Ne,Fe,ve.packedInputs),Xe=we.createProgram(Ze),qe=null,tt=we.getUniformLocation(Xe,"NAN",!1);M().getNumber("WEBGL_VERSION")===1&&(qe=we.getUniformLocation(Xe,"INFINITY",!1));for(var ct={},bt=0;bt<ve.variableNames.length;bt++){var mt=ve.variableNames[bt];ct[mt]=we.getUniformLocation(Xe,mt,!1),ct["offset"+mt]=we.getUniformLocation(Xe,"offset"+mt,!1)}return{program:ve,source:Ze,webGLProgram:Xe,uniformLocations:ct,inShapeInfos:Me,outShapeInfo:Ne,infLoc:qe,nanLoc:tt}}(u.gpgpu,e,D,te)}),ue=this.activeTimers!=null;if(ue&&(H=this.startTimer()),function(we,ve,Ee,Te,Fe){ac(ve.inShapeInfos,Ee),ac([ve.outShapeInfo],[Te]);var Le=Te.texData.texture,Me=Te.texData.texShape;Te.texData.isPacked?we.setOutputPackedMatrixTexture(Le,Me[0],Me[1]):we.setOutputMatrixTexture(Le,Me[0],Me[1]),we.setProgram(ve.webGLProgram),M().getNumber("WEBGL_VERSION")===1&&ve.infLoc!==null&&we.gl.uniform1f(ve.infLoc,1/0),ve.nanLoc!==null&&we.gl.uniform1f(ve.nanLoc,NaN),Ee.forEach(function(Ne,Ze){var Xe=ve.program.variableNames[Ze],qe=ve.uniformLocations[Xe],tt=ve.uniformLocations["offset"+Xe];if(qe!=null)if(Ne.isUniform)if(ce(Ne.shape)<2)we.gl.uniform1f(qe,Ne.uniformValues[0]);else{var ct=Ne.uniformValues;ct instanceof Float32Array||(ct=new Float32Array(ct)),we.gl.uniform1fv(qe,ct)}else Ne.texData.slice!=null&&tt!=null&&we.gl.uniform1i(tt,Ne.texData.slice.flatOffset),we.setInputMatrixTexture(Ne.texData.texture,qe,Ze)}),Fe!=null&&Fe(we,ve.webGLProgram),we.executeProgram()}(this.gpgpu,ae,D,te,o),O.forEach(function(we){return u.disposeData(we.dataId)}),ue&&(H=this.endTimer(H),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(H)})),!M().getBool("WEBGL_LAZILY_UNPACK")&&d.isPacked&&s===!1){var ye=this.unpackTensor(l);return this.disposeData(l.dataId),ye}return l},t.prototype.compileAndRun=function(e,r,i,o,s){s===void 0&&(s=!1),i=i||r[0].dtype;var u=this.runWebGLProgram(e,r,i,o,s);return ze.makeTensorFromDataId(u.dataId,u.shape,u.dtype)},t.prototype.getAndSaveBinary=function(e,r){return e in this.binaryCache||(this.binaryCache[e]=r()),this.binaryCache[e]},t.prototype.getTextureManager=function(){return this.textureManager},t.prototype.dispose=function(){var e=this;this.disposed||(M().getBool("IS_TEST")||Object.keys(this.binaryCache).forEach(function(r){e.gpgpu.deleteProgram(e.binaryCache[r].webGLProgram),delete e.binaryCache[r]}),this.textureManager.dispose(),this.canvas!=null&&typeof HTMLCanvasElement!="undefined"&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0)},t.prototype.floatPrecision=function(){var e=this;return this.floatPrecisionValue==null&&(this.floatPrecisionValue=gt(function(){if(!M().get("WEBGL_RENDER_FLOAT32_ENABLED")){var r=M().getBool("DEBUG");M().set("DEBUG",!1);var i=e.abs(Tt(1e-8)).dataSync()[0];if(M().set("DEBUG",r),i>0)return 32}return 16})),this.floatPrecisionValue},t.prototype.epsilon=function(){return this.floatPrecision()===32?1e-7:1e-4},t.prototype.uploadToGPU=function(e){var r,i=this.texData.get(e),o=i.shape,s=i.dtype,u=i.values,l=i.texture,d=i.usage,A=i.isPacked;if(l==null){var O,D=this.activeTimers!=null;D&&(O=_e());var H=i.texShape;if(H==null&&(H=zr(o,A),i.texShape=H),u!=null){var te=rn(o),se=void 0,ae=H[1],ue=H[0],ye=u instanceof Uint8Array;A?(ae=(r=Nt(H[0],H[1]))[0],ue=r[1],se=new qp(te,[ue,ae],ye)):se=new $p(te,[ue,ae],ye);var we=this.makeTensorInfo([ue,ae],s);this.texData.get(we.dataId).usage=ye?He.PIXELS:He.UPLOAD,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(we.dataId),ae,ue,u);var ve=this.runWebGLProgram(se,[we],s,null,!0),Ee=this.texData.get(ve.dataId);i.texture=Ee.texture,i.texShape=Ee.texShape,i.isPacked=Ee.isPacked,i.usage=Ee.usage,this.disposeData(we.dataId),this.texData.delete(ve.dataId),i.values=null,D&&(this.uploadWaitMs+=_e()-O)}else{var Te=this.acquireTexture(H,d,s,A);i.texture=Te}}},t.prototype.convertAndCacheOnCPU=function(e,r){var i=this.texData.get(e),o=i.dtype;return this.releaseGPUData(e),r!=null&&(i.values=function(s,u){if(u==="float32"||u==="complex64")return s;if(u==="int32"||u==="bool"){for(var l=u==="int32"?new Int32Array(s.length):new Uint8Array(s.length),d=0;d<l.length;++d)l[d]=Math.round(s[d]);return l}throw new Error("Unknown dtype "+u)}(r,o)),i.values},t.prototype.acquireTexture=function(e,r,i,o){if(this.numBytesInGPU+=this.computeBytes(e,i),!this.warnedAboutMemory&&this.numBytesInGPU>1024*this.numMBBeforeWarning*1024){var s=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn("High memory usage in GPU: "+s+" MB, most likely due to a memory leak")}return this.textureManager.acquireTexture(e,r,o)},t.prototype.computeBytes=function(e,r){return e[0]*e[1]*z(r)},t}(Cl);tn()&&ze.registerBackend("webgl",function(){return new xc},2);var Kh=Ge({square_:function(n){var t=ke(n,"x","square"),e=[t];return ze.runKernelFunc(function(r,i){return i([t]),r.square(t)},{x:t},null,"Square",{},e,[])}}),ca="SquaredDifference",Ec=Ge({squaredDifference_:function(n,t){var e,r=ke(n,"a","squaredDifference"),i=ke(t,"b","squaredDifference");e=qt(r,i),r=e[0],i=e[1],fr(r.shape,i.shape);var o={a:r,b:i},s=[r,i];return ze.runKernelFunc(function(u,l){var d=u.squaredDifference(r,i);return l([r,i]),d},o,function(u,l){var d=l[0],A=l[1],O=Tt(2);return{a:function(){return u.mul(d.sub(A).mul(O))},b:function(){return u.mul(A.sub(d).mul(O))}}},ca,{},s,[])}}),Zh=Ge({abs_:function(n){var t=ke(n,"x","abs");return t.dtype==="complex64"?ze.runKernelFunc(function(e){return e.complexAbs(t)},{$x:t}):ze.runKernelFunc(function(e,r){var i=e.abs(t);return r([t]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mul(i.toFloat().step(-1))}}},"Abs")}}),Jh=Ge({acos_:function(n){var t=ke(n,"x","acos");return ze.runKernelFunc(function(e,r){var i=e.acos(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(Tt(1).sub(i.toFloat().square()).sqrt()).neg()}}})}}),Yh=Ge({acosh_:function(n){var t=ke(n,"x","acosh");return ze.runKernelFunc(function(e,r){var i=e.acosh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(i.toFloat().square().sub(1).sqrt())}}})}}),$h=Ge({asin_:function(n){var t=ke(n,"x","asin");return ze.runKernelFunc(function(e,r){var i=e.asin(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(Tt(1).sub(i.toFloat().square()).sqrt())}}})}}),qh=Ge({asinh_:function(n){var t=ke(n,"x","asinh");return ze.runKernelFunc(function(e,r){var i=e.asinh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(Tt(1).add(i.toFloat().square()).sqrt())}}})}}),ev=Ge({atan_:function(n){var t=ke(n,"x","atan");return ze.runKernelFunc(function(e,r){var i=e.atan(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.toFloat().square().add(1))}}})}}),tv=Ge({atanh_:function(n){var t=ke(n,"x","atanh");return ze.runKernelFunc(function(e,r){var i=e.atanh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(Tt(1).sub(i.toFloat().square()))}}})}}),rv=Ge({ceil_:function(n){var t=ke(n,"x","ceil");return ze.runKernelFunc(function(e){return e.ceil(t)},{$x:t},function(e){return{$x:function(){return Cr(e)}}})}}),Us=Ge({clipByValue_:function(n,t,e){var r=ke(n,"x","clipByValue");ee(t<=e,function(){return"Error in clip: min ("+t+") must be less than or equal to max ("+e+")."});var i=[r],o={min:t,max:e};return ze.runKernelFunc(function(s,u){var l=s.clip(r,t,e);return u([r]),l},{x:r},function(s,u){var l=u[0];return{x:function(){return s.where(l.greaterEqual(t).logicalAnd(l.lessEqual(e)),Cr(s))}}},"ClipByValue",o,i)}}),nv=Ge({cos_:function(n){var t=ke(n,"x","cos"),e=[t];return ze.runKernelFunc(function(r,i){var o=r.cos(t);return i([t]),o},{x:t},function(r,i){var o=i[0];return{x:function(){return o.toFloat().sin().neg().mul(r)}}},"Cos",{},e)}}),iv=Ge({cosh_:function(n){var t=ke(n,"x","cosh");return ze.runKernelFunc(function(e,r){var i=e.cosh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return i.toFloat().sinh().mulStrict(e)}}})}}),ov=Ge({erf_:function(n){var t=ke(n,"x","erf");return ee(t.dtype==="int32"||t.dtype==="float32",function(){return"Input dtype must be `int32` or `float32`."}),t.dtype==="int32"&&(t=t.toFloat()),ze.runKernelFunc(function(e,r){var i=e.erf(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.square().neg().exp().mul(2/Math.sqrt(Math.PI)))}}})}}),Ws=Ge({exp_:function(n){var t=ke(n,"x","exp");return ze.runKernelFunc(function(e,r){var i=e.exp(t);return r([i]),i},{x:t},function(e,r){return{x:function(){return e.mulStrict(r[0])}}},"Exp",{},[],[!0])}}),av=Ge({expm1_:function(n){var t=ke(n,"x","expm1");return ze.runKernelFunc(function(e,r){var i=e.expm1(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.exp())}}})}}),sv=Ge({floor_:function(n){var t=ke(n,"x","floor");return ze.runKernelFunc(function(e){return e.floor(t)},{$x:t},function(e){return{$x:function(){return Cr(e)}}})}}),uv=Ge({log_:function(n){var t=ke(n,"x","log"),e=[t];return ze.runKernelFunc(function(r,i){var o=r.log(t);return i([t]),o},{x:t},function(r,i){var o=i[0];return{x:function(){return r.div(o.toFloat())}}},"Log",{},e)}}),lv=Ge({log1p_:function(n){var t=ke(n,"x","log1p");return ze.runKernelFunc(function(e,r){var i=e.log1p(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.add(1))}}})}}),cv=Ge({logSigmoid_:function(n){var t=ke(n,"x","logSigmoid");return ze.runKernelFunc(function(e,r){var i=e.softplus(t.neg()).neg();return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.neg().sigmoid())}}})}}),La=Ge({neg_:function(n){var t=ke(n,"x","neg"),e=[t];return ze.runKernelFunc(function(r){return r.neg(t)},{x:t},function(r){return{x:function(){return r.neg()}}},"Neg",{},e)}}),fv=Ge({reciprocal_:function(n){var t=ke(n,"x","reciprocal");return ze.runKernelFunc(function(e,r){var i=e.reciprocal(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.square().neg())}}})}}),dv=Ge({round_:function(n){var t=ke(n,"x","round");return ze.runKernelFunc(function(e){return e.round(t)},{$x:t},function(e){return{$x:function(){return Cr(e)}}})}}),Cc=Ge({rsqrt_:function(n){var t=ke(n,"x","rsqrt"),e=[t];return ze.runKernelFunc(function(r,i){var o=r.rsqrt(t);return i([t]),o},{x:t},function(r,i){var o=i[0];return{x:function(){return r.div(o.pow(1.5).mul(2)).neg()}}},"Rsqrt",{},e)}}),Sc=Ge({sigmoid_:function(n){var t=ke(n,"x","sigmoid");return ze.runKernelFunc(function(e,r){var i=e.sigmoid(t);return r([i]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mul(i.mul(Tt(1).sub(i)))}}},"Sigmoid")}}),pv=Ge({sign_:function(n){var t=ke(n,"x","sign");return ze.runKernelFunc(function(e){return e.sign(t)},{$x:t},function(e){return{$x:function(){return Cr(e)}}})}}),hv=Ge({isNaN_:function(n){var t=ke(n,"x","isNaN");return ze.runKernelFunc(function(e){return e.isNaN(t)},{$x:t},function(e){return{$x:function(){return Cr(e)}}})}}),vv=Ge({isInf_:function(n){var t=ke(n,"x","isInf");return ze.runKernelFunc(function(e){return e.isInf(t)},{$x:t},function(e){return{$x:function(){return Cr(e)}}})}}),mv=Ge({isFinite_:function(n){var t=ke(n,"x","isFinite");return ze.runKernelFunc(function(e){return e.isFinite(t)},{$x:t},function(e){return{$x:function(){return Cr(e)}}})}}),gv=Ge({sin_:function(n){var t=ke(n,"x","sin"),e=[t];return ze.runKernelFunc(function(r,i){var o=r.sin(t);return i([t]),o},{x:t},function(r,i){var o=i[0];return{x:function(){return o.toFloat().cos().mul(r)}}},"Sin",{},e)}}),yv=Ge({sinh_:function(n){var t=ke(n,"x","sinh");return ze.runKernelFunc(function(e,r){var i=e.sinh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return i.toFloat().cosh().mulStrict(e)}}})}}),bv=Ge({softplus_:function(n){var t=ke(n,"x","softplus");return ze.runKernelFunc(function(e,r){var i=e.softplus(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.sigmoid())}}})}}),wv=Ge({sqrt_:function(n){var t=ke(n,"x","sqrt");return ze.runKernelFunc(function(e,r){var i=e.sqrt(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.toFloat().sqrt().mul(2))}}})}}),Av=Ge({step_:function(n,t){t===void 0&&(t=0);var e=ke(n,"x","step");return ze.runKernelFunc(function(r){return r.step(e,t)},{$x:e},function(r){return{$x:function(){return Cr(r)}}})}}),xv=Ge({tan_:function(n){var t=ke(n,"x","tan");return ze.runKernelFunc(function(e,r){var i=e.tan(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.cos().square())}}})}}),Ev=Ge({tanh_:function(n){var t=ke(n,"x","tanh");return ze.runKernelFunc(function(e,r){var i=e.tanh(t);return r([i]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return Tt(1).sub(i.square()).mulStrict(e)}}},"Tanh",{},null,[!0])}});function Ic(n,t,e,r,i,o){var s,u,l=ke(n,"x","batchNorm"),d=ke(t,"mean","batchNorm"),A=ke(e,"variance","batchNorm");return i!=null&&(s=ke(i,"scale","batchNorm")),r!=null&&(u=ke(r,"offset","batchNorm")),ee(l.rank===2,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+l.rank+"."}),ee(d.rank===2||d.rank===1,function(){return"Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank "+d.rank+"."}),ee(A.rank===2||A.rank===1,function(){return"Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank "+A.rank+"."}),s!=null&&ee(s.rank===2||s.rank===1,function(){return"Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank "+s.rank+"."}),u!=null&&ee(u.rank===2||u.rank===1,function(){return"Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank "+u.rank+"."}),fa(l,d,A,u,s,o)}function Tc(n,t,e,r,i,o){var s,u,l=ke(n,"x","batchNorm"),d=ke(t,"mean","batchNorm"),A=ke(e,"variance","batchNorm");return i!=null&&(s=ke(i,"scale","batchNorm")),r!=null&&(u=ke(r,"offset","batchNorm")),ee(l.rank===3,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+l.rank+"."}),ee(d.rank===3||d.rank===1,function(){return"Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank "+d.rank+"."}),ee(A.rank===3||A.rank===1,function(){return"Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank "+A.rank+"."}),s!=null&&ee(s.rank===3||s.rank===1,function(){return"Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank "+s.rank+"."}),u!=null&&ee(u.rank===3||u.rank===1,function(){return"Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank "+u.rank+"."}),fa(l,d,A,u,s,o)}function Rc(n,t,e,r,i,o){var s,u,l=ke(n,"x","batchNorm"),d=ke(t,"mean","batchNorm"),A=ke(e,"variance","batchNorm");return i!=null&&(s=ke(i,"scale","batchNorm")),r!=null&&(u=ke(r,"offset","batchNorm")),ee(l.rank===4,function(){return"Error in batchNorm4D: x must be rank 4 but got rank "+l.rank+"."}),ee(d.rank===4||d.rank===1,function(){return"Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank "+d.rank+"."}),ee(A.rank===4||A.rank===1,function(){return"Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank "+A.rank+"."}),s!=null&&ee(s.rank===4||s.rank===1,function(){return"Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank "+s.rank+"."}),u!=null&&ee(u.rank===4||u.rank===1,function(){return"Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank "+u.rank+"."}),fa(l,d,A,u,s,o)}function fa(n,t,e,r,i,o){o==null&&(o=.001);var s,u,l,d=ke(n,"x","batchNorm"),A=ke(t,"mean","batchNorm"),O=ke(e,"variance","batchNorm");i!=null&&(s=ke(i,"scale","batchNorm")),r!=null&&(u=ke(r,"offset","batchNorm")),ee(A.rank===O.rank,function(){return"Batch normalization gradient requires mean and variance to have equal ranks."}),ee(u==null||A.rank===u.rank,function(){return"Batch normalization gradient requires mean and offset to have equal ranks."}),ee(s==null||A.rank===s.rank,function(){return"Batch normalization gradient requires mean and scale to have equal ranks."}),l=d.rank===0||d.rank===1?d.as4D(1,1,1,d.size):d.rank===2?d.as4D(1,1,d.shape[0],d.shape[1]):d.rank===3?d.as4D(1,d.shape[0],d.shape[1],d.shape[2]):d;var D=[d,A,O,s];return ze.runKernelFunc(function(H,te){var se=H.batchNormalization(l,Ua(A),Ua(O),o,Ua(s),Ua(u));return te([d,A,O,s]),se},{x:d,mean:A,variance:O,scale:s,offset:u},function(H,te){var se=te,ae=se[0],ue=se[1],ye=se[2],we=se[3],ve=we==null?Tt(1):we,Ee=In(ue.shape,l.shape),Te=[];if(ue.rank===1){for(var Fe=0;Fe<l.shape.length-1;++Fe)Te.push(l.shape[Fe]);Te.push(1)}var Le=ae.sub(ue),Me=H.mul(ve),Ne=Cc(ye.add(Tt(o))),Ze=Ne.mul(Ne).mul(Ne).mul(Tt(-.5));return{x:function(){return ue.rank===1?H.mul(No(Ne.as4D(1,1,1,ue.shape[0]),Te)).mul(ve).reshape(ae.shape):H.mul(Ne).mul(ve).reshape(ae.shape)},mean:function(){var Xe=Ne.mul(Tt(-1)).mul(Me);return ue.rank===1&&(Xe=Xe.sum(Ee)),Xe.reshape(ue.shape)},variance:function(){var Xe=Ze.mul(Le).mul(Me);return ue.rank===1&&(Xe=Xe.sum(Ee)),Xe.reshape(ue.shape)},scale:function(){var Xe=Le.mul(Ne),qe=H.mul(Xe);return ue.rank===1&&(qe=qe.sum(Ee)),qe.reshape(ue.shape)},offset:function(){var Xe=H;return ue.rank===1&&(Xe=Xe.sum(Ee)),Xe.reshape(ue.shape)}}},"BatchNormalization",{varianceEpsilon:o},D).reshape(d.shape)}function Ua(n){return n==null?null:n.rank===0?n.as1D():n.rank===1?n:n.rank===2?n.as4D(1,1,n.shape[0],n.shape[1]):n.rank===3?n.as4D(1,n.shape[0],n.shape[1],n.shape[2]):n}function Wa(){$n("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon")}var Cv=Ge({batchNormalization2d_:function(n,t,e,r,i,o){return r===void 0&&(r=.001),Wa(),Ic(n,t,e,o,i,r)}}),Sv=Ge({batchNormalization3d_:function(n,t,e,r,i,o){return r===void 0&&(r=.001),Wa(),Tc(n,t,e,o,i,r)}}),Iv=Ge({batchNormalization4d_:function(n,t,e,r,i,o){return r===void 0&&(r=.001),Wa(),Rc(n,t,e,o,i,r)}}),Tv=Ge({batchNormalization_:function(n,t,e,r,i,o){return r===void 0&&(r=.001),Wa(),fa(n,t,e,o,i,r)}}),Oc=Ge({batchNorm_:fa}),Rv=Ge({batchNorm2d_:Ic}),Ov=Ge({batchNorm3d_:Tc}),kv=Ge({batchNorm4d_:Rc}),za=Ge({logicalAnd_:function(n,t){var e=ke(n,"a","logicalAnd","bool"),r=ke(t,"b","logicalAnd","bool");return fr(e.shape,r.shape),ze.runKernelFunc(function(i){return i.logicalAnd(e,r)},{a:e,b:r},null,"LogicalAnd")}}),jv=Ge({logicalNot_:function(n){var t=ke(n,"x","logicalNot","bool");return ze.runKernelFunc(function(e){return e.logicalNot(t)},{$x:t})}}),kc=Ge({logicalOr_:function(n,t){var e=ke(n,"a","logicalOr","bool"),r=ke(t,"b","logicalOr","bool");return fr(e.shape,r.shape),ze.runKernelFunc(function(i){return i.logicalOr(e,r)},{$a:e,$b:r})}}),Dv=Ge({logicalXor_:function(n,t){var e=ke(n,"a","logicalXor","bool"),r=ke(t,"b","logicalXor","bool");return fr(e.shape,r.shape),kc(n,t).logicalAnd(za(n,t).logicalNot())}}),Io=Ge({where_:function(n,t,e){var r=ke(t,"a","where"),i=ke(e,"b","where"),o=ke(n,"condition","where","bool");return de(r.shape,i.shape,"Error in where: "),o.rank===1?ee(o.shape[0]===r.shape[0],function(){return"The first dimension of `a` must match the size of `condition`."}):de(o.shape,i.shape,"Error in where: "),ze.runKernelFunc(function(s,u){var l=s.select(o,r,i);return u([o]),l},{$condition:o,$a:r,$b:i},function(s,u){var l=u[0];return{$condition:function(){return Cr(l).toFloat()},$a:function(){return s.mul(l.cast(s.dtype))},$b:function(){return s.mul(l.logicalNot().cast(s.dtype))}}})}}),jc=function(n){return E(this,void 0,void 0,function(){var t,e,r;return C(this,function(i){switch(i.label){case 0:return[4,(t=ke(n,"condition","whereAsync","bool")).data()];case 1:return e=i.sent(),r=ks(t.shape,e),n!==t&&t.dispose(),[2,r]}})})},dr=Ge({add_:function(n,t){var e,r=ke(n,"a","add"),i=ke(t,"b","add");e=qt(r,i),r=e[0],i=e[1];var o=fr(r.shape,i.shape);return ze.runKernelFunc(function(s){return s.add(r,i)},{a:r,b:i},function(s){return{a:function(){var u=s,l=In(r.shape,o);return l.length>0&&(u=u.sum(l)),u.reshape(r.shape)},b:function(){var u=s,l=In(i.shape,o);return l.length>0&&(u=u.sum(l)),u.reshape(i.shape)}}},"Add")}}),Pv=Ge({addN_:function(n){ee(Array.isArray(n),function(){return"The argument passed to tf.addN() must be a list of tensors"}),ee(n.length>=1,function(){return"Must pass at least one tensor to tf.addN(), but got "+n.length});var t=n.map(function(i,o){return ke(i,"tensors"+o,"addN")}),e=t[0];t.forEach(function(i){if(i.dtype!==e.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),t.forEach(function(i){if(!le(i.shape,e.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")});var r=t;return ze.runKernelFunc(function(i){return i.addN(t)},r,function(i){var o={};return t.forEach(function(s,u){o[u]=function(){return i.clone()}}),o},"AddN")}}),Bv=Ge({addStrict_:function(n,t){var e=ke(n,"a","addStrict"),r=ke(t,"b","addStrict");return de(e.shape,r.shape,"Error in addStrict: "),e.add(r)}}),Mv=Ge({atan2_:function(n,t){var e,r=ke(n,"a","atan2"),i=ke(t,"b","atan2");e=qt(r,i),r=e[0],i=e[1];var o=fr(r.shape,i.shape);return ze.runKernelFunc(function(s,u){var l=s.atan2(r,i);return u([r,i]),l},{$a:r,$b:i},function(s,u){var l=u[0],d=u[1];return{$a:function(){var A=dr(l.square(),d.square()),O=s.mul(d.div(A)),D=In(l.shape,o);return D.length>0&&(O=O.sum(D)),O.reshape(l.shape)},$b:function(){var A=dr(l.square(),d.square()),O=La(s.mul(l.div(A))),D=In(d.shape,o);return D.length>0&&(O=O.sum(D)),O.reshape(d.shape)}}})}}),Si=Ge({div_:function(n,t){var e,r=ke(n,"a","div"),i=ke(t,"b","div");if(e=qt(r,i),r=e[0],i=e[1],r.dtype==="int32"&&i.dtype==="int32")return Dc(r,i);var o=fr(r.shape,i.shape);return ze.runKernelFunc(function(s,u){var l=s.realDivide(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],d=u[1];return{a:function(){var A=s.div(d.toFloat()),O=In(l.shape,o);return O.length>0?A.sum(O).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),O=In(d.shape,o);O.length>0&&(A=A.sum(O).reshape(d.shape));var D=d.square();return A.div(D.toFloat()).neg()}}},"Div")}}),Nv=Ge({divNoNan_:function(n,t){var e,r=ke(n,"a","div"),i=ke(t,"b","div");r=(e=qt(r,i))[0],i=e[1];var o=Si(r,i),s=Cr(o),u=i.equal(s);return Io(u,s,o)}}),_v=Ge({divStrict_:function(n,t){var e=ke(n,"a","div"),r=ke(t,"b","div");return de(e.shape,r.shape,"Error in divideStrict: "),e.div(r)}}),Dc=Ge({floorDiv_:function(n,t){var e,r=ke(n,"a","floorDiv"),i=ke(t,"b","floorDiv");e=qt(r,i),r=e[0],i=e[1];var o=fr(r.shape,i.shape);return ze.runKernelFunc(function(s,u){var l=s.floorDiv(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],d=u[1];return{a:function(){var A=s.div(d.toFloat()),O=In(l.shape,o);return O.length>0?A.sum(O).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),O=In(d.shape,o);O.length>0&&(A=A.sum(O).reshape(d.shape));var D=d.square();return A.div(D.toFloat()).neg()}}},"FloorDiv")}}),zs=Ge({maximum_:function(n,t){var e,r=ke(n,"a","maximum"),i=ke(t,"b","maximum");return e=qt(r,i),r=e[0],i=e[1],r.dtype==="bool"&&(r=r.toInt(),i=i.toInt()),fr(r.shape,i.shape),ze.runKernelFunc(function(o,s){var u=o.maximum(r,i);return s([r,i]),u},{a:r,b:i},function(o,s){var u=s[0],l=s[1];return{a:function(){return o.mul(u.greaterEqual(l).toFloat())},b:function(){return o.mul(u.less(l).toFloat())}}},"Maximum")}}),Fv=Ge({maximumStrict_:function(n,t){var e=ke(n,"a","maximumStrict"),r=ke(t,"b","maximumStrict");return de(e.shape,r.shape,"Error in maximumStrict: "),e.maximum(r)}}),Pc=Ge({minimum_:function(n,t){var e,r=ke(n,"a","minimum"),i=ke(t,"b","minimum");return e=qt(r,i),r=e[0],i=e[1],r.dtype==="bool"&&(r=r.toInt(),i=i.toInt()),fr(r.shape,i.shape),ze.runKernelFunc(function(o,s){var u=o.minimum(r,i);return s([r,i]),u},{a:r,b:i},function(o,s){var u=s[0],l=s[1];return{a:function(){return o.mul(u.lessEqual(l).toFloat())},b:function(){return o.mul(u.greater(l).toFloat())}}},"Minimum")}}),Lv=Ge({minimumStrict_:function(n,t){var e=ke(n,"a","minimumStrict"),r=ke(t,"b","minimumStrict");return de(e.shape,r.shape,"Error in minimumStrict: "),e.minimum(r)}}),Uv=Ge({mod_:function(n,t){var e,r=ke(n,"a","mod"),i=ke(t,"b","mod");e=qt(r,i),r=e[0],i=e[1];var o=fr(r.shape,i.shape);return ze.runKernelFunc(function(s,u){var l=s.mod(r,i);return u([r,i]),l},{$a:r,$b:i},function(s,u){var l=u[0],d=u[1];return{$a:function(){var A=In(l.shape,o);return A.length>0?s.sum(A).reshape(l.shape):s},$b:function(){var A=s.mul(l.div(d).floor().neg()),O=In(d.shape,o);return O.length>0?A.sum(O).reshape(d.shape):A}}})}}),Wv=Ge({modStrict_:function(n,t){var e=ke(n,"a","modStrict"),r=ke(t,"b","modStrict");return de(e.shape,r.shape,"Error in modStrict: "),e.mod(r)}}),Hn=Ge({mul_:function(n,t){var e,r=ke(n,"a","mul"),i=ke(t,"b","mul");e=qt(r,i),r=e[0],i=e[1];var o=fr(r.shape,i.shape);return ze.runKernelFunc(function(s,u){var l=s.multiply(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],d=u[1];return{a:function(){var A=s.mul(d.toFloat()),O=In(l.shape,o);return O.length>0?A.sum(O).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),O=In(d.shape,o);return O.length>0?A.sum(O).reshape(d.shape):A}}},"Mul")}}),zv=Ge({mulStrict_:function(n,t){var e=ke(n,"a","mul"),r=ke(t,"b","mul");return de(e.shape,r.shape,"Error in multiplyStrict: "),e.mul(r)}}),Ha=Ge({pow_:function(n,t){var e,r=ke(n,"base","pow"),i=ke(t,"exp","pow");e=qt(r,i),r=e[0],i=e[1];var o=fr(r.shape,i.shape),s=[r,i];return ze.runKernelFunc(function(u,l){var d=u.pow(r,i);return l([r,i,d]),d},{a:r,b:i},function(u,l){var d=l[0],A=l[1],O=l[2];return{a:function(){var D=A.toFloat(),H=u.mul(D.mul(d.pow(D.sub(Tt(1))))),te=In(d.shape,o);return te.length>0&&(H=H.sum(te)),H.reshape(d.shape)},b:function(){var D=d.greater(0),H=d.log().where(D,Cr(d)),te=u.mul(O.mul(H)),se=In(A.shape,o);return se.length>0&&(te=te.sum(se)),te.reshape(A.shape)}}},"Pow",{},s,[!0])}}),Hv=Ge({powStrict_:function(n,t){return de(n.shape,t.shape,"Error in powStrict: "),n.pow(t)}}),Vv=Ge({squaredDifferenceStrict_:function(n,t){var e=ke(n,"a","squaredDifferenceStrict"),r=ke(t,"b","squaredDifferenceStrict");return de(e.shape,r.shape,"Error in squaredDifferenceStrict: "),e.squaredDifference(r)}}),Dn=Ge({sub_:function(n,t){var e,r=ke(n,"a","sub"),i=ke(t,"b","sub");e=qt(r,i),r=e[0],i=e[1];var o=fr(r.shape,i.shape);return ze.runKernelFunc(function(s){return s.subtract(r,i)},{a:r,b:i},function(s){return{a:function(){var u=s,l=In(r.shape,o);return l.length>0&&(u=u.sum(l)),u.reshape(r.shape)},b:function(){var u=s,l=In(i.shape,o);return l.length>0&&(u=u.sum(l)),u.neg().reshape(i.shape)}}},"Sub")}}),Gv=Ge({subStrict_:function(n,t){var e=ke(n,"a","subStrict"),r=ke(t,"b","subStrict");return de(e.shape,r.shape,"Error in subStrict: "),e.sub(r)}}),Bc=Ge({equal_:function(n,t){var e,r=ke(n,"a","equal"),i=ke(t,"b","equal");return e=qt(r,i),r=e[0],i=e[1],fr(r.shape,i.shape),ze.runKernelFunc(function(o){return o.equal(r,i)},{$a:r,$b:i})}}),Qv=Ge({equalStrict_:function(n,t){var e=ke(n,"a","equalStrict"),r=ke(t,"b","equalStrict");return de(e.shape,r.shape,"Error in equalStrict: "),e.equal(r)}}),Xv=Ge({greater_:function(n,t){var e,r=ke(n,"a","greater"),i=ke(t,"b","greater");return e=qt(r,i),r=e[0],i=e[1],fr(r.shape,i.shape),ze.runKernelFunc(function(o){return o.greater(r,i)},{a:r,b:i},null,"Greater")}}),Mc=Ge({greaterEqual_:function(n,t){var e,r=ke(n,"a","greaterEqual"),i=ke(t,"b","greaterEqual");return e=qt(r,i),r=e[0],i=e[1],fr(r.shape,i.shape),ze.runKernelFunc(function(o,s){var u=o.greaterEqual(r,i);return s([r,i]),u},{a:r,b:i},function(o,s){var u=s[0],l=s[1];return{a:function(){return Cr(u)},b:function(){return Cr(l)}}},"GreaterEqual")}}),Kv=Ge({greaterEqualStrict_:function(n,t){var e=ke(n,"a","greaterEqualStrict"),r=ke(t,"b","greaterEqualStrict");return de(e.shape,r.shape,"Error in greaterEqualStrict: "),e.greaterEqual(r)}}),Zv=Ge({greaterStrict_:function(n,t){var e=ke(n,"a","greaterStrict"),r=ke(t,"b","greaterStrict");return de(e.shape,r.shape,"Error in greaterStrict: "),e.greater(r)}}),Jv=Ge({less_:function(n,t){var e,r=ke(n,"a","less"),i=ke(t,"b","less");return e=qt(r,i),r=e[0],i=e[1],fr(r.shape,i.shape),ze.runKernelFunc(function(o){return o.less(r,i)},{a:r,b:i},null,"Less")}}),Yv=Ge({lessEqual_:function(n,t){var e,r=ke(n,"a","lessEqual"),i=ke(t,"b","lessEqual");return e=qt(r,i),r=e[0],i=e[1],fr(r.shape,i.shape),ze.runKernelFunc(function(o,s){var u=o.lessEqual(r,i);return s([r,i]),u},{a:r,b:i},null,"LessEqual")}}),$v=Ge({lessEqualStrict_:function(n,t){var e=ke(n,"a","lessEqualStrict"),r=ke(t,"b","lessEqualStrict");return de(e.shape,r.shape,"Error in lessEqualStrict: "),e.lessEqual(r)}}),qv=Ge({lessStrict_:function(n,t){var e=ke(n,"a","lessStrict"),r=ke(t,"b","lessStrict");return de(e.shape,r.shape,"Error in lessStrict: "),e.less(r)}}),em=Ge({notEqual_:function(n,t){var e,r=ke(n,"a","notEqual"),i=ke(t,"b","notEqual");return e=qt(r,i),r=e[0],i=e[1],fr(r.shape,i.shape),ze.runKernelFunc(function(o){return o.notEqual(r,i)},{a:r,b:i},null,"NotEqual")}}),tm=Ge({notEqualStrict_:function(n,t){var e=ke(n,"a","notEqualStrict"),r=ke(t,"b","notEqualStrict");return de(e.shape,r.shape,"Error in notEqualStrict: "),e.notEqual(r)}});function Nc(n,t){for(var e=[],r=n;r<t;++r)e.push(r);return e}function _c(n){for(var t=[],e=0;e<n.length;++e)for(var r=0;r<n[e].length;++r)t.push(n[e][r]);return t}var Hs=Ge({gather_:function(n,t,e){e===void 0&&(e=0);var r=ke(n,"x","gather"),i=ke(t,"indices","gather","int32");e=be(e,r.shape)[0];var o=function(s,u,l){for(var d=s.shape[l],A=[],O=1,D=1,H=0;H<l;H++)A.push(s.shape[H]),O*=s.shape[H];for(H=0;H<u.rank;H++)A.push(u.shape[H]);for(H=l+1;H<s.rank;H++)A.push(s.shape[H]),D*=s.shape[H];return{batchSize:O,sliceSize:D,dimSize:d,outputShape:A}}(r,i,e);return ze.runKernelFunc(function(s,u){var l=s.gather(r,i.flatten(),e);return u([i]),l},{x:r,indices:i},function(s,u){var l=u[0];return{x:function(){var d=r.shape,A=l.size,O=d.slice(0,e),D=O.length,H=d.slice(e,d.length).slice(1),te=H.length,se=Nc(0,D),ae=Nc(D+1,D+1+te),ue=_c([O,[A],H]),ye=s.reshape(ue),we=l.reshape([A]),ve=_c([[D],se,ae]),Ee=ye.transpose(ve),Te=Fc(Ee,we,r.shape[e]),Fe=Qr(ve);return Te=Te.transpose(Fe)},indices:function(){return l}}},"Gather",{axis:e}).reshape(o.outputShape)}}),Fc=Ge({unsortedSegmentSum_:function(n,t,e){var r=ke(n,"x","unsortedSegmentSum"),i=ke(t,"segmentIds","unsortedSegmentSum","int32");return ee(ge(e),function(){return"numSegments must be of dtype int"}),ze.runKernelFunc(function(o,s){var u=o.unsortedSegmentSum(r,i,e);return s([i]),u},{$x:r},function(o,s){var u=s[0];return{$x:function(){return function(l,d){for(var A=zs(d,Cr(d)),O=Hs(l,A),D=Mc(d,Tt(0,"int32")),H=O.rank-D.rank,te=0;te<H;++te)D=gi(D,te+1);D=za(D,Mo(O.shape,"bool"));var se=Cr(O);return Io(D,O,se)}(o,u)}}})}}),rm=function(n,t,e){return E(this,void 0,void 0,function(){var r,i,o,s,u,l,d,A,O,D,H,te,se;return C(this,function(ae){switch(ae.label){case 0:for(r=ke(n,"tensor","boolMask"),i=ke(t,"mask","boolMask","bool"),o=e==null?0:e,s=i.rank,u=r.shape,ee(s>0,function(){return"mask cannot be scalar"}),de(u.slice(o,o+s),i.shape,"mask's shape must match the first K dimensions of tensor's shape,"),l=1,d=o;d<o+s;d++)l*=u[d];return A=u.slice(0,o).concat([l],u.slice(o+s)),O=r.reshape(A),D=i.reshape([-1]),[4,jc(D)];case 1:return H=ae.sent(),te=H.squeeze([1]),se=Hs(O,te,o),n!==r&&r.dispose(),t!==i&&i.dispose(),te.dispose(),O.dispose(),D.dispose(),H.dispose(),[2,se]}})})};function Lc(n,t,e,r,i,o,s){o===void 0&&(o="NHWC"),ee(n.length===t.rank,function(){return"Length of inShape ("+n.length+") and rank of dy ("+t.rank+") must match"});var u=n,l=t,d=!1;t.rank===3&&(d=!0,l=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]),u=[1,n[0],n[1],n[2]]),ee(u.length===4,function(){return"Error in conv2dDerInput: inShape must be length 4, but got length "+u.length+"."}),ee(l.rank===4,function(){return"Error in conv2dDerInput: dy must be rank 4, but got rank "+l.rank}),ee(e.rank===4,function(){return"Error in conv2dDerInput: filter must be rank 4, but got rank "+e.rank});var A=o==="NHWC"?u[3]:u[1],O=o==="NHWC"?l.shape[3]:l.shape[1];ee(A===e.shape[2],function(){return"Error in conv2dDerInput: depth of input ("+A+") must match input depth for filter "+e.shape[2]+"."}),ee(O===e.shape[3],function(){return"Error in conv2dDerInput: depth of output ("+O+") must match output depth for filter "+e.shape[3]+"."}),s!=null&&ee(ge(i),function(){return"Error in conv2dDerInput: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+i+"."});var D=Pa(o),H=oo(u,e.shape,r,1,i,s,!1,D),te=ze.runKernelFunc(function(se,ae){var ue=se.conv2dDerInput(l,e,H);return ae([e,l]),ue},{dy4D:l,filter:e},function(se,ae){var ue=ae[0],ye=ae[1];return{dy4D:function(){return yi(se,ue,r,i,o,1,s)},filter:function(){return Gs(se,ye,ue.shape,r,i,o,s)}}});return d?te.as3D(te.shape[1],te.shape[2],te.shape[3]):te}function Vs(n){var t=function(o){return typeof o=="number"?[o,o,o]:o.length===2?[o[0],o[1],1]:o}(n),e=t[0],r=t[1],i=t[2];return e===1&&r===1&&i===1}function Uc(n,t,e,r,i){ee(n.length===t.rank,function(){return"Length of inShape ("+n.length+") and rank of dy ("+t.rank+") must match"});var o=n,s=t,u=!1;t.rank===4&&(u=!0,s=t.as5D(1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]),o=[1,n[0],n[1],n[2],n[3]]);var l=o[4],d=s.shape[4];ee(o.length===5,function(){return"Error in conv3dDerInput: inShape must be length 5, but got length "+o.length+"."}),ee(s.rank===5,function(){return"Error in conv3dDerInput: dy must be rank 5, but got rank "+s.rank}),ee(e.rank===5,function(){return"Error in conv3dDerInput: filter must be rank 5, but got rank "+e.rank}),ee(l===e.shape[3],function(){return"Error in conv3dDerInput: depth of input ("+l+") must match input depth for filter "+e.shape[3]+"."}),ee(d===e.shape[4],function(){return"Error in conv3dDerInput: depth of output ("+d+") must match output depth for filter "+e.shape[4]+"."});var A=aa(o,e.shape,r,1,i),O=ze.runKernelFunc(function(D){return D.conv3dDerInput(s,e,A)},{dy5D:s});return u?O.as4D(O.shape[1],O.shape[2],O.shape[3],O.shape[4]):O}var nm=Ge({conv1d_:function(n,t,e,r,i,o,s){i===void 0&&(i="NWC"),o===void 0&&(o=1);var u=ke(n,"x","conv1d"),l=ke(t,"filter","conv1d"),d=u,A=!1;u.rank===2&&(A=!0,d=u.as3D(1,u.shape[0],u.shape[1])),ee(d.rank===3,function(){return"Error in conv1d: input must be rank 3, but got rank "+d.rank+"."}),ee(l.rank===3,function(){return"Error in conv1d: filter must be rank 3, but got rank "+l.rank+"."}),s!=null&&ee(ge(r),function(){return"Error in conv1d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."}),ee(d.shape[2]===l.shape[1],function(){return"Error in conv1d: depth of input ("+d.shape[2]+") must match input depth for filter "+l.shape[1]+"."}),ee(Zn(e,o),function(){return"Error in conv1D: Either stride or dilation must be 1. Got stride "+e+" and dilation '"+o+"'"}),ee(i==="NWC",function(){return"Error in conv1d: got dataFormat of "+i+" but only NWC is currently supported."});var O=l.as4D(1,l.shape[0],l.shape[1],l.shape[2]),D=d.as4D(d.shape[0],1,d.shape[1],d.shape[2]),H=yi(D,O,[1,e],r,"NHWC",[1,o],s);return A?H.as2D(H.shape[2],H.shape[3]):H.as3D(H.shape[0],H.shape[2],H.shape[3])}}),yi=Ge({conv2d_:function(n,t,e,r,i,o,s){i===void 0&&(i="NHWC"),o===void 0&&(o=[1,1]);var u=ke(n,"x","conv2d"),l=ke(t,"filter","conv2d"),d=u,A=!1;u.rank===3&&(A=!0,d=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),ee(d.rank===4,function(){return"Error in conv2d: input must be rank 4, but got rank "+d.rank+"."}),ee(l.rank===4,function(){return"Error in conv2d: filter must be rank 4, but got rank "+l.rank+"."}),s!=null&&ee(ge(r),function(){return"Error in conv2d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."});var O=i==="NHWC"?d.shape[3]:d.shape[1];ee(O===l.shape[2],function(){return"Error in conv2d: depth of input ("+O+") must match input depth for filter "+l.shape[2]+"."}),ee(Zn(e,o),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+o+"'"});var D=Pa(i),H=oo(d.shape,l.shape,e,o,r,s,!1,D),te=[l,d],se=ze.runKernelFunc(function(ae,ue){var ye=ae.conv2d(d,l,H);return ue([l,d]),ye},{x:d,filter:l},function(ae,ue){var ye=ue,we=ye[0],ve=ye[1];return ee(Eo(o),function(){return"Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+o+"'"}),{x:function(){return Wc(ve.shape,ae,we,e,r,i)},filter:function(){return Gs(ve,ae,we.shape,e,r,i)}}},"Conv2D",H,te);return A?se.as3D(se.shape[1],se.shape[2],se.shape[3]):se}}),im=Ge({conv3d_:function(n,t,e,r,i,o){i===void 0&&(i="NDHWC"),o===void 0&&(o=[1,1,1]);var s=ke(n,"x","conv3d"),u=ke(t,"filter","conv3d"),l=s,d=!1;s.rank===4&&(d=!0,l=s.as5D(1,s.shape[0],s.shape[1],s.shape[2],s.shape[3])),ee(l.rank===5,function(){return"Error in conv3d: input must be rank 5, but got rank "+l.rank+"."}),ee(u.rank===5,function(){return"Error in conv3d: filter must be rank 5, but got rank "+u.rank+"."}),ee(l.shape[4]===u.shape[3],function(){return"Error in conv3d: depth of input ("+l.shape[4]+") must match input depth for filter "+u.shape[3]+"."}),ee(function(D,H){return Vs(D)||Vs(H)}(e,o),function(){return"Error in conv3D: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+o+"'"}),ee(i==="NDHWC",function(){return"Error in conv3d: got dataFormat of "+i+" but only NDHWC is currently supported."});var A=aa(l.shape,u.shape,e,o,r),O=ze.runKernelFunc(function(D,H){var te=D.conv3d(l,u,A);return H([l,u]),te},{x:l,$filter:u},function(D,H){ee(Vs(o),function(){return"Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+o+"'"});var te=H[0],se=H[1];return{x:function(){return Uc(te.shape,D,se,e,r)},$filter:function(){return function(ae,ue,ye,we,ve){var Ee=ae;ae.rank===4&&(Ee=ae.as5D(1,ae.shape[0],ae.shape[1],ae.shape[2],ae.shape[3]));var Te=ue;Te.rank===4&&(Te=ue.as5D(1,ue.shape[0],ue.shape[1],ue.shape[2],ue.shape[3])),ee(Ee.rank===5,function(){return"Error in conv3dDerFilter: input must be rank 5, but got shape "+Ee.shape+"."}),ee(Te.rank===5,function(){return"Error in conv3dDerFilter: dy must be rank 5, but got shape "+Te.shape+"."}),ee(ye.length===5,function(){return"Error in conv3dDerFilter: filterShape must be length 5, but got "+ye+"."}),ee(Ee.shape[4]===ye[3],function(){return"Error in conv3dDerFilter: depth of input "+Ee.shape[4]+") must match input depth in filter ("+ye[3]+"."}),ee(Te.shape[4]===ye[4],function(){return"Error in conv3dDerFilter: depth of dy ("+Te.shape[4]+") must match output depth for filter ("+ye[4]+")."});var Fe=aa(Ee.shape,ye,we,1,ve);return ze.runKernelFunc(function(Le){return Le.conv3dDerFilter(Ee,Te,Fe)},{x5D:Ee,dy5D:Te})}(te,D,se.shape,e,r)}}});return d?O.as4D(O.shape[1],O.shape[2],O.shape[3],O.shape[4]):O}}),Gs=Ge({conv2dDerFilter_:function(n,t,e,r,i,o,s){o===void 0&&(o="NHWC");var u=n;n.rank===3&&(u=n.as4D(1,n.shape[0],n.shape[1],n.shape[2]));var l=t;l.rank===3&&(l=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),ee(u.rank===4,function(){return"Error in conv2dDerFilter: input must be rank 4, but got shape "+u.shape+"."}),ee(l.rank===4,function(){return"Error in conv2dDerFilter: dy must be rank 4, but got shape "+l.shape+"."}),ee(e.length===4,function(){return"Error in conv2dDerFilter: filterShape must be length 4, but got "+e+"."});var d=o==="NHWC"?u.shape[3]:u.shape[1],A=o==="NHWC"?l.shape[3]:l.shape[1];ee(d===e[2],function(){return"Error in conv2dDerFilter: depth of input "+d+") must match input depth in filter ("+e[2]+"."}),ee(A===e[3],function(){return"Error in conv2dDerFilter: depth of dy ("+A+") must match output depth for filter ("+e[3]+")."}),s!=null&&ee(ge(i),function(){return"Error in conv2dDerFilter: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+i+"."});var O=Pa(o),D=oo(u.shape,e,r,1,i,s,!1,O);return ze.runKernelFunc(function(H){return H.conv2dDerFilter(u,l,D)},{x4D:u,dy4D:l})}}),Wc=Ge({conv2dDerInput_:Lc}),Va=Ge({depthwiseConv2d_:function(n,t,e,r,i,o,s){i===void 0&&(i="NHWC"),o===void 0&&(o=[1,1]);var u=ke(n,"x","depthwiseConv2d"),l=ke(t,"filter","depthwiseConv2d"),d=u,A=!1;u.rank===3&&(A=!0,d=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),ee(d.rank===4,function(){return"Error in depthwiseConv2d: input must be rank 4, but got rank "+d.rank+"."}),ee(l.rank===4,function(){return"Error in depthwiseConv2d: filter must be rank 4, but got rank "+l.rank+"."}),ee(d.shape[3]===l.shape[2],function(){return"Error in depthwiseConv2d: number of input channels ("+d.shape[3]+") must match the inChannels dimension in filter "+l.shape[2]+"."}),o==null&&(o=[1,1]),ee(Zn(e,o),function(){return"Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+o+"'"}),s!=null&&ee(ge(r),function(){return"Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."});var O=oo(d.shape,l.shape,e,o,r,s,!0),D=[d,l],H=ze.runKernelFunc(function(te,se){var ae=te.depthwiseConv2D(d,l,O);return se([d,l]),ae},{x:d,filter:l},function(te,se){ee(Eo(o),function(){return"Error in gradient of depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+o+"'"});var ae=se[0],ue=se[1];return{x:function(){return zc(ae.shape,te,ue,O)},filter:function(){return Hc(ae,te,ue.shape,O)}}},"DepthwiseConv2dNative",O,D);return A?H.as3D(H.shape[1],H.shape[2],H.shape[3]):H}}),zc=Ge({depthwiseConv2dDerInput_:function(n,t,e,r){var i=t,o=!1;t.rank===3&&(o=!0,i=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]));var s=ze.runKernelFunc(function(u){return u.depthwiseConv2DDerInput(i,e,r)},{dy4D:i});return o?s.as3D(s.shape[1],s.shape[2],s.shape[3]):s}}),Hc=Ge({depthwiseConv2dDerFilter_:function(n,t,e,r){var i=n;n.rank===3&&(i=n.as4D(1,n.shape[0],n.shape[1],n.shape[2]));var o=t;return o.rank===3&&(o=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),ze.runKernelFunc(function(s){return s.depthwiseConv2DDerFilter(i,o,r)},{x4D:i,dy4D:o})}}),Qs=Ge({separableConv2d_:function(n,t,e,r,i,o,s){o===void 0&&(o=[1,1]),s===void 0&&(s="NHWC");var u=ke(n,"x","separableConv2d"),l=ke(t,"depthwiseFilter","separableConv2d"),d=ke(e,"pointwiseFilter","separableConv2d"),A=u,O=!1;if(u.rank===3&&(O=!0,A=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),s==="NCHW")throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");ee(A.rank===4,function(){return"Error in separableConv2d: input must be rank 4, but got rank "+A.rank+"."}),ee(l.rank===4,function(){return"Error in separableConv2d: depthwise filter must be rank 4, but got rank "+l.rank+"."}),ee(d.rank===4,function(){return"Error in separableConv2d: pointwise filter must be rank 4, but got rank "+l.rank+"."}),ee(d.shape[0]===1,function(){return"Error in separableConv2d: the first dimension of pointwise filter must be 1, but got "+d.shape[0]+"."}),ee(d.shape[1]===1,function(){return"Error in separableConv2d: the second dimension of pointwise filter must be 1, but got "+d.shape[1]+"."});var D=l.shape[2],H=l.shape[3];ee(d.shape[2]===D*H,function(){return"Error in separableConv2d: the third dimension of pointwise filter must be "+D*H+", but got "+d.shape[2]+"."});var te=Va(A,l,r,i,s,o),se=yi(te,d,1,"valid",s);return O?se.as3D(se.shape[1],se.shape[2],se.shape[3]):se}}),om=Ge({conv2dTranspose_:function(n,t,e,r,i,o){return Lc(e,ke(n,"x","conv2dTranspose"),ke(t,"filter","conv2dTranspose"),r,i,"NHWC",o)}}),am=Ge({conv3dTranspose_:function(n,t,e,r,i){return Uc(e,ke(n,"x","conv3dTranspose"),ke(t,"filter","conv3dTranspose"),r,i)}}),Ga=Ge({matMul_:function(n,t,e,r){var i;e===void 0&&(e=!1),r===void 0&&(r=!1);var o=ke(n,"a","matMul"),s=ke(t,"b","matMul");i=qt(o,s),o=i[0],s=i[1];var u=e?o.shape[o.rank-2]:o.shape[o.rank-1],l=r?s.shape[s.rank-1]:s.shape[s.rank-2],d=e?o.shape[o.rank-1]:o.shape[o.rank-2],A=r?s.shape[s.rank-2]:s.shape[s.rank-1],O=o.shape.slice(0,-2),D=s.shape.slice(0,-2),H=ce(O),te=ce(D);ee(o.rank>=2&&s.rank>=2&&o.rank===s.rank,function(){return"Error in matMul: inputs must have the same rank of at least 2, got ranks "+o.rank+" and "+s.rank+"."}),ee(le(O,D),function(){return"Error in matMul: outer dimensions ("+O+") and ("+D+") of Tensors with shapes "+o.shape+" and "+s.shape+" must match."}),ee(u===l,function(){return"Error in matMul: inner shapes ("+u+") and ("+l+") of Tensors with shapes "+o.shape+" and "+s.shape+" and transposeA="+e+" and transposeB="+r+" must match."});var se=o.shape.slice(0,-2).concat([d,A]),ae=e?o.as3D(H,u,d):o.as3D(H,d,u),ue=r?s.as3D(te,A,l):s.as3D(te,l,A),ye={transposeA:e,transposeB:r};return ze.runKernelFunc(function(we,ve){var Ee=we.batchMatMul(ae,ue,e,r);return ve([ae,ue]),Ee},{a:ae,b:ue},function(we,ve){var Ee=ve,Te=Ee[0],Fe=Ee[1];return e||r?!e&&r?{a:function(){return we.matMul(Fe,!1,!1)},b:function(){return we.matMul(Te,!0,!1)}}:e&&!r?{a:function(){return Fe.matMul(we,!1,!0)},b:function(){return Te.matMul(we,!1,!1)}}:{a:function(){return Fe.matMul(we,!0,!0)},b:function(){return we.matMul(Te,!0,!0)}}:{a:function(){return we.matMul(Fe,!1,!0)},b:function(){return Te.matMul(we,!0,!1)}}},"BatchMatMul",ye).reshape(se)}}),sm=Ge({dot_:function(n,t){var e=ke(n,"t1","dot"),r=ke(t,"t2","dot");ee(!(e.rank!==1&&e.rank!==2||r.rank!==1&&r.rank!==2),function(){return"Error in dot: inputs must all be rank 1 or 2, but got ranks "+e.rank+" and "+r.rank+"."});var i=e.rank===1?e.size:e.shape[1],o=r.rank===1?r.size:r.shape[0];return ee(i===o,function(){return"Error in dot: inner dimensions of inputs must match, but got "+i+" and "+o+"."}),e.rank===1&&r.rank===1?e.as2D(1,-1).matMul(r.as2D(-1,1)).asScalar():e.rank===1&&r.rank===2?e.as2D(1,-1).matMul(r.as2D(r.shape[0],r.shape[1])).as1D():e.rank===2&&r.rank===1?e.matMul(r.as2D(-1,1)).as1D():e.matMul(r.as2D(r.shape[0],r.shape[1]))}}),um=Ge({outerProduct_:function(n,t){var e=ke(n,"v1","outerProduct"),r=ke(t,"v2","outerProduct");return ee(e.rank===1&&r.rank===1,function(){return"Error in outerProduct: inputs must be rank 1, but got ranks "+e.rank+" and "+r.rank+"."}),e.as2D(-1,1).matMul(r.as2D(1,-1))}}),da=Ge({reverse_:function(n,t){var e=ke(n,"x","reverse");if(e.rank===0)return e.clone();var r=be(t,e.shape);return ze.runKernelFunc(function(i){return i.reverse(e,r)},{$x:e},function(i){return{$x:function(){return i.reverse(r)}}}).reshapeAs(e)}}),lm=Ge({reverse1d_:function(n){var t=ke(n,"x","reverse");return ee(t.rank===1,function(){return"Error in reverse1D: x must be rank 1 but got rank "+t.rank+"."}),da(t,0)}}),cm=Ge({reverse2d_:function(n,t){var e=ke(n,"x","reverse");return ee(e.rank===2,function(){return"Error in reverse2D: x must be rank 2 but got rank "+e.rank+"."}),da(e,t)}}),fm=Ge({reverse3d_:function(n,t){var e=ke(n,"x","reverse");return ee(e.rank===3,function(){return"Error in reverse3D: x must be rank 3 but got rank "+e.rank+"."}),da(e,t)}}),dm=Ge({reverse4d_:function(n,t){var e=ke(n,"x","reverse");return ee(e.rank===4,function(){return"Error in reverse4D: x must be rank 4 but got rank "+e.rank+"."}),da(e,t)}});function Vc(n,t,e,r,i,o){var s=ke(n,"x","maxPool"),u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),r==null&&(r=[1,1]),ee(u.rank===4,function(){return"Error in maxPool: input must be rank 4 but got rank "+u.rank+"."}),ee(Zn(e,r),function(){return"Error in maxPool: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+r+"'"}),o!=null&&ee(ge(i),function(){return"Error in maxPool: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+i+"."});var d=_o(u.shape,t,e,r,i,o);if(d.filterWidth===1&&d.filterHeight===1&&le(d.inShape,d.outShape))return s.clone();var A=[u],O=ze.runKernelFunc(function(D,H){var te=D.maxPool(u,d);return H([u,te]),te},{x:u},function(D,H){var te=H[0],se=H[1];return{x:function(){return function(ae,ue,ye,we,ve,Ee,Te,Fe){var Le=ke(ae,"dy","maxPoolBackprop"),Me=ke(ue,"input","maxPoolBackprop"),Ne=ke(ye,"output","maxPoolBackprop");ee(Me.rank===Le.rank,function(){return"Rank of input ("+Me.rank+") does not match rank of dy ("+Le.rank+")"}),Ee==null&&(Ee=[1,1]),ee(Zn(ve,Ee),function(){return"Error in maxPoolBackProp: Either strides or dilations must be 1. Got strides "+ve+" and dilations '"+Ee+"'"}),ee(Le.rank===4,function(){return"Error in maxPoolBackprop: dy must be rank 4 but got rank "+Le.rank+"."}),ee(Me.rank===4,function(){return"Error in maxPoolBackprop: input must be rank 4 but got rank "+Me.rank+"."}),Fe!=null&&ee(ge(Te),function(){return"Error in maxPoolBackprop: pad must be an integer when using, dimRoundingMode "+Fe+" but got pad "+Te+"."});var Ze=_o(Me.shape,we,ve,Ee,Te,Fe);return ze.runKernelFunc(function(Xe){return Xe.maxPoolBackprop(Le,Me,Ne,Ze)},{$dy:Le,$input:Me})}(D,te,se,t,e,r,i)}}},"MaxPool",d,A);return l?O.as3D(O.shape[1],O.shape[2],O.shape[3]):O}function Gc(n,t,e,r,i,o){var s=ke(n,"x","avgPool","float32");r==null&&(r=[1,1]),ee(Zn(e,r),function(){return"Error in avgPool: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+r+"'"});var u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),ee(u.rank===4,function(){return"Error in avgPool: x must be rank 4 but got rank "+u.rank+"."}),o!=null&&ee(ge(i),function(){return"Error in avgPool: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+i+"."});var d=_o(u.shape,t,e,r,i,o);if(d.filterWidth===1&&d.filterHeight===1&&le(d.inShape,d.outShape))return s.clone();var A=ze.runKernelFunc(function(O){return O.avgPool(u,d)},{x:u},function(O){return{x:function(){return function(D,H,te,se,ae,ue){var ye=ke(D,"dy","avgPoolBackprop"),we=ke(H,"input","avgPoolBackprop");ee(we.rank===ye.rank,function(){return"Rank of input ("+we.rank+") does not match rank of dy ("+ye.rank+")"}),ae==null&&(ae=[1,1]),ee(Zn(se,ae),function(){return"Error in avgPoolBackprop: Either strides or dilations must be 1. Got strides "+se+" and dilations '"+ae+"'"});var ve=we,Ee=ye,Te=!1;we.rank===3&&(Te=!0,ve=we.as4D(1,we.shape[0],we.shape[1],we.shape[2]),Ee=ye.as4D(1,ye.shape[0],ye.shape[1],ye.shape[2])),ee(Ee.rank===4,function(){return"Error in avgPoolBackprop: dy must be rank 4 but got rank "+Ee.rank+"."}),ee(ve.rank===4,function(){return"Error in avgPoolBackprop: input must be rank 4 but got rank "+ve.rank+"."});var Fe=_o(ve.shape,te,se,ae,ue),Le=ze.runKernelFunc(function(Me){return Me.avgPoolBackprop(Ee,ve,Fe)},{dy4D:Ee,input4D:ve});return Te?Le.as3D(Le.shape[1],Le.shape[2],Le.shape[3]):Le}(O,u,t,e,r,i)}}},"AvgPool",d);return A=A.cast(s.dtype),l?A.as3D(A.shape[1],A.shape[2],A.shape[3]):A}var Bn=Ge({maxPool_:function(n,t,e,r,i){return Vc(n,t,e,1,r,i)}}),pa=Ge({avgPool_:function(n,t,e,r,i){return Gc(n,t,e,1,r,i)}}),pm=Ge({pool_:function(n,t,e,r,i,o){i==null&&(i=[1,1]),o==null&&(o=1),r===0&&(r="valid");var s=ke(n,"x","maxPool"),u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),ee(Zn(o,i),function(){return"Error in pool: Either strides or dilations must be 1. Got strides "+o+" and dilations '"+i+"'"});var d,A=_o(u.shape,t,o,i,r),O=[A.dilationHeight,A.dilationWidth];d=r==="same"?function(ve,Ee){var Te=ve.map(function(Me,Ne){return Me+(Me-1)*(Ee[Ne]-1)}).map(function(Me){return Me-1}),Fe=Te.map(function(Me){return Math.floor(Me/2)}),Le=Te.map(function(Me,Ne){return Me-Fe[Ne]});return Te.map(function(Me,Ne){return[Fe[Ne],Le[Ne]]})}([A.filterHeight,A.filterWidth],O):[[0,0],[0,0]];var D=O[0]===1&&O[1]===1,H=function(ve,Ee,Te){var Fe=Te.map(function(tt){return tt[0]}),Le=Te.map(function(tt){return tt[1]}),Me=ve.concat(Fe,Le),Ne=Ee.map(function(tt,ct){return(tt-Me[ct]%tt)%tt}),Ze=Le.map(function(tt,ct){return tt+Ne[ct]}),Xe=Ee.map(function(tt,ct){return[Fe[ct],Ze[ct]]}),qe=Ee.map(function(tt,ct){return[0,Ne[ct]]});return[Xe,qe]}([A.inHeight,A.inWidth],O,d),te=H[0],se=H[1],ae=D?r:"valid",ue=D?u:hl(u,O,te),ye=(e==="avg"?function(){return Gc(ue,t,o,1,ae)}:function(){return Vc(ue,t,o,1,ae)})(),we=D?ye:fl(ye,O,se);return l?we.as3D(we.shape[1],we.shape[2],we.shape[3]):we}}),hm=Ge({maxPool3d_:function(n,t,e,r,i,o,s){o===void 0&&(o="NDHWC");var u=ke(n,"x","maxPool3d"),l=u,d=!1;u.rank===4&&(d=!0,l=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3])),s==null&&(s=[1,1,1]),ee(l.rank===5,function(){return"Error in maxPool3d: x must be rank 5 but got rank "+l.rank+"."}),ee(o==="NDHWC",function(){return"Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of "+o}),ee(Zn(e,s),function(){return"Error in maxPool3d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+s+"'"}),i!=null&&ee(ge(r),function(){return"Error in maxPool3d: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+r+"."});var A=oa(l.shape,t,e,s,r,i,o),O=ze.runKernelFunc(function(D,H){var te=D.maxPool3d(l,A);return H([l,te]),te},{x:l},function(D,H){var te=H[0],se=H[1];return{x:function(){return function(ae,ue,ye,we,ve,Ee,Te,Fe){var Le=ke(ae,"dy","maxPool3dBackprop"),Me=ke(ue,"input","maxPool3dBackprop"),Ne=ke(ye,"output","maxPool3dBackprop"),Ze=Le,Xe=Me,qe=Ne,tt=!1;Me.rank===4&&(tt=!0,Ze=Le.as5D(1,Le.shape[0],Le.shape[1],Le.shape[2],Le.shape[3]),Xe=Me.as5D(1,Me.shape[0],Me.shape[1],Me.shape[2],Me.shape[3]),qe=Ne.as5D(1,Ne.shape[0],Ne.shape[1],Ne.shape[2],Ne.shape[3])),ee(Ze.rank===5,function(){return"Error in maxPool3dBackprop: dy must be rank 5 but got rank "+Ze.rank+"."}),ee(Xe.rank===5,function(){return"Error in maxPool3dBackprop: input must be rank 5 but got rank "+Xe.rank+"."}),ee(qe.rank===5,function(){return"Error in maxPool3dBackprop: output must be rank 5 but got rank "+qe.rank+"."}),Ee==null&&(Ee=[1,1,1]),ee(Zn(ve,Ee),function(){return"Error in maxPool3dBackprop: Either strides or dilations must be 1. Got strides "+ve+" and dilations '"+Ee+"'"}),Fe!=null&&ee(ge(Te),function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+Fe+" but got pad "+Te+"."});var ct=oa(Xe.shape,we,ve,Ee,Te,Fe),bt=ze.runKernelFunc(function(mt){return mt.maxPool3dBackprop(Ze,Xe,qe,ct)},{dy5D:Ze,input5D:Xe});return tt?bt.as4D(bt.shape[1],bt.shape[2],bt.shape[3],bt.shape[4]):bt}(D,te,se,t,e,s,r,i)}}});return d?O.as4D(O.shape[1],O.shape[2],O.shape[3],O.shape[4]):O}}),vm=Ge({avgPool3d_:function(n,t,e,r,i,o,s){o===void 0&&(o="NDHWC");var u=ke(n,"x","avgPool3d","float32"),l=u,d=!1;u.rank===4&&(d=!0,l=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3])),s==null&&(s=[1,1,1]),ee(l.rank===5,function(){return"Error in avgPool3d: x must be rank 5 but got rank "+l.rank+"."}),ee(o==="NDHWC",function(){return"Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of "+o}),ee(Zn(e,s),function(){return"Error in avgPool3d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+s+"'"}),i!=null&&ee(ge(r),function(){return"Error in avgPool3d: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+r+"."});var A=oa(l.shape,t,e,s,r,i,o),O=ze.runKernelFunc(function(D){return D.avgPool3d(l,A)},{x:l},function(D){return{x:function(){return function(H,te,se,ae,ue,ye,we){var ve=ke(H,"dy","avgPool3dBackprop"),Ee=ke(te,"input","avgPool3dBackprop"),Te=ve,Fe=Ee,Le=!1;Ee.rank===4&&(Le=!0,Te=ve.as5D(1,ve.shape[0],ve.shape[1],ve.shape[2],ve.shape[3]),Fe=Ee.as5D(1,Ee.shape[0],Ee.shape[1],Ee.shape[2],Ee.shape[3])),ee(Te.rank===5,function(){return"Error in avgPool3dBackprop: dy must be rank 5 but got rank "+Te.rank+"."}),ee(Fe.rank===5,function(){return"Error in avgPool3dBackprop: input must be rank 5 but got rank "+Fe.rank+"."}),ue==null&&(ue=[1,1,1]),ee(Zn(ae,ue),function(){return"Error in avgPool3dBackprop: Either strides or dilations must be 1. Got strides "+ae+" and dilations '"+ue+"'"}),we!=null&&ee(ge(ye),function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+we+" but got pad "+ye+"."});var Me=oa(Fe.shape,se,ae,ue,ye,we),Ne=ze.runKernelFunc(function(Ze){return Ze.avgPool3dBackprop(Te,Fe,Me)},{dy5D:Te,input5D:Fe});return Le?Ne.as4D(Ne.shape[1],Ne.shape[2],Ne.shape[3],Ne.shape[4]):Ne}(D,l,t,e,s,r,i)}}});return O=O.cast(l.dtype),d?O.as4D(O.shape[1],O.shape[2],O.shape[3],O.shape[4]):O}}),Di=Ge({slice_:function(n,t,e){var r,i,o=ke(n,"x","slice");if(o.rank===0)throw new Error("Slicing scalar is not possible");(r=typeof t=="number"?[t].concat(new Array(o.rank-1).fill(0)):t.length<o.rank?t.concat(new Array(o.rank-t.length).fill(0)):t.slice()).forEach(function(l){ee(l!==-1,function(){return"slice() does not support negative begin indexing."})}),i=(i=e==null?new Array(o.rank).fill(-1):typeof e=="number"?[e].concat(new Array(o.rank-1).fill(-1)):e.length<o.rank?e.concat(new Array(o.rank-e.length).fill(-1)):e).map(function(l,d){return l>=0?l:(ee(l===-1,function(){return"Negative size values should be exactly -1 but got "+l+" for the slice() size at index "+d+"."}),o.shape[d]-r[d])}),wl(o,r,i);var s=o.shape,u={begin:r,size:i};return ze.runKernelFunc(function(l){return l.slice(o,r,i)},{x:o},function(l){for(var d=[],A=0;A<l.rank;A++)d.push([r[A],s[A]-r[A]-i[A]]);return{x:function(){return l.pad(d)}}},"Slice",u)}}),mm=Ge({slice1d_:function(n,t,e){var r=ke(n,"x","slice1d");return ee(r.rank===1,function(){return"slice1d expects a rank-1 tensor, but got a rank-"+r.rank+" tensor"}),Di(r,[t],[e])}}),gm=Ge({slice2d_:function(n,t,e){var r=ke(n,"x","slice2d");return ee(r.rank===2,function(){return"slice2d expects a rank-2 tensor, but got a rank-"+r.rank+" tensor"}),Di(r,t,e)}}),Qc=Ge({slice3d_:function(n,t,e){var r=ke(n,"x","slice3d");return ee(r.rank===3,function(){return"slice3d expects a rank-3 tensor, but got a rank-"+r.rank+" tensor"}),Di(r,t,e)}}),ym=Ge({slice4d_:function(n,t,e){var r=ke(n,"x","slice4d");return ee(r.rank===4,function(){return"slice4d expects a rank-4 tensor, but got a rank-"+r.rank+" tensor"}),Di(r,t,e)}});function Xc(n,t,e,r,i){return t.rank<e.rank&&(t=t.reshape(On(t.shape,r))),n.rank<e.rank&&(n=n.reshape(On(n.shape,r))),{x:function(){var o=n.mul(e.equal(t).cast(n.dtype));return i==null?o:o.transpose(i)}}}var bm=Ge({all_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","all","bool"),i=be(t,r.shape),o=i,s=Vt(o,r.rank);s!=null&&(r=r.transpose(s),o=Pr(o.length,r.rank));var u=ze.runKernelFunc(function(d){return d.all(r,o)},{$x:r});if(e){var l=On(u.shape,i);return u.reshape(l)}return u}}),wm=Ge({any_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","any","bool"),i=be(t,r.shape),o=i,s=Vt(o,r.rank);s!=null&&(r=r.transpose(s),o=Pr(o.length,r.rank));var u=ze.runKernelFunc(function(d){return d.any(r,o)},{$x:r});if(e){var l=On(u.shape,i);return u.reshape(l)}return u}}),Am=Ge({argMax_:function(n,t){t===void 0&&(t=0);var e=ke(n,"x","argMax");t==null&&(t=0);var r=be(t,e.shape),i=Vt(r,e.rank);i!=null&&(e=e.transpose(i),r=Pr(r.length,e.rank));var o={axis:r[0]},s=[e];return ze.runKernelFunc(function(u,l){var d=u.argMax(e,r[0]);return l([e]),d},{x:e},function(u,l){var d=l[0];return{x:function(){return Cr(d)}}},"ArgMax",o,s)}}),xm=Ge({argMin_:function(n,t){t===void 0&&(t=0);var e=ke(n,"x","argMin");t==null&&(t=0);var r=be(t,e.shape),i=Vt(r,e.rank);return i!=null&&(e=e.transpose(i),r=Pr(r.length,e.rank)),ze.runKernelFunc(function(o,s){var u=o.argMin(e,r[0]);return s([e]),u},{$x:e},function(o,s){var u=s[0];return{$x:function(){return Cr(u)}}})}}),Em=Ge({logSumExp_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","logSumExp"),i=be(t,r.shape),o=r.max(i,!0),s=r.sub(o).exp().sum(i).log(),u=o.reshape(s.shape).add(s);if(e){var l=On(u.shape,i);return u.reshape(l)}return u}}),Qa=Ge({max_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","max"),i=r,o=be(t,r.shape),s=o,u=Vt(s,r.rank);u!=null&&(r=r.transpose(u),s=Pr(s.length,r.rank));var l=[r],d=ze.runKernelFunc(function(O,D){var H=O.max(r,s);return D([i,H]),H},{x:r},function(O,D){return Xc(O,D[1],D[0],o,u)},"Max",{axes:s},l,[!0]);if(e){var A=On(d.shape,o);d=d.reshape(A)}return d}}),Cm=Ge({mean_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","mean"),i=be(t,r.shape),o=ce(yn(r.shape,i)[1]);return ka(function(s){var u=Tt(o);return{value:(u.dtype===s.dtype?s:s.cast(u.dtype)).div(u).sum(t,e),gradFunc:function(l){var d=s.shape.slice();return i.forEach(function(A){d[A]=1}),l.reshape(d).mul(Mo(s.shape,"float32")).div(o)}}})(r)}}),Sm=Ge({min_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","min"),i=r,o=be(t,r.shape),s=o,u=Vt(s,r.rank);u!=null&&(r=r.transpose(u),s=Pr(s.length,r.rank));var l=[r],d=ze.runKernelFunc(function(O,D){var H=O.min(r,s);return D([i,H]),H},{x:r},function(O,D){return Xc(O,D[1],D[0],o,u)},"Min",{axes:s},l,[!0]);if(e){var A=On(d.shape,o);d=d.reshape(A)}return d}}),Im=Ge({moments_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=be(t,(n=ke(n,"x","moments")).shape),i=n.mean(r,e),o=i.shape;e||(o=On(i.shape,r));var s=n.toFloat().sub(i.reshape(o)).square();return{mean:i,variance:s.mean(r,e)}}}),Kc=Ge({sum_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","sum");r.dtype==="bool"&&(r=r.toInt());var i=be(t,r.shape);return ka(function(o){var s=Vt(i,o.rank),u=i,l=o;s!=null&&(l=o.transpose(s),u=Pr(u.length,o.rank));var d=function(H){var te=o.shape.slice();return i.forEach(function(se){te[se]=1}),H.reshape(te).mul(Mo(o.shape,"float32"))},A={axes:u},O=ze.runKernelFunc(function(H){return H.sum(l,u)},{x:l},function(H){return{x:function(){return d(H)}}},"Sum",A);if(e){var D=On(O.shape,i);O=O.reshape(D)}return{value:O,gradFunc:d}})(r)}}),Tm=Ge({prod_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","prod");r.dtype==="bool"&&(r=r.toInt());var i=be(t,r.shape),o=Vt(i,r.rank),s=i,u=r;o!=null&&(u=r.transpose(o),s=Pr(s.length,r.rank));var l=ze.runKernelFunc(function(A){return A.prod(u,s)},{permutedX:u});if(e){var d=On(l.shape,i);l=l.reshape(d)}return l}}),Zc=Ge({elu_:function(n){var t=ke(n,"x","elu");return ze.runKernelFunc(function(e,r){var i=e.elu(t);return r([i]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return ze.runKernelFunc(function(o){return o.eluDer(e,i)},{dy:e,y:i})}}})}}),Rm=Ge({leakyRelu_:function(n,t){t===void 0&&(t=.2);var e=ke(n,"x","leakyRelu");return zs(Tt(t).mul(e),e)}}),Jc=Ge({prelu_:function(n,t){var e=ke(n,"x","prelu"),r=ke(t,"alpha","prelu");return ze.runKernelFunc(function(i,o){var s=i.prelu(e,r);return o([e,r]),s},{x:e,alpha:r},function(i,o){var s=o[0],u=o[1],l=s.greater(0);return{x:function(){return Io(l,i,i.mul(u))},alpha:function(){var d=Io(l,Cr(i),i.mul(s)),A=In(u.shape,i.shape);return A.length>0&&(d=d.sum(A)),d.reshape(u.shape)}}},"Prelu")}}),un=Ge({relu_:function(n){var t=ke(n,"x","relu");return t.dtype==="bool"?t.toInt():ze.runKernelFunc(function(e,r){var i=e.relu(t);return r([t]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mulStrict(i.step().toFloat())}}},"Relu")}}),Yc=Ge({relu6_:function(n){var t=ke(n,"x","relu6");return t.dtype==="bool"?t.toInt():ze.runKernelFunc(function(e,r){var i=e.relu6(t);return r([t]),i},{x:t},function(e,r){var i=r[0],o=i.lessEqual(6).mul(i.step());return{x:function(){return e.mulStrict(o.toFloat())}}},"Relu6")}}),Om=Ge({selu_:function(n){var t=ke(n,"x","selu");return ze.runKernelFunc(function(e,r){var i=e.selu(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){var o=i.greater(Tt(0)),s=Tt(Fs),u=Tt(Ls),l=e.mul(u),d=e.mul(s).mul(i.toFloat().exp());return Io(o,l,d)}}})}}),ao=Ge({transpose_:function(n,t){var e=ke(n,"x","transpose");if(t==null&&(t=e.shape.map(function(i,o){return o}).reverse()),ee(e.rank===t.length,function(){return"Error in transpose: rank of input "+e.rank+" must match length of perm "+t+"."}),t.forEach(function(i){ee(i>=0&&i<e.rank,function(){return"All entries in 'perm' must be between 0 and "+(e.rank-1)+" but got "+t})}),e.rank<=1)return e.clone();var r={perm:t};return ze.runKernelFunc(function(i){return i.transpose(e,t)},{x:e},function(i){var o=Qr(t);return{x:function(){return i.transpose(o)}}},"Transpose",r)}}),km=Ge({localResponseNormalization_:function(n,t,e,r,i){t===void 0&&(t=5),e===void 0&&(e=1),r===void 0&&(r=1),i===void 0&&(i=.5);var o=ke(n,"x","localResponseNormalization");ee(o.rank===4||o.rank===3,function(){return`Error in localResponseNormalization: x must be rank 3 or 4 but got
rank `+o.rank+"."}),ee(ge(t),function(){return"Error in localResponseNormalization: depthRadius must be an integer but got depthRadius "+t+"."});var s=o,u=!1;o.rank===3&&(u=!0,s=o.as4D(1,o.shape[0],o.shape[1],o.shape[2]));var l=ze.runKernelFunc(function(d,A){var O=d.localResponseNormalization4D(s,t,e,r,i);return A([s,O]),O},{x4D:s},function(d,A){var O=A[0],D=A[1];return{x4D:function(){return ze.runKernelFunc(function(H){return H.LRNGrad(d,O,D,t,e,r,i)},{})}}});return u?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),$c=Ge({norm_:function(n,t,e,r){t===void 0&&(t="euclidean"),e===void 0&&(e=null),r===void 0&&(r=!1);var i=function u(l,d,A){if(A===void 0&&(A=null),l.rank===0)return l.abs();if(l.rank!==1&&A===null)return u(l.reshape([-1]),d,A);if(l.rank===1||typeof A=="number"||Array.isArray(A)&&A.length===1){if(d===1)return l.abs().sum(A);if(d===1/0)return l.abs().max(A);if(d===-1/0)return l.abs().min(A);if(d==="euclidean"||d===2)return l.abs().pow(Tt(2,"int32")).sum(A).sqrt();throw new Error("Error in norm: invalid ord value: "+d)}if(Array.isArray(A)&&A.length===2){if(d===1)return l.abs().sum(A[0]).max(A[1]-1);if(d===1/0)return l.abs().sum(A[1]).max(A[0]);if(d===-1/0)return l.abs().sum(A[1]).min(A[0]);if(d==="fro"||d==="euclidean")return l.square().sum(A).sqrt();throw new Error("Error in norm: invalid ord value: "+d)}throw new Error("Error in norm: invalid axis: "+A)}(n=ke(n,"x","norm"),t,e),o=i.shape;if(r){var s=be(e,n.shape);o=On(i.shape,s)}return i.reshape(o)}}),jm=Ge({basicLSTMCell_:function(n,t,e,r,i,o){var s=ke(n,"forgetBias","basicLSTMCell"),u=ke(t,"lstmKernel","basicLSTMCell"),l=ke(e,"lstmBias","basicLSTMCell"),d=ke(r,"data","basicLSTMCell"),A=ke(i,"c","basicLSTMCell"),O=ke(o,"h","basicLSTMCell"),D=d.concat(O,1).matMul(u).add(l),H=D.shape[0],te=D.shape[1]/4,se=[H,te],ae=D.slice([0,0],se),ue=D.slice([0,te],se),ye=D.slice([0,2*te],se),we=D.slice([0,3*te],se),ve=ae.sigmoid().mulStrict(ue.tanh()).addStrict(A.mulStrict(s.add(ye).sigmoid())),Ee=ve.tanh().mulStrict(we.sigmoid());return[ve,Ee]}}),Dm=Ge({multiRNNCell_:function(n,t,e,r){for(var i=ke(t,"data","multiRNNCell"),o=Oi(e,"c","multiRNNCell"),s=Oi(r,"h","multiRNNCell"),u=i,l=[],d=0;d<n.length;d++){var A=n[d](u,o[d],s[d]);l.push(A[0]),l.push(A[1]),u=A[1]}var O=[],D=[];for(d=0;d<l.length;d+=2)O.push(l[d]),D.push(l[d+1]);return[O,D]}}),Pm=Ge({movingAverage_:function(n,t,e,r,i){i===void 0&&(i=!0);var o=ke(n,"v","movingAverage"),s=ke(t,"x","movingAverage"),u=ke(e,"decay","movingAverage");$r(o,s),ee(le(o.shape,s.shape),function(){return"Shape mismatch in v and x"});var l=Tt(1),d=l.sub(u),A=s.sub(o).mul(d);if(i){ee(r!=null,function(){return"When using zeroDebias: true, step is required."});var O=ke(r,"step","movingAverage");A=A.div(l.sub(Ha(u,O)))}return o.add(A)}}),Bm=Ge({stridedSlice_:function(n,t,e,r,i,o,s,u,l){if(i===void 0&&(i=0),o===void 0&&(o=0),s===void 0&&(s=0),u===void 0&&(u=0),l===void 0&&(l=0),r==null&&(r=new Array(t.length)),s!==0)throw new Error("ellipsis mask is not yet supported");var d=ke(n,"x","stridedSlice"),A=ws(u),O=d.shape.slice();A.forEach(function(ae){t[ae]=0,e[ae]=1,O.splice(ae,0,1)}),d=d.reshape(O);for(var D=0;D<d.rank;D++)t[D]=Al(i,t,r,d.shape,D),e[D]=xl(o,e,r,d.shape,D),r[D]=r[D]||1;var H=ws(l);H.forEach(function(ae){e[ae]=t[ae]+1,r[ae]=1});var te=Oa(t,e,r),se=te.filter(function(ae,ue){return H.indexOf(ue)===-1});return r.every(function(ae){return ae===1})?Di(d,t,te).reshape(se):ze.runKernelFunc(function(ae){return ae.stridedSlice(d,t,e,r)},{$x:d}).reshape(se)}}),Mm=Ge({topk_:function(n,t,e){t===void 0&&(t=1),e===void 0&&(e=!0);var r=ke(n,"x","topk");if(r.rank===0)throw new Error("topk() expects the input to be of rank 1 or higher");var i=r.shape[r.shape.length-1];if(t>i)throw new Error("'k' passed to topk() must be <= the last dimension ("+i+") but got "+t);var o=ze.runKernelFunc(function(s){return s.topk(r,t,e)},{$x:r});return{values:o[0],indices:o[1]}}}),Nm=Ge({scatterND_:function(n,t,e){var r=ke(n,"indices","scatterND","int32"),i=ke(t,"updates","scatterND");return bl(i,r,e),ze.runKernelFunc(function(o){return o.scatterND(r,i,e)},{indices:r,updates:i},null,"ScatterNd",{shape:e})}}),Xs=Ge({fft_:function(n){ee(n.dtype==="complex64",function(){return"The dtype for tf.spectral.fft() must be complex64 but got "+n.dtype+"."});var t=n.shape[n.shape.length-1],e=n.size/t,r=n.as2D(e,t);return ze.runKernelFunc(function(i){return i.fft(r)},{input:n}).reshape(n.shape)}}),Xa=Ge({ifft_:function(n){ee(n.dtype==="complex64",function(){return"The dtype for tf.spectral.ifft() must be complex64 but got "+n.dtype+"."});var t=n.shape[n.shape.length-1],e=n.size/t,r=n.as2D(e,t);return ze.runKernelFunc(function(i){return i.ifft(r)},{input:n}).reshape(n.shape)}}),Ks=Ge({rfft_:function(n,t){ee(n.dtype==="float32",function(){return"The dtype for rfft() must be real value but got "+n.dtype});var e,r=n.shape[n.shape.length-1],i=n.size/r;if(t!=null&&t<r){var o=n.shape.map(function(ue){return 0}),s=n.shape.map(function(ue){return ue});s[n.shape.length-1]=t,e=n.slice(o,s),r=t}else if(t!=null&&t>r){var u=n.shape.map(function(ue){return ue});u[n.shape.length-1]=t-r,e=n.concat(en(u),n.shape.length-1),r=t}else e=n;var l=e.zerosLike(),d=Cn(e,l).as2D(i,r),A=Xs(d),O=Math.floor(r/2)+1,D=Ln(A),H=ki(A),te=D.split([O,r-O],D.shape.length-1),se=H.split([O,r-O],H.shape.length-1),ae=e.shape.slice();return ae[e.shape.length-1]=O,Cn(te[0],se[0]).reshape(ae)}}),qc=Ge({irfft_:function(n){var t=n.shape[n.shape.length-1],e=n.size/t;if(t<=2){var r=n.as2D(e,t),i=Xa(r);return Ln(i)}var o=[e,2*(t-1)],s=Ln(n).as2D(e,t),u=ki(n).as2D(e,t),l=s.slice([0,1],[e,t-2]).reverse(1),d=u.slice([0,1],[e,t-2]).reverse(1).mul(Tt(-1)),A=s.concat(l,1),O=u.concat(d,1);return r=Cn(A,O).as2D(o[0],o[1]),i=Xa(r),Ln(i)}}),_m=Object.freeze({fft:Xs,ifft:Xa,rfft:Ks,irfft:qc}),Fm=Ge({sparseToDense_:function(n,t,e,r){r===void 0&&(r=0);var i=ke(n,"sparseIndices","sparseToDense","int32"),o=ke(t,"sparseValues","sparseToDense"),s=ke(r,"defaultValue","sparseToDense",o.dtype);return function(u,l,d,A){if(u.dtype!=="int32")throw new Error("tf.sparseToDense() expects the indices to be int32 type, but the dtype was "+u.dtype+".");if(u.rank>2)throw new Error("sparseIndices should be a scalar, vector, or matrix, but got shape "+u.shape+".");var O=u.rank>0?u.shape[0]:1,D=u.rank>1?u.shape[1]:1;if(d.length!==D)throw new Error("outputShape has incorrect number of elements:, "+d.length+", should be: "+D+".");var H=l.size;if(l.rank!==0&&(l.rank!==1||H!==O))throw new Error("sparseValues has incorrect shape "+l.shape+", should be [] or ["+O+"]");if(l.dtype!==A.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(i,o,e,s),ze.runKernelFunc(function(u){return u.sparseToDense(i,o,e,s)},{$sparseIndices:i,$sparseValues:o,$defaultValue:s})}}),Lm=Ge({gatherND_:function(n,t){var e=ke(t,"indices","gatherND","int32"),r=ke(n,"x","gatherND");return ze.runKernelFunc(function(i){return i.gatherND(r,e)},{x:r,indices:e},null,"GatherNd")}}),Um=Ge({diag_:function(n){var t=ke(n,"x","diag").flatten(),e=n.shape.concat(n.shape);return ze.runKernelFunc(function(r){return r.diag(t)},{$x:t}).reshape(e)}}),Wm=Ge({dropout_:function(n,t,e,r){var i=ke(n,"x","dropout");if(ee(i.dtype==="float32",function(){return"x has to be a floating point tensor since it's going to be scaled, but got a "+i.dtype+" tensor instead."}),ee(t>=0&&t<1,function(){return"rate must be a float in the range [0, 1), but got "+t+"."}),t===0)return n instanceof Xt?i.clone():i;var o=function(l,d){if(d==null)return l.shape.slice();if(le(l.shape,d))return d;if(l.shape.length===d.length){for(var A=[],O=0;O<l.shape.length;O++)d[O]==null&&l.shape[O]!=null?A.push(l.shape[O]):A.push(d[O]);return A}return d}(i,e),s=1-t,u=pl(o,0,1,"float32",r).add(s).floor().div(s);return i.mul(u)}});function ef(n,t,e){for(var r=1-n%2,i=new Float32Array(n),o=0;o<n;++o){var s=2*Math.PI*o/(n+r-1);i[o]=t-e*Math.cos(s)}return Sn(i,"float32")}var Zs=Ge({hannWindow_:function(n){return ef(n,.5,.5)}}),tf=Ge({hammingWindow_:function(n){return ef(n,.54,.46)}}),Js=Ge({frame_:function(n,t,e,r,i){r===void 0&&(r=!1),i===void 0&&(i=0);for(var o=0,s=[];o+t<=n.size;)s.push(Di(n,o,t)),o+=e;if(r)for(;o<n.size;){var u=o+t-n.size,l=kn([Di(n,o,t-u),ji([u],i)]);s.push(l),o+=e}return s.length===0?io([],[0,t]):kn(s).as2D(s.length,t)}}),rf=Ge({stft_:function(n,t,e,r,i){var o;i===void 0&&(i=Zs),r==null&&(o=t,r=Math.floor(Math.pow(2,Math.ceil(Math.log(o)/Math.log(2)))));for(var s=Js(n,t,e),u=Hn(s,i(t)),l=[],d=0;d<s.shape[0];d++)l.push(Ks(u.slice([d,0],[1,t]),r));return kn(l)}}),zm=Object.freeze({hannWindow:Zs,hammingWindow:tf,frame:Js,stft:rf}),Vn,Hm=function(n,t,e){return e===void 0&&(e=1),E(this,void 0,void 0,function(){var r,i,o,s,u,l,d,A,O,D,H,te,se,ae;return C(this,function(ue){switch(ue.label){case 0:return r=ke(n,"predictions","inTopK"),i=ke(t,"targets","inTopK"),ee(r.rank>1,function(){return"inTopK() expects the predictions to be of rank 2 or higher, but got "+r.rank}),ee(r.rank-1===i.rank,function(){return"predictions rank should be 1 larger than targets rank, but got predictions rank "+r.rank+" and targets rank "+i.rank}),de(r.shape.slice(0,r.shape.length-1),i.shape,"predictions's shape should be align with the targets' shape, except the last dimension."),o=r.shape[r.shape.length-1],ee(e>0&&e<=o,function(){return"'k' passed to inTopK() must be > 0 && <= the predictions last dimension ("+o+"), but got "+e}),[4,r.data()];case 1:return s=ue.sent(),[4,i.data()];case 2:for(u=ue.sent(),l=[s.length/o,o],A=l[1],O=V("bool",d=l[0]),D=0;D<d;D++){for(H=D*A,te=s.subarray(H,H+A),se=[],ae=0;ae<te.length;ae++)se.push({value:te[ae],index:ae});for(se.sort(function(ye,we){return we.value-ye.value}),O[D]=0,ae=0;ae<e;ae++)if(se[ae].index===u[D]){O[D]=1;break}}return n!==r&&r.dispose(),t!==i&&i.dispose(),[2,Un(O,i.shape,"bool")]}})})};(function(n){n[n.NONE=0]="NONE",n[n.MEAN=1]="MEAN",n[n.SUM=2]="SUM",n[n.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"})(Vn||(Vn={}));var Vm=Ge({absoluteDifference_:function(n,t,e,r){r===void 0&&(r=Vn.SUM_BY_NONZERO_WEIGHTS);var i=ke(n,"labels","absoluteDifference"),o=ke(t,"predictions","absoluteDifference"),s=null;e!=null&&(s=ke(e,"weights","absoluteDifference")),de(i.shape,o.shape,"Error in absoluteDifference: ");var u=i.sub(o).abs();return Xi(u,s,r)}}),Xi=Ge({computeWeightedLoss_:function(n,t,e){e===void 0&&(e=Vn.SUM_BY_NONZERO_WEIGHTS);var r=ke(n,"losses","computeWeightedLoss"),i=null;t!=null&&(i=ke(t,"weights","computeWeightedLoss"));var o=i==null?r:r.mul(i);if(e===Vn.NONE)return o;if(e===Vn.SUM)return o.sum();if(e===Vn.MEAN){if(i==null)return o.mean();var s=r.size/i.size,u=o.sum().div(i.sum());return s>1?u.div(Tt(s)):u}if(e===Vn.SUM_BY_NONZERO_WEIGHTS){if(i==null)return o.sum().div(Tt(r.size));var l=i.mul(Mo(r.shape)).notEqual(Tt(0)).sum().toFloat();return o.sum().div(l)}throw Error("Unknown reduction: "+e)}}),Gm=Ge({cosineDistance_:function(n,t,e,r,i){i===void 0&&(i=Vn.SUM_BY_NONZERO_WEIGHTS);var o=ke(n,"labels","cosineDistance"),s=ke(t,"predictions","cosineDistance"),u=null;r!=null&&(u=ke(r,"weights","cosineDistance")),de(o.shape,s.shape,"Error in cosineDistance: ");var l=Tt(1).sub(o.mul(s).sum(e,!0));return Xi(l,u,i)}}),Qm=Ge({hingeLoss_:function(n,t,e,r){r===void 0&&(r=Vn.SUM_BY_NONZERO_WEIGHTS);var i=ke(n,"labels","hingeLoss"),o=ke(t,"predictions","hingeLoss"),s=null;e!=null&&(s=ke(e,"weights","hingeLoss")),de(i.shape,o.shape,"Error in hingeLoss: ");var u=Tt(1);i=Tt(2).mul(i).sub(u);var l=u.sub(i.mul(o)).relu();return Xi(l,s,r)}}),Xm=Ge({huberLoss_:function(n,t,e,r,i){r===void 0&&(r=1),i===void 0&&(i=Vn.SUM_BY_NONZERO_WEIGHTS);var o=ke(n,"labels","huberLoss"),s=ke(t,"predictions","huberLoss"),u=null;e!=null&&(u=ke(e,"weights","huberLoss")),de(o.shape,s.shape,"Error in huberLoss: ");var l=Tt(r),d=s.sub(o).abs(),A=Pc(d,l),O=d.sub(A),D=Tt(.5).mul(A.square()).add(l.mul(O));return Xi(D,u,i)}}),Km=Ge({logLoss_:function(n,t,e,r,i){r===void 0&&(r=1e-7),i===void 0&&(i=Vn.SUM_BY_NONZERO_WEIGHTS);var o=ke(n,"labels","logLoss"),s=ke(t,"predictions","logLoss"),u=null;e!=null&&(u=ke(e,"weights","logLoss")),de(o.shape,s.shape,"Error in logLoss: ");var l=Tt(1),d=Tt(r),A=o.mul(s.add(d).log()).neg().sub(l.sub(o).mul(l.sub(s).add(d).log()));return Xi(A,u,i)}}),Zm=Ge({meanSquaredError_:function(n,t,e,r){r===void 0&&(r=Vn.SUM_BY_NONZERO_WEIGHTS);var i=ke(n,"labels","meanSquaredError"),o=ke(t,"predictions","meanSquaredError"),s=null;e!=null&&(s=ke(e,"weights","meanSquaredError")),de(i.shape,o.shape,"Error in meanSquaredError: ");var u=i.squaredDifference(o);return Xi(u,s,r)}}),Jm=Ge({sigmoidCrossEntropy_:function(n,t,e,r,i){r===void 0&&(r=0),i===void 0&&(i=Vn.SUM_BY_NONZERO_WEIGHTS);var o=ke(n,"multiClassLabels","sigmoidCrossEntropy"),s=ke(t,"logits","sigmoidCrossEntropy"),u=null;if(e!=null&&(u=ke(e,"weights","sigmoidCrossEntropy")),de(o.shape,s.shape,"Error in sigmoidCrossEntropy: "),r>0){var l=Tt(r),d=Tt(1),A=Tt(.5);o=o.mul(d.sub(l)).add(A.mul(l))}var O=function(D,H){var te=ke(D,"labels","sigmoidCrossEntropyWithLogits"),se=ke(H,"logits","sigmoidCrossEntropyWithLogits");de(te.shape,se.shape,"Error in sigmoidCrossEntropyWithLogits: ");var ae=se.relu(),ue=se.mul(te),ye=se.abs().neg().exp().log1p();return ae.sub(ue).add(ye)}(o,s);return Xi(O,u,i)}}),Ym=Ge({softmaxCrossEntropy_:function(n,t,e,r,i){r===void 0&&(r=0),i===void 0&&(i=Vn.SUM_BY_NONZERO_WEIGHTS);var o=ke(n,"onehotLabels","softmaxCrossEntropy"),s=ke(t,"logits","softmaxCrossEntropy"),u=null;if(e!=null&&(u=ke(e,"weights","softmaxCrossEntropy")),de(o.shape,s.shape,"Error in softmaxCrossEntropy: "),r>0){var l=Tt(r),d=Tt(1),A=Tt(o.shape[1]);o=o.mul(d.sub(l)).add(l.div(A))}var O=function(D,H,te){if(te===void 0&&(te=-1),te===-1&&(te=H.rank-1),te!==H.rank-1)throw Error("Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank "+H.rank+" and dim was "+te);return ka(function(se,ae,ue){var ye=ae.logSumExp([te],!0),we=ae.toFloat().sub(ye);return ue([se,we]),{value:we.mul(se).neg().sum([te]),gradFunc:function(ve,Ee){var Te=Ee[0],Fe=Ee[1],Le=On(ve.shape,[te]);return[ve.reshape(Le).mul(Te.toFloat().sub(Fe.exp())),ve.reshape(Le).mul(Fe.exp().sub(Te.toFloat()))]}}})(D,H)}(o,s);return Xi(O,u,i)}}),$m=Object.freeze({get Reduction(){return Vn},absoluteDifference:Vm,computeWeightedLoss:Xi,cosineDistance:Gm,hingeLoss:Qm,huberLoss:Xm,logLoss:Km,meanSquaredError:Zm,sigmoidCrossEntropy:Jm,softmaxCrossEntropy:Ym});function nf(n,t){return t===void 0&&(t=!1),ze.tidy(function(){if(n.shape.length!==2)throw new Error("qr2d() requires a 2D Tensor, but got a "+n.shape.length+"D Tensor.");for(var e=n.shape[0],r=n.shape[1],i=dl(e),o=n.clone(),s=io([[1]],[1,1]),u=s.clone(),l=e>=r?r:e,d=function(O){var D,H=o,te=u,se=i;D=ze.tidy(function(){var ae=o.slice([O,O],[e-O,1]),ue=ae.norm(),ye=o.slice([O,O],[1,1]),we=io([[-1]]).where(ye.greater(0),io([[1]])),ve=ye.sub(we.mul(ue)),Ee=ae.div(ve);u=Ee.shape[0]===1?s.clone():s.concat(Ee.slice([1,0],[Ee.shape[0]-1,Ee.shape[1]]),0);var Te=we.matMul(ve).div(ue).neg(),Fe=o.slice([O,0],[e-O,r]),Le=Te.mul(u);if(O===0)o=Fe.sub(Le.matMul(u.transpose().matMul(Fe)));else{var Me=Fe.sub(Le.matMul(u.transpose().matMul(Fe)));o=o.slice([0,0],[O,r]).concat(Me,0)}var Ne=i.slice([0,O],[e,i.shape[1]-O]);if(O===0)i=Ne.sub(Ne.matMul(u).matMul(Le.transpose()));else{var Ze=Ne.sub(Ne.matMul(u).matMul(Le.transpose()));i=i.slice([0,0],[e,O]).concat(Ze,1)}return[u,o,i]}),u=D[0],o=D[1],i=D[2],Yt([H,te,se])},A=0;A<l;++A)d(A);return!t&&e>r&&(i=i.slice([0,0],[e,r]),o=o.slice([0,0],[r,r])),[i,o]})}var qm=Ge({bandPart_:function(n,t,e){if(t%1!=0)throw new Error("bandPart(): numLower must be an integer, got "+t+".");if(e%1!=0)throw new Error("bandPart(): numUpper must be an integer, got "+e+".");var r=ke(n,"a","bandPart");if(r.rank<2)throw new Error("bandPart(): Rank must be at least 2, got "+r.rank+".");var i=r.shape,o=r.shape.slice(-2),s=o[0],u=o[1];if(!(t<=s))throw new Error("bandPart(): numLower ("+t+") must not be greater than the number of rows ("+s+").");if(!(e<=u))throw new Error("bandPart(): numUpper ("+e+") must not be greater than the number of columns ("+u+").");t<0&&(t=s),e<0&&(e=u);var l=Ea(0,s,1,"int32").reshape([-1,1]),d=Ea(0,u,1,"int32"),A=Dn(l,d),O=za(A.lessEqual(Tt(+t,"int32")),A.greaterEqual(Tt(-e,"int32"))),D=en([s,u],r.dtype);return ai(jn(r.reshape([-1,s,u])).map(function(H){return Io(O,H,D)})).reshape(i)}}),eg=Ge({gramSchmidt_:function(n){var t;if(Array.isArray(n)){t=!1,ee(n!=null&&n.length>0,function(){return"Gram-Schmidt process: input must not be null, undefined, or empty"});for(var e=n[0].shape[0],r=function(l){ee(n[l].shape[0]===e,function(){return"Gram-Schmidt: Non-unique lengths found in the input vectors: ("+n[l].shape[0]+" vs. "+e+")"})},i=1;i<n.length;++i)r(i)}else t=!0,n=vs(n,n.shape[0],0).map(function(l){return vl(l,[0])});ee(n.length<=n[0].shape[0],function(){return"Gram-Schmidt: Number of vectors ("+n.length+") exceeds number of dimensions ("+n[0].shape[0]+")."});var o=[],s=n,u=function(l){o.push(ze.tidy(function(){var d=s[l];if(l>0)for(var A=0;A<l;++A){var O=Kc(o[A].mulStrict(d)).mul(o[A]);d=d.sub(O)}return d.div($c(d,"euclidean"))}))};for(i=0;i<n.length;++i)u(i);return t?ai(o,0):o}}),tg=Ge({qr_:function(n,t){if(t===void 0&&(t=!1),n.rank<2)throw new Error("qr() requires input tensor to have a rank >= 2, but got rank "+n.rank);if(n.rank===2)return nf(n,t);var e=n.shape.slice(0,n.shape.length-2).reduce(function(s,u){return s*u}),r=jn(n.reshape([e,n.shape[n.shape.length-2],n.shape[n.shape.length-1]]),0),i=[],o=[];return r.forEach(function(s){var u=nf(s,t),l=u[0],d=u[1];i.push(l),o.push(d)}),[ai(i,0).reshape(n.shape),ai(o,0).reshape(n.shape)]}}),rg=Object.freeze({bandPart:qm,gramSchmidt:eg,qr:tg});function Ka(n,t,e,r,i,o){r==null&&(r=.5),i==null&&(i=Number.NEGATIVE_INFINITY),o==null&&(o=0);var s=n.shape[0];return e=Math.min(e,s),ee(0<=r&&r<=1,function(){return"iouThreshold must be in [0, 1], but was '"+r+"'"}),ee(n.rank===2,function(){return"boxes must be a 2D tensor, but was of rank '"+n.rank+"'"}),ee(n.shape[1]===4,function(){return"boxes must have 4 columns, but 2nd dimension was "+n.shape[1]}),ee(t.rank===1,function(){return"scores must be a 1D tensor"}),ee(t.shape[0]===s,function(){return"scores has incompatible shape with boxes. Expected "+s+", but was "+t.shape[0]}),ee(0<=o&&o<=1,function(){return"softNmsSigma must be in [0, 1], but was '"+o+"'"}),{maxOutputSize:e,iouThreshold:r,scoreThreshold:i,softNmsSigma:o}}var ng=Ge({resizeBilinear_:function(n,t,e){e===void 0&&(e=!1);var r=ke(n,"images","resizeBilinear");ee(r.rank===3||r.rank===4,function(){return"Error in resizeBilinear: x must be rank 3 or 4, but got rank "+r.rank+"."}),ee(t.length===2,function(){return"Error in resizeBilinear: new shape must 2D, but got shape "+t+"."});var i=r,o=!1;r.rank===3&&(o=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var s=t[0],u=t[1],l=ze.runKernelFunc(function(d,A){return A([i]),d.resizeBilinear(i,s,u,e)},{x:i},function(d,A){return{x:function(){return ze.runKernelFunc(function(O){return O.resizeBilinearBackprop(d,A[0],e)},{})}}},"ResizeBilinear",{alignCorners:e,newHeight:s,newWidth:u});return o?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),ig=Ge({resizeNearestNeighbor_:function(n,t,e){e===void 0&&(e=!1);var r=ke(n,"images","resizeNearestNeighbor");ee(r.rank===3||r.rank===4,function(){return"Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank "+r.rank+"."}),ee(t.length===2,function(){return"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+t+"."}),ee(r.dtype==="float32"||r.dtype==="int32",function(){return"`images` must have `int32` or `float32` as dtype"});var i=r,o=!1;r.rank===3&&(o=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var s=t[0],u=t[1],l=ze.runKernelFunc(function(d,A){return A([i]),d.resizeNearestNeighbor(i,s,u,e)},{batchImages:i},function(d,A){return{batchImages:function(){return ze.runKernelFunc(function(O){return O.resizeNearestNeighborBackprop(d,A[0],e)},{})}}});return o?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),og=Ge({nonMaxSuppression_:function(n,t,e,r,i){r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY);var o=ke(n,"boxes","nonMaxSuppression"),s=ke(t,"scores","nonMaxSuppression"),u=Ka(o,s,e,r,i);e=u.maxOutputSize,r=u.iouThreshold,i=u.scoreThreshold;var l={maxOutputSize:e,iouThreshold:r,scoreThreshold:i};return ze.runKernelFunc(function(d){return d.nonMaxSuppression(o,s,e,r,i)},{boxes:o,scores:s},null,"NonMaxSuppressionV3",l)}}),ag=function(n,t,e,r,i){return r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),E(this,void 0,void 0,function(){var o,s,u,l,d,A,O;return C(this,function(D){switch(D.label){case 0:return o=ke(n,"boxes","nonMaxSuppressionAsync"),s=ke(t,"scores","nonMaxSuppressionAsync"),u=Ka(o,s,e,r,i),e=u.maxOutputSize,r=u.iouThreshold,i=u.scoreThreshold,[4,Promise.all([o.data(),s.data()])];case 1:return l=D.sent(),d=l[0],A=l[1],O=Rs(d,A,e,r,i),o!==n&&o.dispose(),s!==t&&s.dispose(),[2,O]}})})},sg=Ge({nonMaxSuppressionWithScore_:function(n,t,e,r,i,o){r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),o===void 0&&(o=0);var s=ke(n,"boxes","nonMaxSuppression"),u=ke(t,"scores","nonMaxSuppression"),l=Ka(s,u,e,r,i,o),d={maxOutputSize:e=l.maxOutputSize,iouThreshold:r=l.iouThreshold,scoreThreshold:i=l.scoreThreshold,softNmsSigma:o=l.softNmsSigma},A=ze.runKernel("NonMaxSuppressionV5",{boxes:s,scores:u},d);return{selectedIndices:A[0],selectedScores:A[1]}}}),ug=function(n,t,e,r,i,o){return r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),o===void 0&&(o=0),E(this,void 0,void 0,function(){var s,u,l,d,A,O,D;return C(this,function(H){switch(H.label){case 0:return s=ke(n,"boxes","nonMaxSuppressionAsync"),u=ke(t,"scores","nonMaxSuppressionAsync"),l=Ka(s,u,e,r,i,o),e=l.maxOutputSize,r=l.iouThreshold,i=l.scoreThreshold,o=l.softNmsSigma,[4,Promise.all([s.data(),u.data()])];case 1:return d=H.sent(),A=d[0],O=d[1],D=Os(A,O,e,r,i,o),s!==n&&s.dispose(),u!==t&&u.dispose(),[2,D]}})})},lg=Ge({cropAndResize_:function(n,t,e,r,i,o){var s=ke(n,"image","cropAndResize"),u=ke(t,"boxes","cropAndResize","float32"),l=ke(e,"boxInd","cropAndResize","int32");i=i||"bilinear",o=o||0;var d=u.shape[0];return ee(s.rank===4,function(){return"Error in cropAndResize: image must be rank 4,but got rank "+s.rank+"."}),ee(u.rank===2&&u.shape[1]===4,function(){return"Error in cropAndResize: boxes must be have size ["+d+",4] but had shape "+u.shape+"."}),ee(l.rank===1&&l.shape[0]===d,function(){return"Error in cropAndResize: boxInd must be have size ["+d+"] but had shape "+u.shape+"."}),ee(r.length===2,function(){return"Error in cropAndResize: cropSize must be of length 2, but got length "+r.length+"."}),ee(r[0]>=1&&r[1]>=1,function(){return"cropSize must be atleast [1,1], but was "+r}),ee(i==="bilinear"||i==="nearest",function(){return"method must be bilinear or nearest, but was "+i}),ze.runKernelFunc(function(A,O){return A.cropAndResize(s,u,l,r,i,o)},{images:s,boxes:u,boxInd:l},null,"CropAndResize",{method:i,extrapolationValue:o,cropSize:r})}}),Ys=Object.freeze({resizeBilinear:ng,resizeNearestNeighbor:ig,nonMaxSuppression:og,nonMaxSuppressionAsync:ag,nonMaxSuppressionWithScore:sg,nonMaxSuppressionWithScoreAsync:ug,cropAndResize:lg}),$s=function(n,t){return!(n>0)||t==="linear"},eu=function(n,t,e){if(e==null||e==="linear")return n;if(e==="relu")return n.mul(t.step());throw new Error("Gradient for activation "+e+" has not been implemented yet.")},tu=function(n,t){var e=t,r=In(n.shape,t.shape);return r.length>0&&(e=e.sum(r)),e.reshape(n.shape)},ru=function(n,t,e){if(t==="linear")return n;if(t==="relu")return un(n);if(t==="elu")return Zc(n);if(t==="relu6")return Yc(n);if(t==="prelu")return Jc(n,e);throw new Error("Unknown fused activation "+t+".")},cg=Ge({fusedMatMul_:function(n){var t,e=n.a,r=n.b,i=n.transposeA,o=i!==void 0&&i,s=n.transposeB,u=s!==void 0&&s,l=n.bias,d=n.activation,A=d===void 0?"linear":d,O=n.preluActivationWeights;if($s(ze.state.gradientDepth,A)===!1){var D=Ga(e,r,o,u);return l!=null&&(D=dr(D,l)),ru(D,A,O)}var H=ke(e,"a","fused matMul"),te=ke(r,"b","fused matMul");t=qt(H,te),H=t[0],te=t[1];var se=o?H.shape[H.rank-2]:H.shape[H.rank-1],ae=u?te.shape[te.rank-1]:te.shape[te.rank-2],ue=o?H.shape[H.rank-1]:H.shape[H.rank-2],ye=u?te.shape[te.rank-2]:te.shape[te.rank-1],we=H.shape.slice(0,-2),ve=te.shape.slice(0,-2),Ee=ce(we),Te=ce(ve);ee(H.rank>=2&&te.rank>=2&&H.rank===te.rank,function(){return"Error in fused matMul: inputs must have the same rank of at least 2, got ranks "+H.rank+" and "+te.rank+"."}),ee(le(we,ve),function(){return"Error in fused matMul: outer dimensions ("+we+") and ("+ve+") of Tensors with shapes "+H.shape+" and "+te.shape+" must match."}),ee(se===ae,function(){return"Error in fused matMul: inner shapes ("+se+") and ("+ae+") of Tensors with shapes "+H.shape+" and "+te.shape+" and transposeA="+o+" and transposeB="+u+" must match."});var Fe,Le,Me=H.shape.slice(0,-2).concat([ue,ye]),Ne=o?H.as3D(Ee,se,ue):H.as3D(Ee,ue,se),Ze=u?te.as3D(Te,ye,ae):te.as3D(Te,ae,ye);l!=null&&fr(Me,(Fe=qt(Fe=ke(l,"bias","fused matMul"),H)[0]).shape),O!=null&&(Le=ke(O,"prelu weights","fused matMul"));var Xe={a:Ne,b:Ze};l!=null&&(Xe.bias=Fe),O!=null&&(Xe.preluActivationWeights=Le);var qe=[Ne,Ze];return ze.runKernelFunc(function(tt,ct){var bt=tt.fusedBatchMatMul({a:Ne,b:Ze,transposeA:o,transposeB:u,bias:Fe,activation:A,preluActivationWeights:Le});return ct([Ne,Ze,bt]),bt},Xe,function(tt,ct){var bt=ct[0],mt=ct[1],ht=ct[2],At=eu(tt,ht,A),ft={};return l!=null&&(ft={bias:function(){return tu(Fe,At)}}),Object.assign(o||u?!o&&u?{a:function(){return At.matMul(mt,!1,!1)},b:function(){return At.matMul(bt,!0,!1)}}:o&&!u?{a:function(){return mt.matMul(At,!1,!0)},b:function(){return bt.matMul(At,!1,!1)}}:{a:function(){return mt.matMul(At,!0,!0)},b:function(){return At.matMul(bt,!0,!0)}}:{a:function(){return At.matMul(mt,!1,!0)},b:function(){return bt.matMul(At,!0,!1)}},ft)},"_FusedMatMul",{transposeA:o,transposeB:u,activation:A},qe,[!0]).reshape(Me)}}),fg=Ge({fusedConv2d_:function(n){var t=n.x,e=n.filter,r=n.strides,i=n.pad,o=n.dataFormat,s=o===void 0?"NHWC":o,u=n.dilations,l=u===void 0?[1,1]:u,d=n.dimRoundingMode,A=n.bias,O=n.activation,D=O===void 0?"linear":O,H=n.preluActivationWeights;if(D=D||"linear",$s(ze.state.gradientDepth,D)===!1){var te=yi(t,e,r,i,s,l,d);return A!=null&&(te=dr(te,A)),ru(te,D,H)}var se=ke(t,"x","conv2d"),ae=ke(e,"filter","conv2d"),ue=se,ye=!1;se.rank===3&&(ye=!0,ue=se.as4D(1,se.shape[0],se.shape[1],se.shape[2])),ee(ue.rank===4,function(){return"Error in fused conv2d: input must be rank 4, but got rank "+ue.rank+"."}),ee(ae.rank===4,function(){return"Error in fused conv2d: filter must be rank 4, but got rank "+ae.rank+"."}),d!=null&&ee(ge(i),function(){return"Error in fused conv2d: pad must be an integer when using, dimRoundingMode "+d+" but got pad "+i+"."}),ee(ue.shape[3]===ae.shape[2],function(){return"Error in conv2d: depth of input ("+ue.shape[3]+") must match input depth for filter "+ae.shape[2]+"."}),ee(Zn(r,l),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+l+"'"}),ee(s==="NHWC",function(){return"Error in conv2d: got dataFormat of "+s+" but only NHWC is currently supported."});var we,ve,Ee=oo(ue.shape,ae.shape,r,l,i,d);A!=null&&(we=qt(we=ke(A,"bias","fused conv2d"),se)[0],fr(Ee.outShape,we.shape)),H!=null&&(ve=ke(H,"prelu weights","fused conv2d"));var Te={x:ue,filter:ae};A!=null&&(Te.bias=we),H!=null&&(Te.preluActivationWeights=ve);var Fe=[ae,ue],Le=ze.runKernelFunc(function(Me,Ne){var Ze=Me.fusedConv2d({input:ue,filter:ae,convInfo:Ee,bias:we,activation:D,preluActivationWeights:ve});return Ne([ae,ue,Ze]),Ze},Te,function(Me,Ne){var Ze=Ne,Xe=Ze[0],qe=Ze[1],tt=Ze[2],ct=eu(Me,tt,D);ee(Eo(l),function(){return"Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+l+"'"});var bt={};return A!=null&&(bt={bias:function(){return tu(we,ct)}}),Object.assign({x:function(){return Wc(qe.shape,ct,Xe,r,i)},filter:function(){return Gs(qe,ct,Xe.shape,r,i)}},bt)},"FusedConv2D",{convInfo:Ee,activation:D},Fe,[!0]);return ye?Le.as3D(Le.shape[1],Le.shape[2],Le.shape[3]):Le}}),dg=Ge({fusedDepthwiseConv2d_:function(n){var t=n.x,e=n.filter,r=n.strides,i=n.pad,o=n.dataFormat,s=o===void 0?"NHWC":o,u=n.dilations,l=u===void 0?[1,1]:u,d=n.dimRoundingMode,A=n.bias,O=n.activation,D=O===void 0?"linear":O,H=n.preluActivationWeights;if($s(ze.state.gradientDepth,D)===!1){var te=Va(t,e,r,i,s,l,d);return A!=null&&(te=dr(te,A)),ru(te,D,H)}var se=ke(t,"x","depthwiseConv2d"),ae=ke(e,"filter","depthwiseConv2d"),ue=se,ye=!1;se.rank===3&&(ye=!0,ue=se.as4D(1,se.shape[0],se.shape[1],se.shape[2])),ee(ue.rank===4,function(){return"Error in fused depthwiseConv2d: input must be rank 4, but got rank "+ue.rank+"."}),ee(ae.rank===4,function(){return"Error in fused depthwiseConv2d: filter must be rank 4, but got rank "+ae.rank+"."}),ee(ue.shape[3]===ae.shape[2],function(){return"Error in fused depthwiseConv2d: number of input channels ("+ue.shape[3]+") must match the inChannels dimension in filter "+ae.shape[2]+"."}),l==null&&(l=[1,1]),ee(Zn(r,l),function(){return"Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+l+"'"}),d!=null&&ee(ge(i),function(){return"Error in fused depthwiseConv2d: pad must be an integer when using dimRoundingMode "+d+" but got pad "+i+"."});var we,ve,Ee=oo(ue.shape,ae.shape,r,l,i,d,!0);A!=null&&(we=qt(we=ke(A,"bias","fused conv2d"),se)[0],fr(Ee.outShape,we.shape)),H!=null&&(ve=ke(H,"prelu weights","fused depthwiseConv2d"));var Te={x:ue,filter:ae};A!=null&&(Te.bias=we),H!=null&&(Te.preluActivationWeights=ve);var Fe=[ae,ue],Le=ze.runKernelFunc(function(Me,Ne){var Ze=Me.fusedDepthwiseConv2D({input:ue,filter:ae,convInfo:Ee,bias:we,activation:D,preluActivationWeights:ve});return Ne([ae,ue,Ze]),Ze},Te,function(Me,Ne){ee(Eo(l),function(){return"Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+l+"'"});var Ze=Ne[0],Xe=Ne[1],qe=Ne[2],tt=eu(Me,qe,D),ct={};return A!=null&&(ct={bias:function(){return tu(we,tt)}}),Object.assign({x:function(){return zc(Xe.shape,tt,Ze,Ee)},filter:function(){return Hc(Xe,tt,Ze.shape,Ee)}},ct)},"FusedDepthwiseConv2D",{convInfo:Ee,activation:D},Fe,[!0]);return ye?Le.as3D(Le.shape[1],Le.shape[2],Le.shape[3]):Le}}),pg=Object.freeze({matMul:cg,conv2d:fg,depthwiseConv2d:dg}),hg=Object.freeze({image:Ys,linalg:rg,losses:$m,spectral:_m,fused:pg,signal:zm,square:Kh,squaredDifference:Ec,conv1d:nm,conv2d:yi,conv3d:im,depthwiseConv2d:Va,separableConv2d:Qs,conv2dTranspose:om,conv3dTranspose:am,op:Ge,batchNormalization2d:Cv,batchNormalization3d:Sv,batchNormalization4d:Iv,batchNormalization:Tv,batchNorm:Oc,batchNorm2d:Rv,batchNorm3d:Ov,batchNorm4d:kv,booleanMaskAsync:rm,complex:Cn,real:Ln,imag:ki,concat:kn,concat1d:Md,concat2d:Nd,concat3d:_d,concat4d:Fd,split:vs,matMul:Ga,dot:sm,outerProduct:um,reverse:da,reverse1d:lm,reverse2d:cm,reverse3d:fm,reverse4d:dm,maxPool:Bn,avgPool:pa,pool:pm,maxPool3d:hm,avgPool3d:vm,slice:Di,slice1d:mm,slice2d:gm,slice3d:Qc,slice4d:ym,abs:Zh,acos:Jh,acosh:Yh,asin:$h,asinh:qh,atan:ev,atanh:tv,ceil:rv,clipByValue:Us,cos:nv,cosh:iv,erf:ov,exp:Ws,expm1:av,floor:sv,log:uv,log1p:lv,logSigmoid:cv,neg:La,reciprocal:fv,round:dv,rsqrt:Cc,sigmoid:Sc,sign:pv,isNaN:hv,isInf:vv,isFinite:mv,sin:gv,sinh:yv,softplus:bv,sqrt:wv,step:Av,tan:xv,tanh:Ev,all:bm,any:wm,argMax:Am,argMin:xm,logSumExp:Em,max:Qa,mean:Cm,min:Sm,moments:Im,sum:Kc,prod:Tm,equal:Bc,equalStrict:Qv,greater:Xv,greaterEqual:Mc,greaterEqualStrict:Kv,greaterStrict:Zv,less:Jv,lessEqual:Yv,lessEqualStrict:$v,lessStrict:qv,notEqual:em,notEqualStrict:tm,add:dr,addN:Pv,addStrict:Bv,atan2:Mv,div:Si,divNoNan:Nv,divStrict:_v,floorDiv:Dc,maximum:zs,maximumStrict:Fv,minimum:Pc,minimumStrict:Lv,mod:Uv,modStrict:Wv,mul:Hn,mulStrict:zv,pow:Ha,powStrict:Hv,squaredDifferenceStrict:Vv,sub:Dn,subStrict:Gv,elu:Zc,leakyRelu:Rm,prelu:Jc,relu:un,relu6:Yc,selu:Om,logicalAnd:za,logicalNot:jv,logicalOr:kc,logicalXor:Dv,where:Io,whereAsync:jc,buffer:nr,print:Xd,batchToSpaceND:fl,broadcastTo:Kd,cast:Zd,clone:Jd,cumsum:Yd,depthToSpace:$d,expandDims:gi,eye:dl,multinomial:qd,oneHot:gs,pad:xo,pad1d:ep,pad2d:tp,pad3d:rp,pad4d:np,rand:ip,randomNormal:op,randomGamma:ap,randomUniform:pl,reshape:Ei,spaceToBatchND:hl,squeeze:vl,stack:ai,tile:No,truncatedNormal:sp,unstack:jn,setdiff1dAsync:up,fill:ji,linspace:Bd,ones:Mo,range:Ea,scalar:Tt,tensor:Un,tensor1d:Sn,tensor2d:io,tensor3d:hs,tensor4d:ei,tensor5d:jd,tensor6d:Dd,variable:Pd,zeros:en,onesLike:cl,zerosLike:Cr,transpose:ao,softmax:Vi,logSoftmax:cp,localResponseNormalization:km,norm:$c,gather:Hs,unsortedSegmentSum:Fc,basicLSTMCell:jm,multiRNNCell:Dm,movingAverage:Pm,stridedSlice:Bm,topk:Mm,scatterND:Nm,fft:Xs,ifft:Xa,rfft:Ks,irfft:qc,sparseToDense:Fm,gatherND:Lm,diag:Um,dropout:Wm,hannWindow:Zs,hammingWindow:tf,frame:Js,stft:rf,inTopKAsync:Hm});function wt(n,t){Array.isArray(n)||(n=[n]),n.forEach(function(e){e!=null&&ee(e.dtype!=="complex64",function(){return t+" does not support complex64 tensors."})})}function nu(n,t,e,r){if(e==="linear")return n.linear(t);if(e==="relu")return n.relu(t);if(e==="elu")return n.elu(t);if(e==="relu6")return n.relu6(t);if(e==="prelu")return n.prelu(t,r);throw new Error("Activation "+e+" has not been implemented for the CPU backend.")}var vg=function(n){function t(){var e=n.call(this)||this;return e.blockSize=48,e.firstUse=!0,e.data=new El(e,ze),e}return I(t,n),t.prototype.write=function(e,r,i){this.firstUse&&(this.firstUse=!1,M().get("IS_NODE")&&xi(`
============================
Hi there \u{1F44B}. Looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, which binds to TensorFlow C++, by running npm i @tensorflow/tfjs-node, or npm i @tensorflow/tfjs-node-gpu if you have CUDA. Then call require('@tensorflow/tfjs-node'); (-gpu suffix for CUDA) at the start of your program. Visit https://github.com/tensorflow/tfjs-node for more details.
============================`));var o={};return this.data.set(o,{values:e,dtype:i}),o},t.prototype.move=function(e,r,i,o){this.data.set(e,{values:r,dtype:o})},t.prototype.numDataIds=function(){return this.data.numDataIds()},t.prototype.read=function(e){return E(this,void 0,void 0,function(){return C(this,function(r){return[2,this.readSync(e)]})})},t.prototype.readSync=function(e){var r=this.data.get(e),i=r.dtype,o=r.complexTensors;return i==="complex64"?Ts(this.readSync(o.real.dataId),this.readSync(o.imag.dataId)):this.data.get(e).values},t.prototype.bufferSync=function(e){var r=this.readSync(e.dataId),i=r;if(e.dtype==="string")try{i=r.map(function(o){return st(o)})}catch(o){throw new Error("Failed to decode encoded string bytes into utf-8")}return nr(e.shape,e.dtype,i)},t.prototype.makeOutput=function(e,r,i){var o=this.write(e,r,i);return ze.makeTensorFromDataId(o,r,i,this)},t.prototype.disposeData=function(e){if(this.data.has(e)){var r=this.data.get(e).complexTensors;r!=null&&(r.real.dispose(),r.imag.dispose()),this.data.delete(e)}},t.prototype.time=function(e){return E(this,void 0,void 0,function(){var r;return C(this,function(i){return r=_e(),e(),[2,{kernelMs:_e()-r}]})})},t.prototype.memory=function(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}},t.prototype.complex=function(e,r){var i=this.makeOutput(null,e.shape,"complex64");return this.data.get(i.dataId).complexTensors={real:ze.keep(e.clone()),imag:ze.keep(r.clone())},i},t.prototype.real=function(e){return this.data.get(e.dataId).complexTensors.real.clone()},t.prototype.imag=function(e){return this.data.get(e.dataId).complexTensors.imag.clone()},t.prototype.slice=function(e,r,i){if(wt(e,"slice"),As(e.shape,r,i)){var o=xs(r,e.strides),s=ce(i);return Un(this.readSync(e.dataId).subarray(o,o+s),i,e.dtype)}for(var u=nr(i,e.dtype),l=this.bufferSync(e),d=0;d<u.size;++d){var A=u.indexToLoc(d).map(function(O,D){return O+r[D]});u.values[d]=l.get.apply(l,A)}return u.toTensor()},t.prototype.stridedSlice=function(e,r,i,o){wt(e,"stridedSlice");var s=Oa(r,i,o);if(s.some(function(H){return H===0}))return Un([],s);for(var u=nr(s,e.dtype),l=this.bufferSync(e),d=0;d<u.size;d++){for(var A=u.indexToLoc(d),O=new Array(A.length),D=0;D<O.length;D++)O[D]=A[D]*o[D]+r[D];u.set.apply(u,[l.get.apply(l,O)].concat(A))}return u.toTensor()},t.prototype.diag=function(e){for(var r=this.readSync(e.dataId),i=nr([e.size,e.size],e.dtype),o=i.values,s=0;s<r.length;s++)o[s*e.size+s]=r[s];return i.toTensor()},t.prototype.unstack=function(e,r){for(var i=e.shape[r],o=new Array(e.rank-1),s=0,u=0;u<e.rank;u++)u!==r&&(o[s++]=e.shape[u]);var l=new Array(e.rank).fill(0),d=e.shape.slice();d[r]=1;var A=new Array(i);for(u=0;u<A.length;u++)l[r]=u,A[u]=this.slice(e,l,d).reshape(o);return A},t.prototype.reverse=function(e,r){wt(e,"reverse");for(var i=nr(e.shape,e.dtype),o=this.bufferSync(e),s=function(l){var d=i.indexToLoc(l),A=d.slice();r.forEach(function(O){return A[O]=e.shape[O]-1-A[O]}),i.set.apply(i,[o.get.apply(o,A)].concat(d))},u=0;u<i.size;u++)s(u);return i.toTensor()},t.prototype.concat=function(e,r){var i=this;if(e[0].dtype==="complex64"){var o=e.map(function(H){return Ln(H)}),s=e.map(function(H){return ki(H)});return Cn(this.concat(o,r),this.concat(s,r))}var u=e.map(function(H){var te=ce(H.shape.slice(r));return H.as2D(-1,te)}),l=mi(u.map(function(H){return H.shape}),1),d=nr(l,e[0].dtype).values;if(u[0].shape[0]===1){var A=0;u.forEach(function(H){d.set(i.readSync(H.dataId),A),A+=H.size})}else{var O=0;u.forEach(function(H){for(var te=i.readSync(H.dataId),se=0,ae=0;ae<H.shape[0];++ae)for(var ue=ae*l[1]+O,ye=0;ye<H.shape[1];++ye)d[ue+ye]=te[se++];O+=H.shape[1]})}var D=mi(e.map(function(H){return H.shape}),r);return Un(d,D,e[0].dtype)},t.prototype.neg=function(e){return wt(e,"neg"),this.multiply(Tt(-1),e)},t.prototype.add=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,o,s,u){return{real:i+s,imag:o+u}}):this.broadcastedBinaryOp(e,r,rr(e.dtype,r.dtype),function(i,o){return i+o})},t.prototype.addN=function(e){var r=this;wt(e,"addN");for(var i=e.map(function(A){return r.readSync(A.dataId)}),o=nr(e[0].shape,e[0].dtype),s=o.values,u=0;u<e.length;u++)for(var l=i[u],d=0;d<s.length;d++)s[d]+=l[d];return o.toTensor()},t.prototype.softmax=function(e,r){var i=be([r],e.shape),o=this.max(e,i),s=On(o.shape,i),u=this.subtract(e,o.reshape(s)),l=this.exp(u),d=this.sum(l,i).reshape(s);return this.realDivide(l,d)},t.prototype.subtract=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,o,s,u){return{real:i-s,imag:o-u}}):this.broadcastedBinaryOp(e,r,rr(e.dtype,r.dtype),function(i,o){return i-o})},t.prototype.pow=function(e,r){return wt([e,r],"pow"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,o){return Math.pow(i,o)})},t.prototype.batchMatMul=function(e,r,i,o){wt([e,r],"matMul");for(var s=i?e.shape[1]:e.shape[2],u=i?e.shape[2]:e.shape[1],l=o?r.shape[1]:r.shape[2],d=e.shape[0],A=this.readSync(e.dataId),O=this.readSync(r.dataId),D=i?[e.strides[0],1,e.strides[1]]:[e.strides[0],e.strides[1],1],H=D[0],te=D[1],se=D[2],ae=o?[1,r.strides[1],r.strides[0]]:[r.strides[1],1,r.strides[0]],ue=ae[0],ye=ae[1],we=ae[2],ve=u*l,Ee=nr([d,u,l],e.dtype),Te=Ee.values,Fe=this.blockSize,Le=0;Le<d;Le++)for(var Me=0;Me<u;Me+=Fe)for(var Ne=0;Ne<l;Ne+=Fe)for(var Ze=0;Ze<s;Ze+=Fe)for(var Xe=Math.min(Me+Fe,u),qe=Math.min(Ne+Fe,l),tt=Math.min(Ze+Fe,s),ct=Me;ct<Xe;ct++)for(var bt=Ne;bt<qe;bt++){for(var mt=0,ht=Ze;ht<tt;ht++)mt+=A[Le*H+ct*te+ht*se]*O[ht*ue+bt*ye+Le*we];Te[Le*ve+(ct*l+bt)]+=mt}return Ee.toTensor()},t.prototype.fusedBatchMatMul=function(e){var r=e.a,i=e.b,o=e.transposeA,s=e.transposeB,u=e.bias,l=e.activation,d=e.preluActivationWeights,A=this.batchMatMul(r,i,o,s);return u&&(A=this.add(A,u)),l&&(A=nu(this,A,l,d)),A},t.prototype.multiply=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,o,s,u){return{real:i*s-o*u,imag:i*u+o*s}}):this.broadcastedBinaryOp(e,r,rr(e.dtype,r.dtype),function(i,o){return i*o})},t.prototype.realDivide=function(e,r){return wt([e,r],"realDivide"),this.broadcastedBinaryOp(e,r,"float32",function(i,o){return i/o})},t.prototype.floorDiv=function(e,r){return wt([e,r],"floorDiv"),this.broadcastedBinaryOp(e,r,"int32",function(i,o){return Math.floor(i/o)})},t.prototype.sum=function(e,r){wt(e,"sum"),It("sum",r,e.rank);for(var i=yn(e.shape,r),o=i[0],s=i[1],u=en(o,rr(e.dtype,"int32")),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),O=0;O<d.length;++O){for(var D=O*l,H=0,te=0;te<l;++te)H+=A[D+te];d[O]=H}return u},t.prototype.prod=function(e,r){wt(e,"sum");for(var i=yn(e.shape,r),o=i[0],s=i[1],u=en(o,rr(e.dtype,"int32")),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),O=0;O<d.length;++O){for(var D=O*l,H=1,te=0;te<l;++te)H*=A[D+te];d[O]=H}return u},t.prototype.unsortedSegmentSum=function(e,r,i){wt(e,"unsortedSegmentSum");for(var o=[],s=e.rank-r.rank,u=0;u<s;++u)r=r.expandDims(u+1);for(u=0;u<i;++u){var l=Tt(u,"int32"),d=Bc(l,r).asType("float32").mul(e).sum(0);o.push(d)}return ai(o)},t.prototype.argMin=function(e,r){wt(e,"argMin");var i=[r];It("argMin",i,e.rank);for(var o=yn(e.shape,i),s=o[0],u=o[1],l=en(s,"int32"),d=ce(u),A=this.readSync(l.dataId),O=this.readSync(e.dataId),D=0;D<A.length;++D){for(var H=D*d,te=O[H],se=0,ae=0;ae<d;++ae){var ue=O[H+ae];ue<te&&(te=ue,se=ae)}A[D]=se}return l},t.prototype.argMax=function(e,r){wt(e,"argMax");var i=[r];It("argMax",i,e.rank);for(var o=yn(e.shape,i),s=o[0],u=o[1],l=en(s,"int32"),d=ce(u),A=this.readSync(l.dataId),O=this.readSync(e.dataId),D=0;D<A.length;++D){for(var H=D*d,te=O[H],se=0,ae=0;ae<d;++ae){var ue=O[H+ae];ue>te&&(te=ue,se=ae)}A[D]=se}return l},t.prototype.cumsum=function(e,r,i,o){if(wt(e,"cumsum"),r!==e.rank-1)throw new Error("backend.cumsum in CPU expects an inner-most axis="+(e.rank-1)+" but got axis="+r);for(var s=rr(e.dtype,"int32"),u=en(e.shape,s),l=this.readSync(u.dataId),d=this.readSync(e.dataId),A=e.shape[e.rank-1],O=o?function(ae,ue){return ae+A-ue-1}:function(ae,ue){return ae+ue},D=0;D<d.length;D+=A)for(var H=0;H<A;H++){var te=O(D,H);if(H===0)l[te]=i?0:d[te];else{var se=O(D,H-1);l[te]=i?d[se]+l[se]:d[te]+l[se]}}return u},t.prototype.equal=function(e,r){return wt([e,r],"equal"),this.broadcastedBinaryOp(e,r,"bool",function(i,o){return i===o?1:0})},t.prototype.notEqual=function(e,r){return wt([e,r],"notEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,o){return i!==o?1:0})},t.prototype.less=function(e,r){return wt([e,r],"less"),this.broadcastedBinaryOp(e,r,"bool",function(i,o){return i<o?1:0})},t.prototype.lessEqual=function(e,r){return wt([e,r],"lessEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,o){return i<=o?1:0})},t.prototype.greater=function(e,r){return wt([e,r],"greater"),this.broadcastedBinaryOp(e,r,"bool",function(i,o){return i>o?1:0})},t.prototype.greaterEqual=function(e,r){return wt([e,r],"greaterEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,o){return i>=o?1:0})},t.prototype.logicalNot=function(e){wt(e,"logicalNot");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),o=0;o<r.length;++o)i[o]=r[o]?0:1;return this.makeOutput(i,e.shape,"bool")},t.prototype.logicalAnd=function(e,r){return wt([e,r],"logicalAnd"),this.broadcastedBinaryOp(e,r,"bool",function(i,o){return i&&o})},t.prototype.logicalOr=function(e,r){return wt([e,r],"logicalOr"),this.broadcastedBinaryOp(e,r,"bool",function(i,o){return i||o})},t.prototype.select=function(e,r,i){wt([e,r,i],"select");for(var o=this.readSync(e.dataId),s=this.readSync(r.dataId),u=this.readSync(i.dataId),l=en(r.shape,rr(r.dtype,i.dtype)),d=this.readSync(l.dataId),A=0,O=e.rank===0||e.rank>1||r.rank===1?1:ce(r.shape.slice(1)),D=0;D<o.length;D++)for(var H=0;H<O;H++)o[D]===1?d[A++]=s[D]:d[A++]=u[D];return l},t.prototype.where=function(e){wt([e],"where");var r=this.readSync(e.dataId);return ks(e.shape,r)},t.prototype.topk=function(e,r,i){return wt(e,"topk"),kl(this.readSync(e.dataId),e.shape,e.dtype,r)},t.prototype.min=function(e,r){wt(e,"min"),It("min",r,e.rank);for(var i=yn(e.shape,r),o=i[0],s=i[1],u=en(o,e.dtype),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),O=0;O<d.length;++O){for(var D=O*l,H=A[D],te=0;te<l;++te){var se=A[D+te];se<H&&(H=se)}d[O]=H}return u},t.prototype.minimum=function(e,r){return wt([e,r],"minimum"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,o){return Math.min(i,o)})},t.prototype.mod=function(e,r){return wt([e,r],"mod"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,o){var s=i%o;return i<0&&o<0||i>=0&&o>=0?s:(s+o)%o})},t.prototype.max=function(e,r){wt(e,"max"),It("max",r,e.rank);for(var i=yn(e.shape,r),o=i[0],s=i[1],u=en(o,e.dtype),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),O=0;O<d.length;++O){for(var D=O*l,H=A[D],te=0;te<l;++te){var se=A[D+te];se>H&&(H=se)}d[O]=H}return u},t.prototype.maximum=function(e,r){return wt([e,r],"maximum"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,o){return Math.max(i,o)})},t.prototype.all=function(e,r){wt(e,"all"),It("all",r,e.rank);for(var i=yn(e.shape,r),o=i[0],s=i[1],u=en(o,e.dtype),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),O=0;O<d.length;++O){for(var D=O*l,H=A[D],te=0;te<l;++te){var se=A[D+te];H=H&&se}d[O]=H}return u},t.prototype.any=function(e,r){wt(e,"any"),It("any",r,e.rank);for(var i=yn(e.shape,r),o=i[0],s=i[1],u=en(o,e.dtype),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),O=0;O<d.length;++O){for(var D=O*l,H=A[D],te=0;te<l;++te){var se=A[D+te];H=H||se}d[O]=H}return u},t.prototype.squaredDifference=function(e,r){return wt([e,r],"squaredDifference"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,o){var s=i-o;return s*s})},t.prototype.ceil=function(e){wt(e,"ceil");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o)i[o]=Math.ceil(r[o]);return this.makeOutput(i,e.shape,"float32")},t.prototype.floor=function(e){wt(e,"floor");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o)i[o]=Math.floor(r[o]);return this.makeOutput(i,e.shape,"float32")},t.prototype.sign=function(e){wt(e,"x");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o)r[o]<0?i[o]=-1:r[o]>0?i[o]=1:i[o]=0;return this.makeOutput(i,e.shape,"float32")},t.prototype.isNaN=function(e){wt(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),o=0;o<r.length;++o)Number.isNaN(r[o])&&(i[o]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.isInf=function(e){wt(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),o=0;o<r.length;++o)Math.abs(r[o])===1/0&&(i[o]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.isFinite=function(e){wt(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),o=0;o<r.length;++o)Number.isFinite(r[o])&&(i[o]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.round=function(e){wt(e,"round");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o){var s=Math.floor(r[o]);r[o]-s<.5?i[o]=Math.floor(r[o]):r[o]-s>.5?i[o]=Math.ceil(r[o]):i[o]=s%2==0?s:s+1}return this.makeOutput(i,e.shape,"float32")},t.prototype.exp=function(e){wt(e,"exp");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o)i[o]=Math.exp(r[o]);return this.makeOutput(i,e.shape,"float32")},t.prototype.expm1=function(e){wt(e,"expm1");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o)i[o]=Math.expm1(r[o]);return this.makeOutput(i,e.shape,"float32")},t.prototype.log=function(e){wt(e,"log");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o){var s=r[o];i[o]=Math.log(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.log1p=function(e){wt(e,"log1p");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o){var s=r[o];i[o]=Math.log1p(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.sqrt=function(e){wt(e,"sqrt");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o){var s=r[o];i[o]=Math.sqrt(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.rsqrt=function(e){wt(e,"rsqrt");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o){var s=r[o];i[o]=1/Math.sqrt(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.reciprocal=function(e){wt(e,"reciprocal");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),o=0;o<r.length;++o)i[o]=1/r[o];return this.makeOutput(i,e.shape,"float32")},t.prototype.linear=function(e){return e},t.prototype.relu=function(e){wt(e,"relu");for(var r=en(e.shape,e.dtype),i=this.readSync(r.dataId),o=this.readSync(e.dataId),s=0;s<o.length;++s)i[s]=Math.max(0,o[s]);return r},t.prototype.relu6=function(e){wt(e,"relu");for(var r=en(e.shape,e.dtype),i=this.readSync(r.dataId),o=this.readSync(e.dataId),s=0;s<o.length;++s)i[s]=Math.min(Math.max(0,o[s]),6);return r},t.prototype.prelu=function(e,r){return wt([e,r],"prelu"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,o){return i<0?o*i:i})},t.prototype.elu=function(e){wt(e,"elu");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o){var s=i[o];r[o]=s>=0?s:Math.exp(s)-1}return this.makeOutput(r,e.shape,"float32")},t.prototype.eluDer=function(e,r){wt([e,r],"eluDer");for(var i=new Float32Array(r.size),o=this.readSync(r.dataId),s=this.readSync(e.dataId),u=0;u<o.length;++u){var l=o[u];i[u]=l>=1?s[u]:s[u]*(l+1)}return this.makeOutput(i,r.shape,"float32")},t.prototype.selu=function(e){wt(e,"selu");for(var r=Fs,i=Ls,o=new Float32Array(e.size),s=this.readSync(e.dataId),u=0;u<s.length;++u){var l=s[u];o[u]=l>=0?i*l:r*(Math.exp(l)-1)}return this.makeOutput(o,e.shape,"float32")},t.prototype.clip=function(e,r,i){wt(e,"clip");for(var o=new Float32Array(e.size),s=this.readSync(e.dataId),u=0;u<s.length;++u){var l=s[u];o[u]=l>i?i:l<r?r:l}return this.makeOutput(o,e.shape,"float32")},t.prototype.abs=function(e){for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.abs(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.complexAbs=function(e){for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<e.size;++o){var s=i[2*o],u=i[2*o+1];r[o]=Math.hypot(s,u)}return this.makeOutput(r,e.shape,"float32")},t.prototype.int=function(e){wt(e,"int");for(var r=new Int32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=i[o];return this.makeOutput(r,e.shape,"int32")},t.prototype.sigmoid=function(e){wt(e,"sigmoid");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=1/(1+Math.exp(-i[o]));return this.makeOutput(r,e.shape,"float32")},t.prototype.softplus=function(e){wt(e,"softplus");for(var r=Math.log(11920928955078125e-23)+2,i=new Float32Array(e.size),o=this.readSync(e.dataId),s=0;s<o.length;++s){var u=o[s]>-r,l=o[s]<r,d=Math.exp(o[s]),A=void 0;A=l?d:u?o[s]:Math.log(1+d),i[s]=A}return this.makeOutput(i,e.shape,"float32")},t.prototype.sin=function(e){wt(e,"sin");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.sin(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.cos=function(e){wt(e,"cos");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.cos(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.tan=function(e){wt(e,"tan");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.tan(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.asin=function(e){wt(e,"asin");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.asin(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.acos=function(e){wt(e,"acos");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.acos(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atan=function(e){wt(e,"atan");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.atan(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atan2=function(e,r){return wt([e,r],"atan2"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,o){return Math.atan2(i,o)})},t.prototype.sinh=function(e){wt(e,"sinh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.sinh(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.cosh=function(e){wt(e,"cosh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.cosh(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.tanh=function(e){wt(e,"tanh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Ce(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.asinh=function(e){wt(e,"asinh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.asinh(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.acosh=function(e){wt(e,"acosh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.acosh(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atanh=function(e){wt(e,"atanh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o)r[o]=Math.atanh(i[o]);return this.makeOutput(r,e.shape,"float32")},t.prototype.erf=function(e){wt(e,"erf");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),o=0;o<i.length;++o){var s=Math.sign(i[o]),u=Math.abs(i[o]),l=1/(1+.3275911*u);r[o]=s*(1-((((1.061405429*l-1.453152027)*l+1.421413741)*l-.284496736)*l+.254829592)*l*Math.exp(-u*u))}return this.makeOutput(r,e.shape,"float32")},t.prototype.step=function(e,r){r===void 0&&(r=0),wt(e,"step");for(var i=new Float32Array(e.size),o=this.readSync(e.dataId),s=0;s<o.length;++s){var u=o[s];isNaN(u)?i[s]=NaN:i[s]=u>0?1:r}return this.makeOutput(i,e.shape,"float32")},t.prototype.fusedConv2d=function(e){var r=e.input,i=e.filter,o=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights,d=this.conv2d(r,i,o);return s&&(d=this.add(d,s)),u&&(d=nu(this,d,u,l)),d},t.prototype.conv2d=function(e,r,i){wt([e,r],"conv2d");for(var o=i.filterHeight,s=i.filterWidth,u=i.dilationHeight,l=i.dilationWidth,d=i.padInfo.left,A=i.padInfo.top,O=i.dataFormat==="channelsLast",D=nr(i.outShape,e.dtype),H=e.strides[0],te=O?e.strides[1]:e.strides[2],se=O?e.strides[2]:1,ae=O?1:e.strides[1],ue=D.strides[0],ye=O?D.strides[1]:D.strides[2],we=O?D.strides[2]:1,ve=O?1:D.strides[1],Ee=this.readSync(e.dataId),Te=this.readSync(r.dataId),Fe=D.values,Le=0;Le<i.batchSize;++Le)for(var Me=Le*H,Ne=Le*ue,Ze=0;Ze<i.outHeight;++Ze)for(var Xe=Ne+Ze*ye,qe=Ze*i.strideHeight-A,tt=0;tt<o;tt++){var ct=qe+tt*u;if(!(ct<0||ct>=i.inHeight))for(var bt=tt*r.strides[0],mt=Me+ct*te,ht=0;ht<i.outWidth;++ht)for(var At=Xe+ht*we,ft=ht*i.strideWidth-d,xt=0;xt<s;xt++){var St=ft+xt*l;if(!(St<0||St>=i.inWidth))for(var Lt=mt+St*se,$t=bt+xt*r.strides[1],ir=0;ir<i.inChannels;++ir){for(var ur=Ee[Lt+ir*ae],vr=0;vr<i.outChannels;++vr)Fe[At+vr*ve]+=ur*Te[$t+vr];$t+=i.outChannels}}}return D.toTensor()},t.prototype.conv3d=function(e,r,i){for(var o=i.filterDepth,s=i.filterHeight,u=i.filterWidth,l=i.dilationDepth,d=i.dilationHeight,A=i.dilationWidth,O=i.padInfo.front,D=i.padInfo.left,H=i.padInfo.top,te=nr(i.outShape,e.dtype),se=this.readSync(e.dataId),ae=this.readSync(r.dataId),ue=te.values,ye=0;ye<i.batchSize;++ye)for(var we=ye*e.strides[0],ve=ye*te.strides[0],Ee=0;Ee<i.outDepth;++Ee)for(var Te=ve+Ee*te.strides[1],Fe=Ee*i.strideDepth-O,Le=0;Le<o;Le++){var Me=Fe+Le*l;if(!(Me<0||Me>=i.inDepth))for(var Ne=Le*r.strides[0],Ze=we+Me*e.strides[1],Xe=0;Xe<i.outHeight;++Xe)for(var qe=Te+Xe*te.strides[2],tt=Xe*i.strideHeight-H,ct=0;ct<s;ct++){var bt=tt+ct*d;if(!(bt<0||bt>=i.inHeight))for(var mt=Ne+ct*r.strides[1],ht=Ze+bt*e.strides[2],At=0;At<i.outWidth;++At)for(var ft=qe+At*i.outChannels,xt=At*i.strideWidth-D,St=0;St<u;St++){var Lt=xt+St*A;if(!(Lt<0||Lt>=i.inWidth))for(var $t=mt+St*r.strides[2],ir=ht+Lt*i.inChannels,ur=$t,vr=0;vr<i.inChannels;++vr){for(var pr=se[ir+vr],mr=0;mr<i.outChannels;++mr)ue[ft+mr]+=pr*ae[ur+mr];ur+=i.outChannels}}}}return te.toTensor()},t.prototype.conv2dDerInput=function(e,r,i){wt([e,r],"conv2dDerInput");for(var o=nr(i.inShape,"float32"),s=o.values,u=this.readSync(e.dataId),l=this.readSync(r.dataId),d=r.strides,A=d[0],O=d[1],D=d[2],H=i.batchSize,te=i.filterHeight,se=i.filterWidth,ae=i.inChannels,ue=i.inHeight,ye=i.inWidth,we=i.outChannels,ve=i.outHeight,Ee=i.outWidth,Te=i.strideHeight,Fe=i.strideWidth,Le=i.dataFormat,Me=te-1-i.padInfo.top,Ne=se-1-i.padInfo.left,Ze=Le==="channelsLast",Xe=o.strides[0],qe=Ze?o.strides[1]:o.strides[2],tt=Ze?o.strides[2]:1,ct=Ze?1:o.strides[1],bt=e.strides[0],mt=Ze?e.strides[1]:e.strides[2],ht=Ze?e.strides[2]:1,At=Ze?1:e.strides[1],ft=0;ft<H;++ft)for(var xt=0;xt<ae;++xt)for(var St=0;St<ue;++St)for(var Lt=St-Me,$t=Math.max(0,Math.ceil(Lt/Te)),ir=Math.min(ve,(te+Lt)/Te),ur=0;ur<ye;++ur){for(var vr=ur-Ne,pr=Math.max(0,Math.ceil(vr/Fe)),mr=Math.min(Ee,(se+vr)/Fe),lr=0,hr=$t;hr<ir;++hr)for(var Ur=hr*Te-Lt,Ir=pr;Ir<mr;++Ir)for(var Xr=bt*ft+mt*hr+ht*Ir,ln=A*(te-1-Ur)+O*(se-1-(Ir*Fe-vr))+D*xt,cn=0;cn<we;++cn)lr+=u[Xr+At*cn]*l[ln+cn];s[Xe*ft+qe*St+tt*ur+ct*xt]=lr}return o.toTensor()},t.prototype.conv3dDerInput=function(e,r,i){for(var o=nr(i.inShape,"float32"),s=o.values,u=o.strides,l=u[0],d=u[1],A=u[2],O=u[3],D=this.readSync(e.dataId),H=e.strides,te=H[0],se=H[1],ae=H[2],ue=H[3],ye=this.readSync(r.dataId),we=r.strides,ve=we[0],Ee=we[1],Te=we[2],Fe=we[3],Le=i.batchSize,Me=i.filterDepth,Ne=i.filterHeight,Ze=i.filterWidth,Xe=i.inChannels,qe=i.inDepth,tt=i.inHeight,ct=i.inWidth,bt=i.outChannels,mt=i.outDepth,ht=i.outHeight,At=i.outWidth,ft=i.strideDepth,xt=i.strideHeight,St=i.strideWidth,Lt=Me-1-i.padInfo.front,$t=Ne-1-i.padInfo.top,ir=Ze-1-i.padInfo.left,ur=0;ur<Le;++ur)for(var vr=0;vr<Xe;++vr)for(var pr=0;pr<qe;++pr)for(var mr=pr-Lt,lr=Math.max(0,Math.ceil(mr/ft)),hr=Math.min(mt,(Me+mr)/ft),Ur=0;Ur<tt;++Ur)for(var Ir=Ur-$t,Xr=Math.max(0,Math.ceil(Ir/xt)),ln=Math.min(ht,(Ne+Ir)/xt),cn=0;cn<ct;++cn){for(var Fi=cn-ir,Li=Math.max(0,Math.ceil(Fi/St)),ci=Math.min(At,(Ze+Fi)/St),qo=0,$i=lr;$i<hr;++$i)for(var mo=$i*ft-mr,qi=Xr;qi<ln;++qi)for(var ea=qi*xt-Ir,eo=Li;eo<ci;++eo)for(var ol=te*ur+se*$i+ae*qi+ue*eo,ta=ve*(Me-1-mo)+Ee*(Ne-1-ea)+Te*(Ze-1-(eo*St-Fi))+Fe*vr,Ui=0;Ui<bt;++Ui)qo+=D[ol+Ui]*ye[ta+Ui];s[l*ur+d*pr+A*Ur+O*cn+vr]=qo}return o.toTensor()},t.prototype.conv2dDerFilter=function(e,r,i){wt([e,r],"conv2dDerFilter");for(var o=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,d=i.dataFormat==="channelsLast",A=nr(i.filterShape,"float32"),O=i.padInfo.left,D=i.padInfo.top,H=this.bufferSync(e),te=this.bufferSync(r),se=0;se<u;++se)for(var ae=Math.max(0,Math.ceil((D-se)/o)),ue=Math.min(i.outHeight,(i.inHeight+D-se)/o),ye=0;ye<l;++ye)for(var we=Math.max(0,Math.ceil((O-ye)/s)),ve=Math.min(i.outWidth,(i.inWidth+O-ye)/s),Ee=0;Ee<i.inChannels;++Ee)for(var Te=0;Te<i.outChannels;++Te){for(var Fe=0,Le=0;Le<i.batchSize;++Le)for(var Me=ae;Me<ue;++Me)for(var Ne=se+Me*o-D,Ze=we;Ze<ve;++Ze){var Xe=ye+Ze*s-O;Fe+=d?H.get(Le,Ne,Xe,Ee)*te.get(Le,Me,Ze,Te):H.get(Le,Ee,Ne,Xe)*te.get(Le,Te,Me,Ze)}A.set(Fe,se,ye,Ee,Te)}return A.toTensor()},t.prototype.conv3dDerFilter=function(e,r,i){for(var o=i.strideDepth,s=i.strideHeight,u=i.strideWidth,l=i.filterDepth,d=i.filterHeight,A=i.filterWidth,O=nr(i.filterShape,"float32"),D=O.values,H=O.strides,te=H[0],se=H[1],ae=H[2],ue=H[3],ye=this.readSync(r.dataId),we=r.strides,ve=we[0],Ee=we[1],Te=we[2],Fe=we[3],Le=this.readSync(e.dataId),Me=e.strides,Ne=Me[0],Ze=Me[1],Xe=Me[2],qe=Me[3],tt=i.padInfo.front,ct=i.padInfo.left,bt=i.padInfo.top,mt=0;mt<l;++mt)for(var ht=Math.max(0,Math.ceil((tt-mt)/o)),At=Math.min(i.outDepth,(i.inDepth+tt-mt)/o),ft=mt*te,xt=0;xt<d;++xt)for(var St=Math.max(0,Math.ceil((bt-xt)/s)),Lt=Math.min(i.outHeight,(i.inHeight+bt-xt)/s),$t=xt*se+ft,ir=0;ir<A;++ir)for(var ur=Math.max(0,Math.ceil((ct-ir)/u)),vr=Math.min(i.outWidth,(i.inWidth+ct-ir)/u),pr=ir*ae+$t,mr=0;mr<i.inChannels;++mr)for(var lr=mr*ue+pr,hr=0;hr<i.outChannels;++hr){for(var Ur=0,Ir=0;Ir<i.batchSize;++Ir)for(var Xr=Ir*Ne,ln=Ir*ve,cn=ht;cn<At;++cn)for(var Fi=(mt+cn*o-tt)*Ze+Xr,Li=cn*Ee+ln,ci=St;ci<Lt;++ci)for(var qo=(xt+ci*s-bt)*Xe+Fi,$i=ci*Te+Li,mo=ur;mo<vr;++mo){var qi=mo*Fe+$i;Ur+=Le[(ir+mo*u-ct)*qe+qo+mr]*ye[qi+hr]}D[lr+hr]=Ur}return O.toTensor()},t.prototype.fusedDepthwiseConv2D=function(e){var r=e.input,i=e.filter,o=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights,d=this.depthwiseConv2D(r,i,o);return s&&(d=this.add(d,s)),u&&(d=nu(this,d,u,l)),d},t.prototype.depthwiseConv2D=function(e,r,i){wt([e,r],"depthwiseConv2D");for(var o=i.filterHeight,s=i.filterWidth,u=i.dilationHeight,l=i.dilationWidth,d=i.padInfo.left,A=i.padInfo.top,O=i.outChannels/i.inChannels,D=nr(i.outShape,e.dtype),H=this.readSync(e.dataId),te=this.readSync(r.dataId),se=D.values,ae=0;ae<i.batchSize;++ae)for(var ue=ae*e.strides[0],ye=ae*D.strides[0],we=0;we<i.outHeight;++we)for(var ve=ye+we*D.strides[1],Ee=we*i.strideHeight-d,Te=0;Te<o;++Te){var Fe=Ee+Te*u;if(!(Fe<0||Fe>=i.inHeight))for(var Le=Te*r.strides[0],Me=ue+Fe*e.strides[1],Ne=0;Ne<i.outWidth;++Ne)for(var Ze=ve+Ne*D.strides[2],Xe=Ne*i.strideWidth-A,qe=0;qe<s;++qe){var tt=Xe+qe*l;if(!(tt<0||tt>=i.inWidth))for(var ct=Le+qe*r.strides[1],bt=Me+tt*i.inChannels,mt=Ze,ht=ct,At=0;At<i.inChannels;++At){for(var ft=H[bt+At],xt=0;xt<O;++xt)se[mt+xt]+=ft*te[ht+xt];mt+=O,ht+=O}}}return D.toTensor()},t.prototype.depthwiseConv2DDerInput=function(e,r,i){wt([e,r],"depthwiseConv2DDerInput");for(var o=nr(i.inShape,"float32"),s=o.values,u=o.strides,l=u[0],d=u[1],A=u[2],O=this.readSync(e.dataId),D=e.strides,H=D[0],te=D[1],se=D[2],ae=this.readSync(r.dataId),ue=r.strides,ye=ue[0],we=ue[1],ve=ue[2],Ee=i.batchSize,Te=i.filterHeight,Fe=i.filterWidth,Le=i.inChannels,Me=i.inHeight,Ne=i.inWidth,Ze=i.outChannels,Xe=i.outHeight,qe=i.outWidth,tt=i.strideHeight,ct=i.strideWidth,bt=Te-1-i.padInfo.top,mt=Fe-1-i.padInfo.left,ht=Ze/Le,At=0;At<Ee;++At)for(var ft=0;ft<Le;++ft)for(var xt=0;xt<Me;++xt)for(var St=xt-bt,Lt=Math.max(0,Math.ceil(St/tt)),$t=Math.min(Xe,(Te+St)/tt),ir=0;ir<Ne;++ir){for(var ur=ir-mt,vr=Math.max(0,Math.ceil(ur/ct)),pr=Math.min(qe,(Fe+ur)/ct),mr=0,lr=Lt;lr<$t;++lr)for(var hr=lr*tt-St,Ur=vr;Ur<pr;++Ur)for(var Ir=H*At+te*lr+se*Ur,Xr=ye*(Te-1-hr)+we*(Fe-1-(Ur*ct-ur))+ve*ft,ln=0;ln<ht;++ln)mr+=O[Ir+(ft*ht+ln)]*ae[Xr+ln];s[l*At+d*xt+A*ir+ft]=mr}return o.toTensor()},t.prototype.depthwiseConv2DDerFilter=function(e,r,i){wt([e,r],"depthwiseConv2DDerFilter");for(var o=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,d=nr(i.filterShape,"float32"),A=i.padInfo.left,O=i.padInfo.top,D=i.outChannels/i.inChannels,H=this.bufferSync(e),te=this.bufferSync(r),se=0;se<u;++se)for(var ae=Math.max(0,Math.ceil((O-se)/o)),ue=Math.min(i.outHeight,(i.inHeight+O-se)/o),ye=0;ye<l;++ye)for(var we=Math.max(0,Math.ceil((A-ye)/s)),ve=Math.min(i.outWidth,(i.inWidth+A-ye)/s),Ee=0;Ee<i.outChannels;++Ee){for(var Te=Math.trunc(Ee/D),Fe=Ee%D,Le=0,Me=0;Me<i.batchSize;++Me)for(var Ne=ae;Ne<ue;++Ne)for(var Ze=se+Ne*o-O,Xe=we;Xe<ve;++Xe){var qe=ye+Xe*s-A;Le+=H.get(Me,Ze,qe,Te)*te.get(Me,Ne,Xe,Ee)}d.set(Le,se,ye,Te,Fe)}return d.toTensor()},t.prototype.tile=function(e,r){return wt(e,"tile"),Ol(this.bufferSync(e),r)},t.prototype.pad=function(e,r,i){wt(e,"pad");var o=r.map(function(D,H){return D[0]+e.shape[H]+D[1]}),s=r.map(function(D){return D[0]}),u=this.bufferSync(e),l=nr(o,e.dtype);i!==0&&l.values.fill(i);for(var d=0;d<e.size;d++){var A=u.indexToLoc(d),O=A.map(function(D,H){return D+s[H]});l.set.apply(l,[u.get.apply(u,A)].concat(O))}return l.toTensor()},t.prototype.transpose=function(e,r){wt(e,"transpose");for(var i=new Array(e.rank),o=0;o<i.length;o++)i[o]=e.shape[r[o]];var s=this.readSync(e.dataId),u=nr(i,e.dtype),l=this.bufferSync(e);for(o=0;o<e.size;++o){for(var d=l.indexToLoc(o),A=new Array(d.length),O=0;O<A.length;O++)A[O]=d[r[O]];var D=u.locToIndex(A);u.values[D]=s[o]}return u.toTensor()},t.prototype.gather=function(e,r,i){wt([e,r],"gather");var o=e.shape.slice(),s=this.readSync(r.dataId);o[i]=s.length;for(var u=nr(o,e.dtype),l=this.bufferSync(e),d=0;d<u.size;++d){var A=u.indexToLoc(d),O=A.slice();O[i]=s[A[i]];var D=l.locToIndex(O);u.values[d]=l.values[D]}return u.toTensor()},t.prototype.batchToSpaceND=function(e,r,i){wt([e],"batchToSpaceND");var o=r.reduce(function(O,D){return O*D}),s=Sa(e.shape,r,o),u=Ia(s.length,r.length),l=Ta(e.shape,r,o),d=ml(i,r.length),A=gl(l,i,r.length);return e.reshape(s).transpose(u).reshape(l).slice(d,A)},t.prototype.spaceToBatchND=function(e,r,i){wt([e],"spaceToBatchND");var o=r.reduce(function(D,H){return D*H}),s=[[0,0]];s.push.apply(s,i);for(var u=1+r.length;u<e.shape.length;++u)s.push([0,0]);var l=e.pad(s),d=Sa(l.shape,r,o,!1),A=Ia(d.length,r.length,!1),O=Ta(l.shape,r,o,!1);return l.reshape(d).transpose(A).reshape(O)},t.prototype.pool=function(e,r,i){wt(e,"pool");for(var o=r.strideHeight,s=r.strideWidth,u=r.dilationHeight,l=r.dilationWidth,d=r.effectiveFilterHeight,A=r.effectiveFilterWidth,O=r.padInfo.top,D=r.padInfo.left,H=i==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,te=this.readSync(e.dataId),se=nr(r.outShape,e.dtype),ae=se.values,ue=r.outShape[1]*r.outShape[2]*r.outShape[3],ye=r.outShape[2]*r.outShape[3],we=r.outShape[3],ve=0;ve<r.batchSize;++ve)for(var Ee=ve*ue,Te=ve*e.strides[0],Fe=0;Fe<r.inChannels;++Fe)for(var Le=0;Le<r.outHeight;++Le)for(var Me=Le*o-O,Ne=Math.max(0,Me),Ze=Math.min(r.inHeight,d+Me),Xe=Ee+Le*ye,qe=0;qe<r.outWidth;++qe){for(var tt=qe*s-D,ct=Math.max(0,tt),bt=Math.min(r.inWidth,A+tt),mt=H,ht=0,At=0,ft=Ne;ft<Ze;ft+=u){for(var xt=Te+ft*e.strides[1],St=ct;St<bt;St+=l){var Lt=te[xt+St*e.strides[2]+Fe];i==="max"&&Lt>mt?mt=Lt:i==="avg"&&(ht+=Lt,At++)}if(isNaN(mt))break}ae[Xe+qe*we+Fe]=i==="avg"?ht/At:mt}return se.toTensor()},t.prototype.maxPool=function(e,r){return this.pool(e,r,"max")},t.prototype.maxPoolPositions=function(e,r){for(var i=nr(r.outShape,"int32"),o=r.strideHeight,s=r.strideWidth,u=r.dilationHeight,l=r.dilationWidth,d=r.effectiveFilterHeight,A=r.effectiveFilterWidth,O=r.padInfo.top,D=r.padInfo.left,H=this.bufferSync(e),te=0;te<r.batchSize;++te)for(var se=0;se<r.inChannels;++se)for(var ae=0;ae<r.outHeight;++ae){for(var ue=ae*o-O,ye=ue;ye<0;)ye+=u;for(var we=Math.min(r.inHeight,d+ue),ve=0;ve<r.outWidth;++ve){for(var Ee=ve*s-D,Te=Ee;Te<0;)Te+=l;for(var Fe=Math.min(r.inWidth,A+Ee),Le=Number.NEGATIVE_INFINITY,Me=-1,Ne=ye;Ne<we;Ne+=u)for(var Ze=Ne-ue,Xe=Te;Xe<Fe;Xe+=l){var qe=Xe-Ee,tt=H.get(te,Ne,Xe,se);tt>Le&&(Le=tt,Me=Ze*A+qe)}i.set(Me,te,ae,ve,se)}}return i.toTensor()},t.prototype.maxPoolBackprop=function(e,r,i,o){wt([r,i],"maxPoolBackprop");for(var s=this.maxPoolPositions(r,o),u=o.strideHeight,l=o.strideWidth,d=o.dilationHeight,A=o.dilationWidth,O=o.effectiveFilterHeight,D=o.effectiveFilterWidth,H=D-1-o.padInfo.left,te=O-1-o.padInfo.top,se=nr(r.shape,"float32"),ae=this.bufferSync(s),ue=this.bufferSync(e),ye=0;ye<o.batchSize;++ye)for(var we=0;we<o.inChannels;++we)for(var ve=0;ve<o.inHeight;++ve)for(var Ee=0;Ee<o.inWidth;++Ee){for(var Te=ve-te,Fe=Ee-H,Le=0,Me=0;Me<O;Me+=d){var Ne=(Te+Me)/u;if(!(Ne<0||Ne>=o.outHeight||Math.floor(Ne)!==Ne))for(var Ze=0;Ze<D;Ze+=A){var Xe=(Fe+Ze)/l;if(!(Xe<0||Xe>=o.outWidth||Math.floor(Xe)!==Xe)){var qe=O*D-1-ae.get(ye,Ne,Xe,we)===Me*D+Ze?1:0;qe!==0&&(Le+=ue.get(ye,Ne,Xe,we)*qe)}}}se.set(Le,ye,ve,Ee,we)}return se.toTensor()},t.prototype.avgPoolBackprop=function(e,r,i){wt([e,r],"avgPoolBackprop");for(var o=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,d=i.dilationHeight,A=i.dilationWidth,O=i.effectiveFilterHeight,D=i.effectiveFilterWidth,H=D-1-i.padInfo.left,te=O-1-i.padInfo.top,se=nr(r.shape,"float32"),ae=1/(u*l),ue=this.bufferSync(e),ye=0;ye<i.batchSize;++ye)for(var we=0;we<i.inChannels;++we)for(var ve=0;ve<i.inHeight;++ve)for(var Ee=0;Ee<i.inWidth;++Ee){for(var Te=ve-te,Fe=Ee-H,Le=0,Me=0;Me<O;Me+=d){var Ne=(Te+Me)/o;if(!(Ne<0||Ne>=i.outHeight||Math.floor(Ne)!==Ne))for(var Ze=0;Ze<D;Ze+=A){var Xe=(Fe+Ze)/s;Xe<0||Xe>=i.outWidth||Math.floor(Xe)!==Xe||(Le+=ue.get(ye,Ne,Xe,we))}}se.set(Le*ae,ye,ve,Ee,we)}return se.toTensor()},t.prototype.pool3d=function(e,r,i){wt(e,"pool3d");for(var o=r.strideDepth,s=r.strideHeight,u=r.strideWidth,l=r.dilationDepth,d=r.dilationHeight,A=r.dilationWidth,O=r.effectiveFilterDepth,D=r.effectiveFilterHeight,H=r.effectiveFilterWidth,te=r.padInfo.front,se=r.padInfo.top,ae=r.padInfo.left,ue=i==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,ye=this.readSync(e.dataId),we=nr(r.outShape,e.dtype),ve=we.values,Ee=r.outShape[1]*r.outShape[2]*r.outShape[3]*r.outShape[4],Te=r.outShape[2]*r.outShape[3]*r.outShape[4],Fe=r.outShape[3]*r.outShape[4],Le=r.outShape[4],Me=0;Me<r.batchSize;++Me)for(var Ne=Me*Ee,Ze=Me*e.strides[0],Xe=0;Xe<r.inChannels;++Xe)for(var qe=0;qe<r.outDepth;++qe){for(var tt=qe*o-te,ct=tt;ct<0;)ct+=l;for(var bt=Math.min(r.inDepth,O+tt),mt=Ne+qe*Te,ht=0;ht<r.outHeight;++ht){for(var At=ht*s-se,ft=At;ft<0;)ft+=d;for(var xt=Math.min(r.inHeight,D+At),St=mt+ht*Fe,Lt=0;Lt<r.outWidth;++Lt){for(var $t=Lt*u-ae,ir=$t;ir<0;)ir+=A;for(var ur=Math.min(r.inWidth,H+$t),vr=St+Lt*Le,pr=ue,mr=0,lr=0,hr=ct;hr<bt;hr+=l){for(var Ur=Ze+hr*e.strides[1],Ir=ft;Ir<xt;Ir+=d){for(var Xr=Ur+Ir*e.strides[2],ln=ir;ln<ur;ln+=A){var cn=ye[Xr+ln*e.strides[3]+Xe];if(i==="max"&&cn>pr?pr=cn:i==="avg"&&(mr+=cn,lr++),isNaN(pr))break}if(isNaN(pr))break}if(isNaN(pr))break}ve[vr+Xe]=i==="avg"?mr/lr:pr}}}return we.toTensor()},t.prototype.avgPool3d=function(e,r){return wt(e,"avgPool3d"),this.pool3d(e,r,"avg").toFloat()},t.prototype.avgPool3dBackprop=function(e,r,i){wt([e,r],"avgPool3dBackprop");for(var o=i.strideDepth,s=i.strideHeight,u=i.strideWidth,l=i.filterDepth,d=i.filterHeight,A=i.filterWidth,O=i.dilationDepth,D=i.dilationHeight,H=i.dilationWidth,te=i.effectiveFilterDepth,se=i.effectiveFilterHeight,ae=i.effectiveFilterWidth,ue=te-1-i.padInfo.front,ye=ae-1-i.padInfo.left,we=se-1-i.padInfo.top,ve=nr(r.shape,"float32"),Ee=1/(l*d*A),Te=this.bufferSync(e),Fe=0;Fe<i.batchSize;++Fe)for(var Le=0;Le<i.inChannels;++Le)for(var Me=0;Me<i.inDepth;++Me)for(var Ne=0;Ne<i.inHeight;++Ne)for(var Ze=0;Ze<i.inWidth;++Ze){for(var Xe=Me-ue,qe=Ne-we,tt=Ze-ye,ct=0,bt=0;bt<te;bt+=O){var mt=(Xe+bt)/o;if(!(mt<0||mt>=i.outDepth||Math.floor(mt)!==mt))for(var ht=0;ht<se;ht+=D){var At=(qe+ht)/s;if(!(At<0||At>=i.outHeight||Math.floor(At)!==At))for(var ft=0;ft<ae;ft+=H){var xt=(tt+ft)/u;xt<0||xt>=i.outWidth||Math.floor(xt)!==xt||(ct+=Te.get(Fe,mt,At,xt,Le))}}}ve.set(ct*Ee,Fe,Me,Ne,Ze,Le)}return ve.toTensor()},t.prototype.maxPool3d=function(e,r){return wt(e,"maxPool3d"),this.pool3d(e,r,"max").toFloat()},t.prototype.maxPool3dPositions=function(e,r){for(var i=nr(r.outShape,"int32"),o=r.strideDepth,s=r.strideHeight,u=r.strideWidth,l=r.dilationDepth,d=r.dilationHeight,A=r.dilationWidth,O=r.effectiveFilterDepth,D=r.effectiveFilterHeight,H=r.effectiveFilterWidth,te=r.padInfo.front,se=r.padInfo.top,ae=r.padInfo.left,ue=this.bufferSync(e),ye=0;ye<r.batchSize;++ye)for(var we=0;we<r.inChannels;++we)for(var ve=0;ve<r.outDepth;++ve){for(var Ee=ve*o-te,Te=Ee;Te<0;)Te+=l;for(var Fe=Math.min(r.inDepth,O+Ee),Le=0;Le<r.outHeight;++Le){for(var Me=Le*s-se,Ne=Me;Ne<0;)Ne+=d;for(var Ze=Math.min(r.inHeight,D+Me),Xe=0;Xe<r.outWidth;++Xe){for(var qe=Xe*u-ae,tt=qe;tt<0;)tt+=A;for(var ct=Math.min(r.inWidth,H+qe),bt=Number.NEGATIVE_INFINITY,mt=-1,ht=Te;ht<Fe;ht+=l)for(var At=ht-Ee,ft=Ne;ft<Ze;ft+=d)for(var xt=ft-Me,St=tt;St<ct;St+=A){var Lt=St-qe,$t=ue.get(ye,ht,ft,St,we);$t>=bt&&(bt=$t,mt=At*D*H+xt*D+Lt)}i.set(mt,ye,ve,Le,Xe,we)}}}return i.toTensor()},t.prototype.maxPool3dBackprop=function(e,r,i,o){wt([r,i],"maxPool3dBackprop");for(var s=this.maxPool3dPositions(r,o),u=o.strideDepth,l=o.strideHeight,d=o.strideWidth,A=o.dilationDepth,O=o.dilationHeight,D=o.dilationWidth,H=o.effectiveFilterDepth,te=o.effectiveFilterHeight,se=o.effectiveFilterWidth,ae=H-1-o.padInfo.front,ue=se-1-o.padInfo.left,ye=te-1-o.padInfo.top,we=nr(r.shape,"float32"),ve=this.bufferSync(s),Ee=this.bufferSync(e),Te=0;Te<o.batchSize;++Te)for(var Fe=0;Fe<o.inChannels;++Fe)for(var Le=0;Le<o.inDepth;++Le)for(var Me=0;Me<o.inHeight;++Me)for(var Ne=0;Ne<o.inWidth;++Ne){for(var Ze=Le-ae,Xe=Me-ye,qe=Ne-ue,tt=0,ct=0;ct<H;ct+=A){var bt=(Ze+ct)/u;if(!(bt<0||bt>=o.outDepth||Math.floor(bt)!==bt))for(var mt=0;mt<te;mt+=O){var ht=(Xe+mt)/l;if(!(ht<0||ht>=o.outHeight||Math.floor(ht)!==ht))for(var At=0;At<se;At+=D){var ft=(qe+At)/d;if(!(ft<0||ft>=o.outWidth||Math.floor(ft)!==ft)){var xt=H*te*se-1-ve.get(Te,bt,ht,ft,Fe)===ct*te*se+mt*se+At?1:0;xt!==0&&(tt+=Ee.get(Te,bt,ht,ft,Fe)*xt)}}}}we.set(tt,Te,Le,Me,Ne,Fe)}return we.toTensor()},t.prototype.cast=function(e,r){return Ss(e,r,this)},t.prototype.reshape=function(e,r){return Ba(e,r)},t.prototype.avgPool=function(e,r){return wt(e,"avgPool"),this.pool(e,r,"avg").toFloat()},t.prototype.resizeBilinear=function(e,r,i,o){wt(e,"resizeBilinear");for(var s=e.shape,u=s[0],l=s[1],d=s[2],A=s[3],O=this.readSync(e.dataId),D=new Float32Array(ce([u,r,i,A])),H=[o&&r>1?l-1:l,o&&i>1?d-1:d],te=[o&&r>1?r-1:r,o&&i>1?i-1:i],se=0,ae=H[0]/te[0],ue=H[1]/te[1],ye=0;ye<u;ye++)for(var we=0;we<r;we++)for(var ve=ae*we,Ee=Math.floor(ve),Te=ve-Ee,Fe=Math.min(l-1,Math.ceil(ve)),Le=ye*e.strides[0]+Ee*e.strides[1],Me=ye*e.strides[0]+Fe*e.strides[1],Ne=0;Ne<i;Ne++)for(var Ze=ue*Ne,Xe=Math.floor(Ze),qe=Ze-Xe,tt=Math.min(d-1,Math.ceil(Ze)),ct=Le+Xe*e.strides[2],bt=Me+Xe*e.strides[2],mt=Le+tt*e.strides[2],ht=Me+tt*e.strides[2],At=0;At<A;At++){var ft=O[ct+At],xt=O[bt+At],St=ft+(O[mt+At]-ft)*qe,Lt=St+(xt+(O[ht+At]-xt)*qe-St)*Te;D[se++]=Lt}return Un(D,[u,r,i,A])},t.prototype.resizeBilinearBackprop=function(e,r,i){wt([e,r],"resizeBilinearBackprop");for(var o=r.shape,s=o[0],u=o[1],l=o[2],d=o[3],A=e.shape,O=A[1],D=A[2],H=new Float32Array(s*u*l*d),te=[i&&O>1?u-1:u,i&&D>1?l-1:l],se=[i&&O>1?O-1:O,i&&D>1?D-1:D],ae=te[0]/se[0],ue=te[1]/se[1],ye=this.readSync(e.dataId),we=0,ve=0;ve<s;ve++)for(var Ee=ve*r.strides[0],Te=0;Te<O;Te++)for(var Fe=Te*ae,Le=Math.floor(Fe),Me=Math.min(Math.ceil(Fe),u-1),Ne=Ee+Le*r.strides[1],Ze=Ee+Me*r.strides[1],Xe=Fe-Le,qe=1-Xe,tt=0;tt<D;tt++)for(var ct=tt*ue,bt=Math.floor(ct),mt=Math.min(Math.ceil(ct),l-1),ht=ct-bt,At=1-ht,ft=Ne+bt*r.strides[2],xt=Ne+mt*r.strides[2],St=Ze+bt*r.strides[2],Lt=Ze+mt*r.strides[2],$t=qe*At,ir=qe*ht,ur=Xe*At,vr=Xe*ht,pr=0;pr<d;pr++){var mr=ye[we++];H[ft+pr]+=mr*$t,H[xt+pr]+=mr*ir,H[St+pr]+=mr*ur,H[Lt+pr]+=mr*vr}return ei(H,[s,l,u,d],r.dtype)},t.prototype.resizeNearestNeighbor=function(e,r,i,o){wt(e,"resizeNearestNeighbor");for(var s=e.shape,u=s[0],l=s[1],d=s[2],A=s[3],O=this.readSync(e.dataId),D=new Float32Array(u*r*i*A),H=[o&&r>1?l-1:l,o&&i>1?d-1:d],te=[o&&r>1?r-1:r,o&&i>1?i-1:i],se=H[0]/te[0],ae=H[1]/te[1],ue=0,ye=0;ye<u;ye++)for(var we=ye*e.strides[0],ve=0;ve<r;ve++)for(var Ee=se*ve,Te=we+Math.min(l-1,o?Math.round(Ee):Math.floor(Ee))*e.strides[1],Fe=0;Fe<i;Fe++)for(var Le=ae*Fe,Me=Te+Math.min(d-1,o?Math.round(Le):Math.floor(Le))*e.strides[2],Ne=0;Ne<A;Ne++){var Ze=O[Me+Ne];D[ue++]=Ze}return Un(D,[u,r,i,A],e.dtype)},t.prototype.resizeNearestNeighborBackprop=function(e,r,i){wt([e,r],"resizeNearestNeighborBackprop");for(var o=r.shape,s=o[0],u=o[1],l=o[2],d=o[3],A=e.shape,O=A[1],D=A[2],H=new Float32Array(s*u*l*d),te=this.readSync(e.dataId),se=[i&&O>1?u-1:u,i&&D>1?l-1:l],ae=[i&&O>1?O-1:O,i&&D>1?D-1:D],ue=se[0]/ae[0],ye=se[1]/ae[1],we=1/ue,ve=1/ye,Ee=2*Math.ceil(we)+2,Te=2*Math.ceil(ve)+2,Fe=0;Fe<s;Fe++)for(var Le=Fe*r.strides[0],Me=0;Me<u;Me++)for(var Ne=Le+Me*r.strides[1],Ze=Math.floor(Me*we),Xe=Math.floor(Ze-Ee/2),qe=0;qe<l;qe++)for(var tt=Ne+qe*r.strides[2],ct=Math.floor(qe*ve),bt=Math.floor(ct-Te/2),mt=0;mt<d;mt++){for(var ht=0,At=0;At<Ee;At++){var ft=At+Xe;if(!(ft<0||ft>=O)){var xt=Le+ft*e.strides[1],St=ft*ue;if(Me===Math.min(u-1,i?Math.round(St):Math.floor(St)))for(var Lt=0;Lt<Te;Lt++){var $t=Lt+bt;if(!($t<0||$t>=D)){var ir=xt+$t*e.strides[2],ur=$t*ye;qe===Math.min(l-1,i?Math.round(ur):Math.floor(ur))&&(ht+=te[ir+mt])}}}}H[tt+mt]=ht}return ei(H,r.shape,r.dtype)},t.prototype.batchNormalization=function(e,r,i,o,s,u){wt([e,r,i,s,u],"batchNorm");for(var l=this.readSync(e.dataId),d=this.readSync(r.dataId),A=this.readSync(i.dataId),O=s?this.readSync(s.dataId):new Float32Array([1]),D=u?this.readSync(u.dataId):new Float32Array([0]),H=new Float32Array(l.length),te=D.length,se=O.length,ae=A.length,ue=d.length,ye=0,we=0,ve=0,Ee=0,Te=0;Te<l.length;++Te)H[Te]=D[ye++]+(l[Te]-d[we++])*O[ve++]/Math.sqrt(A[Ee++]+o),ye>=te&&(ye=0),we>=ue&&(we=0),ve>=se&&(ve=0),Ee>=ae&&(Ee=0);return ei(H,e.shape)},t.prototype.localResponseNormalization4D=function(e,r,i,o,s){wt(e,"localResponseNormalization4D");var u=e.shape[3],l=u-1,d=this.readSync(e.dataId),A=e.size,O=new Float32Array(A);function D(ae){for(var ue=ae%u,ye=ae-ue+Math.max(0,ue-r),we=ae-ue+Math.min(ue+r,l),ve=0;ye<=we;ye++){var Ee=d[ye];ve+=Ee*Ee}return ve}for(var H=0;H<A;H++){var te=D(H),se=d[H]*Math.pow(i+o*te,-s);O[H]=se}return ei(O,e.shape)},t.prototype.LRNGrad=function(e,r,i,o,s,u,l){wt(e,"LRNGrad");for(var d=e.shape[3],A=this.readSync(e.dataId),O=this.readSync(r.dataId),D=this.readSync(i.dataId),H=new Float32Array(e.size),te=e.size,se=0;se<te;se++){for(var ae=se%d,ue=se-ae+Math.max(0,ae-o),ye=se-ae+Math.min(d,ae+o+1),we=0,ve=ue;ve<ye;ve++)we+=Math.pow(O[ve],2);for(we=u*we+s,ve=ue;ve<ye;ve++){var Ee=-2*u*l*O[ve]*D[se]/we;se===ve&&(Ee+=Math.pow(we,-l)),Ee*=A[se],H[ve]+=Ee}}return ei(H,e.shape)},t.prototype.multinomial=function(e,r,i,o){wt(e,"multinomial");for(var s=r?e:Vi(e),u=s.shape[0],l=s.shape[1],d=en([u,i],"int32"),A=this.readSync(d.dataId),O=this.readSync(s.dataId),D=0;D<u;++D){var H=D*l,te=new Float32Array(l-1);te[0]=O[H];for(var se=1;se<te.length;++se)te[se]=te[se-1]+O[H+se];for(var ae=Ca(o.toString()),ue=D*i,ye=0;ye<i;++ye){var we=ae();A[ue+ye]=te.length;for(var ve=0;ve<te.length;ve++)if(we<te[ve]){A[ue+ye]=ve;break}}}return d},t.prototype.oneHot=function(e,r,i,o){wt(e,"oneHot");var s=new Float32Array(e.size*r);s.fill(o);for(var u=this.readSync(e.dataId),l=0;l<e.size;++l)u[l]>=0&&u[l]<r&&(s[l*r+u[l]]=i);return io(s,[e.size,r],"int32")},t.prototype.nonMaxSuppression=function(e,r,i,o,s){return wt(e,"nonMaxSuppression"),Rs(this.readSync(e.dataId),this.readSync(r.dataId),i,o,s)},t.prototype.fft=function(e){return this.fftBatch(e,!1)},t.prototype.ifft=function(e){return this.fftBatch(e,!0)},t.prototype.fftBatch=function(e,r){for(var i=e.shape[0],o=e.shape[1],s=nr(e.shape,"float32"),u=nr(e.shape,"float32"),l=Ln(e).as2D(i,o),d=ki(e).as2D(i,o),A=0;A<i;A++)for(var O=l.slice([A,0],[1,o]),D=d.slice([A,0],[1,o]),H=Cn(O,D),te=this.readSync(this.fftImpl(H,r).dataId),se=0;se<o;se++){var ae=Sl(te,se);s.values[A*o+se]=ae.real,u.values[A*o+se]=ae.imag}return Cn(s.toTensor(),u.toTensor()).as2D(i,o)},t.prototype.fftImpl=function(e,r){var i=e.as1D(),o=i.size;if(this.isExponentOf2(o)){var s=this.fftRadix2(i,o,r).as2D(e.shape[0],e.shape[1]);return r&&(s=Cn(Ln(s).div(Tt(o)),ki(s).div(Tt(o)))),s}var u=this.readSync(e.dataId),l=function(d){for(var A=new Float32Array(d.length/2),O=new Float32Array(d.length/2),D=0;D<d.length;D+=2)A[D/2]=d[D],O[D/2]=d[D+1];return{real:A,imag:O}}(this.fourierTransformByMatmul(u,o,r));return Cn(l.real,l.imag).as2D(e.shape[0],e.shape[1])},t.prototype.isExponentOf2=function(e){return(e&e-1)==0},t.prototype.fftRadix2=function(e,r,i){if(r===1)return e;var o=this.readSync(e.dataId),s=r/2,u=function(ue){for(var ye=Math.ceil(ue.length/4),we=new Float32Array(ye),ve=new Float32Array(ye),Ee=0;Ee<ue.length;Ee+=4)we[Math.floor(Ee/4)]=ue[Ee],ve[Math.floor(Ee/4)]=ue[Ee+1];return{real:we,imag:ve}}(o),l=Cn(u.real,u.imag).as1D(),d=function(ue){for(var ye=Math.floor(ue.length/4),we=new Float32Array(ye),ve=new Float32Array(ye),Ee=2;Ee<ue.length;Ee+=4)we[Math.floor(Ee/4)]=ue[Ee],ve[Math.floor(Ee/4)]=ue[Ee+1];return{real:we,imag:ve}}(o),A=Cn(d.real,d.imag).as1D();l=this.fftRadix2(l,s,i),A=this.fftRadix2(A,s,i);var O=function(ue,ye){for(var we=new Float32Array(ue/2),ve=new Float32Array(ue/2),Ee=0;Ee<Math.ceil(ue/2);Ee++){var Te=(ye?2:-2)*Math.PI*(Ee/ue);we[Ee]=Math.cos(Te),ve[Ee]=Math.sin(Te)}return{real:we,imag:ve}}(r,i),D=Cn(O.real,O.imag).mul(A),H=l.add(D),te=l.sub(D),se=Ln(H).concat(Ln(te)),ae=ki(H).concat(ki(te));return Cn(se,ae).as1D()},t.prototype.fourierTransformByMatmul=function(e,r,i){for(var o=new Float32Array(2*r),s=0;s<r;s++){for(var u=0,l=0,d=0;d<r;d++){var A=dp(s*d,r,i),O=Sl(e,d);u+=O.real*A.real-O.imag*A.imag,l+=O.real*A.imag+O.imag*A.real}i&&(u/=r,l/=r),fp(o,u,l,s)}return o},t.prototype.depthToSpace=function(e,r,i){ee(i==="NHWC",function(){return"Only NHWC dataFormat supported on CPU for depthToSpace. Got "+i}),ee(r>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+r});for(var o=e.shape[0],s=e.shape[1],u=e.shape[2],l=e.shape[3],d=s*r,A=u*r,O=l/(r*r),D=this.readSync(e.dataId),H=new Float32Array(o*d*A*O),te=0,se=0;se<o;++se)for(var ae=0;ae<d;++ae)for(var ue=Math.floor(ae/r),ye=ae%r,we=0;we<A;++we)for(var ve=Math.floor(we/r),Ee=(ye*r+we%r)*O,Te=0;Te<O;++Te){var Fe=Te+Ee+l*(ve+u*(ue+s*se));H[te++]=D[Fe]}return ei(H,[o,d,A,O])},t.prototype.broadcastedBinaryOp=function(e,r,i,o){var s=fr(e.shape,r.shape),u=nr(s,i),l=this.readSync(e.dataId),d=this.readSync(r.dataId),A=Gi(e.shape,s),O=Gi(r.shape,s),D=u.values;if(A.length+O.length===0)for(var H=0;H<D.length;++H)D[H]=o(l[H%l.length],d[H%d.length]);else{var te=this.bufferSync(e),se=this.bufferSync(r),ae=function(ue){var ye=u.indexToLoc(ue),we=ye.slice(-e.rank);A.forEach(function(Fe){return we[Fe]=0});var ve=te.locToIndex(we),Ee=ye.slice(-r.rank);O.forEach(function(Fe){return Ee[Fe]=0});var Te=se.locToIndex(Ee);D[ue]=o(l[ve],d[Te])};for(H=0;H<D.length;++H)ae(H)}return u.toTensor()},t.prototype.broadcastedBinaryComplexOp=function(e,r,i){var o=fr(e.shape,r.shape),s=nr(o,"float32"),u=nr(o,"float32"),l=this.readSync(e.dataId),d=this.readSync(r.dataId),A=Gi(e.shape,o),O=Gi(r.shape,o),D=s.values,H=u.values;if(A.length+O.length===0)for(var te=0;te<D.length;te++){var se=te%l.length,ae=te%d.length,ue=i(l[2*se],l[2*se+1],d[2*ae],d[2*ae+1]);D[te]=ue.real,H[te]=ue.imag}else{var ye=this.bufferSync(this.data.get(e.dataId).complexTensors.real),we=this.bufferSync(this.data.get(r.dataId).complexTensors.real),ve=function(Ee){var Te=s.indexToLoc(Ee),Fe=Te.slice(-e.rank);A.forEach(function(Xe){return Fe[Xe]=0});var Le=ye.locToIndex(Fe),Me=Te.slice(-r.rank);O.forEach(function(Xe){return Me[Xe]=0});var Ne=we.locToIndex(Me),Ze=i(l[2*Le],l[2*Le+1],d[2*Ne],d[2*Ne+1]);D[Ee]=Ze.real,H[Ee]=Ze.imag};for(te=0;te<D.length;te++)ve(te)}return this.complex(s.toTensor(),u.toTensor())},t.prototype.split=function(e,r,i){return Rl(e,r,i)},t.prototype.dispose=function(){},t.prototype.floatPrecision=function(){return 32},t.prototype.epsilon=function(){return 1e-7},t.prototype.cropAndResize=function(e,r,i,o,s,u){for(var l=e.shape,d=l[0],A=l[1],O=l[2],D=l[3],H=r.shape[0],te=o[0],se=o[1],ae=nr([H,te,se,D],"float32"),ue=this.readSync(r.dataId),ye=this.readSync(i.dataId),we=this.readSync(e.dataId),ve=e.strides,Ee=ae.strides,Te=0;Te<H;Te++){var Fe=4*Te,Le=ue[Fe],Me=ue[Fe+1],Ne=ue[Fe+2],Ze=ue[Fe+3],Xe=ye[Te];if(!(Xe>=d))for(var qe=te>1?(Ne-Le)*(A-1)/(te-1):0,tt=se>1?(Ze-Me)*(O-1)/(se-1):0,ct=0;ct<te;ct++){var bt=te>1?Le*(A-1)+ct*qe:.5*(Le+Ne)*(A-1);if(bt<0||bt>A-1)for(var mt=0;mt<se;mt++)for(var ht=0;ht<D;ht++){var At=ht+mt*Ee[2]+ct*Ee[1]+Te*Ee[0];ae.values[At]=u}else if(s==="bilinear"){var ft=Math.floor(bt),xt=Math.ceil(bt),St=bt-ft;for(mt=0;mt<se;mt++)if((hr=se>1?Me*(O-1)+mt*tt:.5*(Me+Ze)*(O-1))<0||hr>O-1)for(ht=0;ht<D;ht++)At=ht+mt*Ee[2]+ct*Ee[1]+Te*Ee[0],ae.values[At]=u;else{var Lt=Math.floor(hr),$t=Math.ceil(hr),ir=hr-Lt;for(ht=0;ht<D;ht++){var ur=we[At=ht+Lt*ve[2]+ft*ve[1]+Xe*ve[0]],vr=we[At=ht+$t*ve[2]+ft*ve[1]+Xe*ve[0]],pr=we[At=ht+Lt*ve[2]+xt*ve[1]+Xe*ve[0]],mr=ur+(vr-ur)*ir,lr=pr+(we[At=ht+$t*ve[2]+xt*ve[1]+Xe*ve[0]]-pr)*ir;At=ht+mt*Ee[2]+ct*Ee[1]+Te*Ee[0],ae.values[At]=mr+(lr-mr)*St}}}else for(mt=0;mt<se;++mt){var hr;if((hr=se>1?Me*(O-1)+mt*tt:.5*(Me+Ze)*(O-1))<0||hr>O-1)for(ht=0;ht<D;ht++)At=ht+mt*Ee[2]+ct*Ee[1]+Te*Ee[0],ae.values[At]=u;else{var Ur=Math.round(hr),Ir=Math.round(bt);for(ht=0;ht<D;ht++){var Xr=ht+Ur*ve[2]+Ir*ve[1]+Xe*ve[0],ln=ht+mt*Ee[2]+ct*Ee[1]+Te*Ee[0];ae.values[ln]=we[Xr]}}}}}return ae.toTensor()},t.prototype.sparseToDense=function(e,r,i,o){var s=ia(0,e,i),u=s.sliceRank,l=s.numUpdates,d=s.sliceSize,A=s.strides,O=s.outputSize;return this.scatter(e,r,i,O,d,l,u,A,o,!1)},t.prototype.gatherND=function(e,r){var i=r.shape,o=i[i.length-1],s=ys(e,r),u=s[0],l=s[1],d=s[2],A=s[3];if(l===0)return Un([],u,e.dtype);for(var O=new Jt([l,d],e.dtype),D=this.readSync(r.dataId),H=this.readSync(e.dataId),te=0;te<l;te++){for(var se=[],ae=0,ue=0;ue<o;ue++){var ye=D[te*o+ue];ae+=ye*A[ue],se.push(ye)}if(ae<0||ae>=e.size/d)throw new Error("Invalid indices: "+se+" does not index into "+e.shape);for(var we=0;we<d;we++)O.values[te*d+we]=H[ae*d+we]}return O.toTensor().reshape(u)},t.prototype.scatterND=function(e,r,i){var o=ia(0,e,i),s=o.sliceRank,u=o.numUpdates,l=o.sliceSize,d=o.strides,A=o.outputSize,O=Tt(0);return this.scatter(e,r,i,A,l,u,s,d,O,!0)},t.prototype.fill=function(e,r,i){var o=Q(i=i||Ue(r),ce(e));return o.fill(r),ze.makeTensor(o,e,i,this)},t.prototype.onesLike=function(e){if(e.dtype==="string")throw new Error("onesLike is not supported for string tensors");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){var r=Q(e.dtype,ce(e.shape));return this.makeOutput(r,e.shape,e.dtype)},t.prototype.linspace=function(e,r,i){return Is(e,r,i)},t.prototype.scatter=function(e,r,i,o,s,u,l,d,A,O){var D=[o/s,s],H=this.readSync(e.dataId),te=this.readSync(r.dataId);if(o===0)return Un([],i,r.dtype);var se=new Jt(D,r.dtype);se.values.fill(this.readSync(A.dataId)[0]);for(var ae=0;ae<u;ae++){for(var ue=[],ye=0,we=0;we<l;we++){var ve=H[ae*l+we];ue.push(ve),ye+=ve*d[we]}if(ye<0||ye>=o/s)throw new Error("Invalid indices: "+ue+" does not index into "+i);for(var Ee=0;Ee<s;Ee++)O?se.values[ye*s+Ee]+=te[ae*s+Ee]:se.values[ye*s+Ee]=r.rank===0?te[0]:te[ae*s+Ee]}return se.toTensor().reshape(i)},t}(Cl);ze.registerBackend("cpu",function(){return new vg},1);for(var iu=0,of=[{kernelName:"NonMaxSuppressionV5",backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs,i=t,o=i.boxes,s=i.scores,u=r,l=u.maxOutputSize,d=u.iouThreshold,A=u.scoreThreshold,O=u.softNmsSigma,D=e;wt(o,"NonMaxSuppressionWithScore");var H=Os(D.data.get(o.dataId).values,D.data.get(s.dataId).values,l,d,A,O);return[H.selectedIndices,H.selectedScores]}},{kernelName:"Square",backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t.x,i=e;wt(r,"square");for(var o=i.data.get(r.dataId).values,s=new Float32Array(o.length),u=0;u<o.length;++u){var l=o[u];s[u]=l*l}return{dataId:i.write(s,r.shape,r.dtype),shape:r.shape,dtype:r.dtype}}},{kernelName:ca,backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t,i=r.a,o=r.b,s=e;wt([i,o],ca);var u=s.data.get(i.dataId).values,l=s.data.get(o.dataId).values,d=function(D,H,te,se,ae,ue){var ye=fr(D,H),we=ye.length,ve=rt(ye),Ee=V(ae,ce(ye)),Te=D.length,Fe=H.length,Le=rt(D),Me=rt(H),Ne=Gi(D,ye),Ze=Gi(H,ye);if(Ne.length+Ze.length===0)for(var Xe=0;Xe<Ee.length;++Xe)Ee[Xe]=ue(te[Xe%te.length],se[Xe%se.length]);else{var qe=function(tt){var ct=Ct(tt,we,ve),bt=ct.slice(-Te);Ne.forEach(function(ft){return bt[ft]=0});var mt=Et(bt,Te,Le),ht=ct.slice(-Fe);Ze.forEach(function(ft){return ht[ft]=0});var At=Et(ht,Fe,Me);Ee[tt]=ue(te[mt],se[At])};for(Xe=0;Xe<Ee.length;++Xe)qe(Xe)}return[Ee,ye]}(i.shape,o.shape,u,l,i.dtype,function(D,H){var te=D-H;return te*te}),A=d[0],O=d[1];return{dataId:s.write(A,O,i.dtype),shape:O,dtype:i.dtype}}}];iu<of.length;iu++)G(of[iu]);for(var Ho,mg=function(n){this.variableNames=["A"];var t=zn(),e=n[0],r=n[1];this.outputShape=n,this.userCode=`
void main() {
ivec3 coords = getOutputCoords();
int texR = coords[0];
int texC = coords[1];
int depth = coords[2];
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+r+".0, "+e+`.0);
vec4 values = `+t.texture2D+`(A, uv);
float value;
if (depth == 0) {
value = values.r;
} else if (depth == 1) {
value = values.g;
} else if (depth == 2) {
value = values.b;
} else if (depth == 3) {
value = values.a;
}
setOutput(floor(value * 255.0 + 0.5));
}
`},gg=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var t=zn(),e=n[0],r=n[1];this.outputShape=n,this.userCode=`
void main() {
ivec3 coords = getOutputCoords();
int texR = coords[0];
int texC = coords[1];
int depth = coords[2];
vec4 result = vec4(0.);
for(int row=0; row<=1; row++) {
for(int col=0; col<=1; col++) {
texC = coords[1] + row;
depth = coords[2] + col;
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+r+".0, "+e+`.0);
vec4 values = `+t.texture2D+`(A, uv);
float value;
if (depth == 0) {
value = values.r;
} else if (depth == 1) {
value = values.g;
} else if (depth == 2) {
value = values.b;
} else if (depth == 3) {
value = values.a;
}
result[row * 2 + col] = floor(value * 255.0 + 0.5);
}
}
`+t.output+` = result;
}
`},ou=0,af=[{kernelName:"FromPixels",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs,i=t.pixels,o=r.numChannels,s=typeof HTMLVideoElement!="undefined"&&i instanceof HTMLVideoElement,u=typeof HTMLImageElement!="undefined"&&i instanceof HTMLImageElement,l=s?[i.videoWidth,i.videoHeight]:[i.width,i.height],d=l[0],A=l[1],O=[A,d],D=[A,d,o];(u||s)&&(Ho==null&&(Ho=document.createElement("canvas").getContext("2d")),Ho.canvas.width=d,Ho.canvas.height=A,Ho.drawImage(i,0,0,d,A),i=Ho.canvas);var H=e.makeTensorInfo(O,"int32");e.texData.get(H.dataId).usage=He.PIXELS,e.gpgpu.uploadPixelDataToTexture(e.getTexture(H.dataId),i);var te=M().getBool("WEBGL_PACK")?new gg(D):new mg(D),se=e.runWebGLProgram(te,[H],"int32");return e.disposeData(H.dataId),se}},{kernelName:"NonMaxSuppressionV5",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs;xi("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");var i=t,o=i.boxes,s=i.scores,u=r,l=u.maxOutputSize,d=u.iouThreshold,A=u.scoreThreshold,O=u.softNmsSigma,D=e,H=Os(D.readSync(o.dataId),D.readSync(s.dataId),l,d,A,O);return[H.selectedIndices,H.selectedScores]}},{kernelName:"Square",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t.x,i=e,o=new sr(r.shape,"return x * x;");return i.runWebGLProgram(o,[r],r.dtype)}},{kernelName:ca,backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t,i=r.a,o=r.b,s=e,u=M().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Qi("return (a - b) * (a - b);",i.shape,o.shape):new vn("return (a - b) * (a - b);",i.shape,o.shape);return s.compileAndRun(u,[i,o])}}];ou<af.length;ou++)G(af[ou]);for(var au=0,sf=[{kernelName:"Square",gradFunc:function(n,t){var e=t[0];return{x:function(){return n.mul(e.toFloat().mul(2))}}}},{kernelName:ca,gradFunc:function(n,t){var e=t[0],r=t[1],i=Tt(2);return{a:function(){return Hn(n,Hn(i,Dn(e,r)))},b:function(){return Hn(n,Hn(i,Dn(r,e)))}}}}];au<sf.length;au++)F(sf[au]);var yg=function(){function n(){}return n.prototype.fetch=function(t,e){return fetch(t,e)},n.prototype.now=function(){return performance.now()},n.prototype.encode=function(t,e){if(e!=="utf-8"&&e!=="utf8")throw new Error("Browser's encoder only supports utf-8, but got "+e);return this.textEncoder==null&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(t)},n.prototype.decode=function(t,e){return new TextDecoder(e).decode(t)},n}();M().get("IS_BROWSER")&&M().setPlatform("browser",new yg);var su,bg=function(){return Se(22591)},wg=function(){function n(){this.util=Se(24726),this.textEncoder=new this.util.TextEncoder}return n.prototype.fetch=function(t,e){return M().global.fetch!=null?M().global.fetch(t,e):(su==null&&(su=bg()),su(t,e))},n.prototype.now=function(){var t=b.hrtime();return 1e3*t[0]+t[1]/1e6},n.prototype.encode=function(t,e){if(e!=="utf-8"&&e!=="utf8")throw new Error("Node built-in encoder only supports utf-8, but got "+e);return this.textEncoder.encode(t)},n.prototype.decode=function(t,e){return t.length===0?"":new this.util.TextDecoder(e).decode(t)},n}();M().get("IS_NODE")&&M().setPlatform("node",new wg);var uu={float32:4,int32:4,uint16:2,uint8:1,bool:1},Za=4;function uf(n,t){for(var e={},r=0,i=function(u){var l=u.name,d=u.dtype,A=u.shape,O=ce(A),D=void 0;if("quantization"in u){var H=u.quantization;if(H.dtype!=="uint8"&&H.dtype!=="uint16")throw new Error("Weight "+u.name+" has unknown quantization dtype "+H.dtype+". Supported quantization dtypes are: 'uint8' and 'uint16'.");var te=uu[H.dtype],se=n.slice(r,r+O*te),ae=H.dtype==="uint8"?new Uint8Array(se):new Uint16Array(se);if(d==="float32")D=Float32Array.from(ae,function(Te){return Te*H.scale+H.min});else{if(d!=="int32")throw new Error("Unsupported dtype in weight '"+l+"': "+d);D=Int32Array.from(ae,function(Te){return Math.round(Te*H.scale+H.min)})}r+=O*te}else if(d==="string"){var ue=ce(u.shape);D=[];for(var ye=0;ye<ue;ye++){var we=new Uint32Array(n.slice(r,r+Za))[0];r+=Za;var ve=new Uint8Array(n.slice(r,r+we));D.push(ve),r+=we}}else{var Ee=uu[d];if(se=n.slice(r,r+O*Ee),d==="float32")D=new Float32Array(se);else if(d==="int32")D=new Int32Array(se);else{if(d!=="bool")throw new Error("Unsupported dtype in weight '"+l+"': "+d);D=new Uint8Array(se)}r+=O*Ee}e[l]=Un(D,A,d)},o=0,s=t;o<s.length;o++)i(s[o]);return e}function Ag(n){if(n===null)throw new Error("Invalid input value: "+JSON.stringify(n));var t=0,e=[];n.forEach(function(o){if(t+=o.byteLength,e.push(o.byteLength===o.buffer.byteLength?o:new o.constructor(o)),!(o instanceof Float32Array||o instanceof Int32Array||o instanceof Uint8Array))throw new Error("Unsupported TypedArray subtype: "+o.constructor.name)});var r=new Uint8Array(t),i=0;return e.forEach(function(o){r.set(new Uint8Array(o.buffer),i),i+=o.byteLength}),r.buffer}var lu=typeof x!="undefined"&&(typeof Blob=="undefined"||typeof atob=="undefined"||typeof btoa=="undefined");function lf(n){return lu?x.byteLength(n):new Blob([n]).size}function cu(n){var t=0;n.forEach(function(i){t+=i.byteLength});var e=new Uint8Array(t),r=0;return n.forEach(function(i){e.set(new Uint8Array(i),r),r+=i.byteLength}),e.buffer}function cf(n){for(n=n.trim();n.endsWith("/");)n=n.slice(0,n.length-1);var t=n.split("/");return t[t.length-1]}function ha(n){if(n.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:n.modelTopology==null?0:lf(JSON.stringify(n.modelTopology)),weightSpecsBytes:n.weightSpecs==null?0:lf(JSON.stringify(n.weightSpecs)),weightDataBytes:n.weightData==null?0:n.weightData.byteLength}}var si=function(){function n(){this.saveRouters=[],this.loadRouters=[]}return n.getInstance=function(){return n.instance==null&&(n.instance=new n),n.instance},n.registerSaveRouter=function(t){n.getInstance().saveRouters.push(t)},n.registerLoadRouter=function(t){n.getInstance().loadRouters.push(t)},n.getSaveHandlers=function(t){return n.getHandlers(t,"save")},n.getLoadHandlers=function(t,e){return n.getHandlers(t,"load",e)},n.getHandlers=function(t,e,r){var i=[];return(e==="load"?n.getInstance().loadRouters:n.getInstance().saveRouters).forEach(function(o){var s=o(t,r);s!==null&&i.push(s)}),i},n}(),Vo="://",so=function(){function n(){this.managers={}}return n.getInstance=function(){return n.instance==null&&(n.instance=new n),n.instance},n.registerManager=function(t,e){ee(t!=null,function(){return"scheme must not be undefined or null."}),t.endsWith(Vo)&&(t=t.slice(0,t.indexOf(Vo))),ee(t.length>0,function(){return"scheme must not be an empty string."});var r=n.getInstance();ee(r.managers[t]==null,function(){return"A model store manager is already registered for scheme '"+t+"'."}),r.managers[t]=e},n.getManager=function(t){var e=this.getInstance().managers[t];if(e==null)throw new Error("Cannot find model manager for scheme '"+t+"'");return e},n.getSchemes=function(){return Object.keys(this.getInstance().managers)},n}();function Ja(n){if(n.indexOf(Vo)===-1)throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+so.getSchemes().join(","));return{scheme:n.split(Vo)[0],path:n.split(Vo)[1]}}function ff(n,t,e){return e===void 0&&(e=!1),E(this,void 0,void 0,function(){var r,i,o,s,u,l,d,A,O;return C(this,function(D){switch(D.label){case 0:return ee(n!==t,function(){return"Old path and new path are the same: '"+n+"'"}),ee((r=si.getLoadHandlers(n)).length>0,function(){return"Copying failed because no load handler is found for source URL "+n+"."}),ee(r.length<2,function(){return"Copying failed because more than one ("+r.length+") load handlers for source URL "+n+"."}),i=r[0],ee((o=si.getSaveHandlers(t)).length>0,function(){return"Copying failed because no save handler is found for destination URL "+t+"."}),ee(o.length<2,function(){return"Copying failed because more than one ("+r.length+") save handlers for destination URL "+t+"."}),s=o[0],u=Ja(n).scheme,l=Ja(n).path,d=u===Ja(n).scheme,[4,i.load()];case 1:return A=D.sent(),e&&d?[4,so.getManager(u).removeModel(l)]:[3,3];case 2:D.sent(),D.label=3;case 3:return[4,s.save(A)];case 4:return O=D.sent(),!e||d?[3,6]:[4,so.getManager(u).removeModel(l)];case 5:D.sent(),D.label=6;case 6:return[2,O.modelArtifactsInfo]}})})}var To="models_store",uo="model_info_store";function df(){if(!M().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");var n=window||self,t=n.indexedDB||n.mozIndexedDB||n.webkitIndexedDB||n.msIndexedDB||n.shimIndexedDB;if(t==null)throw new Error("The current browser does not appear to support IndexedDB.");return t}function fu(n){var t=n.result;t.createObjectStore(To,{keyPath:"modelPath"}),t.createObjectStore(uo,{keyPath:"modelPath"})}var Go=function(){function n(t){if(this.indexedDB=df(),t==null||!t)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=t}return n.prototype.save=function(t){return E(this,void 0,void 0,function(){return C(this,function(e){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return[2,this.databaseAction(this.modelPath,t)]})})},n.prototype.load=function(){return E(this,void 0,void 0,function(){return C(this,function(t){return[2,this.databaseAction(this.modelPath)]})})},n.prototype.databaseAction=function(t,e){var r=this;return new Promise(function(i,o){var s=r.indexedDB.open("tensorflowjs",1);s.onupgradeneeded=function(){return fu(s)},s.onsuccess=function(){var u=s.result;if(e==null){var l=u.transaction(To,"readonly"),d=l.objectStore(To).get(r.modelPath);d.onsuccess=function(){if(d.result==null)return u.close(),o(new Error("Cannot find model with path '"+r.modelPath+"' in IndexedDB."));i(d.result.modelArtifacts)},d.onerror=function(se){return u.close(),o(d.error)},l.oncomplete=function(){return u.close()}}else{var A,O=ha(e),D=u.transaction(uo,"readwrite"),H=D.objectStore(uo),te=H.put({modelPath:r.modelPath,modelArtifactsInfo:O});te.onsuccess=function(){var se=(A=u.transaction(To,"readwrite")).objectStore(To).put({modelPath:r.modelPath,modelArtifacts:e,modelArtifactsInfo:O});se.onsuccess=function(){return i({modelArtifactsInfo:O})},se.onerror=function(ae){var ue=(H=D.objectStore(uo)).delete(r.modelPath);ue.onsuccess=function(){return u.close(),o(se.error)},ue.onerror=function(ye){return u.close(),o(se.error)}}},te.onerror=function(se){return u.close(),o(te.error)},D.oncomplete=function(){A==null?u.close():A.oncomplete=function(){return u.close()}}}},s.onerror=function(u){return o(s.error)}})},n.URL_SCHEME="indexeddb://",n}(),pf=function(n){return M().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(Go.URL_SCHEME)?(t=n.slice(Go.URL_SCHEME.length),new Go(t)):null;var t};si.registerSaveRouter(pf),si.registerLoadRouter(pf);var xg=function(){function n(){this.indexedDB=df()}return n.prototype.listModels=function(){return E(this,void 0,void 0,function(){var t=this;return C(this,function(e){return[2,new Promise(function(r,i){var o=t.indexedDB.open("tensorflowjs",1);o.onupgradeneeded=function(){return fu(o)},o.onsuccess=function(){var s=o.result,u=s.transaction(uo,"readonly"),l=u.objectStore(uo).getAll();l.onsuccess=function(){for(var d={},A=0,O=l.result;A<O.length;A++){var D=O[A];d[D.modelPath]=D.modelArtifactsInfo}r(d)},l.onerror=function(d){return s.close(),i(l.error)},u.oncomplete=function(){return s.close()}},o.onerror=function(s){return i(o.error)}})]})})},n.prototype.removeModel=function(t){return E(this,void 0,void 0,function(){var e=this;return C(this,function(r){var i;return t=(i=t).startsWith(Go.URL_SCHEME)?i.slice(Go.URL_SCHEME.length):i,[2,new Promise(function(o,s){var u=e.indexedDB.open("tensorflowjs",1);u.onupgradeneeded=function(){return fu(u)},u.onsuccess=function(){var l,d=u.result,A=d.transaction(uo,"readwrite"),O=A.objectStore(uo),D=O.get(t);D.onsuccess=function(){if(D.result==null)return d.close(),s(new Error("Cannot find model with path '"+t+"' in IndexedDB."));var H=O.delete(t),te=function(){var se=(l=d.transaction(To,"readwrite")).objectStore(To).delete(t);se.onsuccess=function(){return o(D.result.modelArtifactsInfo)},se.onerror=function(ae){return s(D.error)}};H.onsuccess=te,H.onerror=function(se){return te(),d.close(),s(D.error)}},D.onerror=function(H){return d.close(),s(D.error)},A.oncomplete=function(){l==null?d.close():l.oncomplete=function(){return d.close()}}},u.onerror=function(l){return s(u.error)}})]})})},n}();if(M().getBool("IS_BROWSER"))try{so.registerManager(Go.URL_SCHEME,new xg)}catch(n){}var Ki="/",Qo="tensorflowjs_models",hf="info",Eg="model_topology",Cg="weight_specs",Sg="weight_data",Ig="model_metadata";function vf(n){return{info:[Qo,n,hf].join(Ki),topology:[Qo,n,Eg].join(Ki),weightSpecs:[Qo,n,Cg].join(Ki),weightData:[Qo,n,Sg].join(Ki),modelMetadata:[Qo,n,Ig].join(Ki)}}function Tg(n){var t=n.split(Ki);if(t.length<3)throw new Error("Invalid key format: "+n);return t.slice(1,t.length-1).join(Ki)}var Xo=function(){function n(t){if(!M().getBool("IS_BROWSER")||typeof window=="undefined"||window.localStorage===void 0)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,t==null||!t)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=t,this.keys=vf(this.modelPath)}return n.prototype.save=function(t){return E(this,void 0,void 0,function(){var e,r,i;return C(this,function(o){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");e=JSON.stringify(t.modelTopology),r=JSON.stringify(t.weightSpecs),i=ha(t);try{return this.LS.setItem(this.keys.info,JSON.stringify(i)),this.LS.setItem(this.keys.topology,e),this.LS.setItem(this.keys.weightSpecs,r),this.LS.setItem(this.keys.weightData,function(s){if(lu)return x.from(s).toString("base64");for(var u=new Uint8Array(s),l="",d=0,A=u.length;d<A;d++)l+=String.fromCharCode(u[d]);return btoa(l)}(t.weightData)),this.LS.setItem(this.keys.modelMetadata,JSON.stringify({format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,userDefinedMetadata:t.userDefinedMetadata})),[2,{modelArtifactsInfo:i}]}catch(s){throw this.LS.removeItem(this.keys.info),this.LS.removeItem(this.keys.topology),this.LS.removeItem(this.keys.weightSpecs),this.LS.removeItem(this.keys.weightData),this.LS.removeItem(this.keys.modelMetadata),new Error("Failed to save model '"+this.modelPath+"' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes="+i.modelTopologyBytes+", weightSpecsBytes="+i.weightSpecsBytes+", weightDataBytes="+i.weightDataBytes+".")}return[2]})})},n.prototype.load=function(){return E(this,void 0,void 0,function(){var t,e,r,i,o,s,u;return C(this,function(l){if((t=JSON.parse(this.LS.getItem(this.keys.info)))==null)throw new Error("In local storage, there is no model with name '"+this.modelPath+"'");if(t.modelTopologyType!=="JSON")throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");if(e={},(r=JSON.parse(this.LS.getItem(this.keys.topology)))==null)throw new Error("In local storage, the topology of model '"+this.modelPath+"' is missing.");if(e.modelTopology=r,(i=JSON.parse(this.LS.getItem(this.keys.weightSpecs)))==null)throw new Error("In local storage, the weight specs of model '"+this.modelPath+"' are missing.");if(e.weightSpecs=i,(o=this.LS.getItem(this.keys.modelMetadata))!=null&&(s=JSON.parse(o),e.format=s.format,e.generatedBy=s.generatedBy,e.convertedBy=s.convertedBy,e.userDefinedMetadata=s.userDefinedMetadata),(u=this.LS.getItem(this.keys.weightData))==null)throw new Error("In local storage, the binary weight values of model '"+this.modelPath+"' are missing.");return e.weightData=function(d){if(lu){var A=x.from(d,"base64");return A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength)}for(var O=atob(d),D=new Uint8Array(O.length),H=0;H<O.length;++H)D.set([O.charCodeAt(H)],H);return D.buffer}(u),[2,e]})})},n.URL_SCHEME="localstorage://",n}(),mf=function(n){return M().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(Xo.URL_SCHEME)?(t=n.slice(Xo.URL_SCHEME.length),new Xo(t)):null;var t};si.registerSaveRouter(mf),si.registerLoadRouter(mf);var Rg=function(){function n(){ee(M().getBool("IS_BROWSER"),function(){return"Current environment is not a web browser"}),ee(typeof window=="undefined"||window.localStorage!==void 0,function(){return"Current browser does not appear to support localStorage"}),this.LS=window.localStorage}return n.prototype.listModels=function(){return E(this,void 0,void 0,function(){var t,e,r,i,o,s;return C(this,function(u){for(t={},e=Qo+Ki,r=Ki+hf,i=0;i<this.LS.length;++i)(o=this.LS.key(i)).startsWith(e)&&o.endsWith(r)&&(s=Tg(o),t[s]=JSON.parse(this.LS.getItem(o)));return[2,t]})})},n.prototype.removeModel=function(t){return E(this,void 0,void 0,function(){var e,r;return C(this,function(i){var o;if(t=(o=t).startsWith(Xo.URL_SCHEME)?o.slice(Xo.URL_SCHEME.length):o,e=vf(t),this.LS.getItem(e.info)==null)throw new Error("Cannot find model at path '"+t+"'");return r=JSON.parse(this.LS.getItem(e.info)),this.LS.removeItem(e.info),this.LS.removeItem(e.topology),this.LS.removeItem(e.weightSpecs),this.LS.removeItem(e.weightData),[2,r]})})},n}();if(M().getBool("IS_BROWSER"))try{so.registerManager(Xo.URL_SCHEME,new Rg)}catch(n){}var Og="model",kg=".json",jg=".weights.bin";function gf(n){return new Promise(function(t){return setTimeout(t)}).then(n)}var du=function(){function n(t){if(!M().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");t.startsWith(n.URL_SCHEME)&&(t=t.slice(n.URL_SCHEME.length)),t!=null&&t.length!==0||(t=Og),this.modelTopologyFileName=t+kg,this.weightDataFileName=t+jg}return n.prototype.save=function(t){return E(this,void 0,void 0,function(){var e,r,i,o,s,u;return C(this,function(l){switch(l.label){case 0:if(typeof document=="undefined")throw new Error("Browser downloads are not supported in this environment since `document` is not present");if(e=window.URL.createObjectURL(new Blob([t.weightData],{type:"application/octet-stream"})),!(t.modelTopology instanceof ArrayBuffer))return[3,1];throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");case 1:return r=[{paths:["./"+this.weightDataFileName],weights:t.weightSpecs}],i={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,weightsManifest:r},o=window.URL.createObjectURL(new Blob([JSON.stringify(i)],{type:"application/json"})),(s=this.jsonAnchor==null?document.createElement("a"):this.jsonAnchor).download=this.modelTopologyFileName,s.href=o,[4,gf(function(){return s.dispatchEvent(new MouseEvent("click"))})];case 2:return l.sent(),t.weightData==null?[3,4]:((u=this.weightDataAnchor==null?document.createElement("a"):this.weightDataAnchor).download=this.weightDataFileName,u.href=e,[4,gf(function(){return u.dispatchEvent(new MouseEvent("click"))})]);case 3:l.sent(),l.label=4;case 4:return[2,{modelArtifactsInfo:ha(t)}]}})})},n.URL_SCHEME="downloads://",n}(),Dg=function(){function n(t){if(t==null||t.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+t);this.files=t}return n.prototype.load=function(){return E(this,void 0,void 0,function(){var t,e,r=this;return C(this,function(i){return t=this.files[0],e=this.files.slice(1),[2,new Promise(function(o,s){var u=new FileReader;u.onload=function(l){var d=JSON.parse(l.target.result),A=d.modelTopology;if(A!=null){e.length===0&&o({modelTopology:A});var O=d.weightsManifest;if(O!=null){var D;try{D=r.checkManifestAndWeightFiles(O,e)}catch(ae){return void s(ae)}var H=[],te=[],se=[];O.forEach(function(ae){ae.paths.forEach(function(ue){te.push(ue),se.push(null)}),H.push.apply(H,ae.weights)}),O.forEach(function(ae){ae.paths.forEach(function(ue){var ye=new FileReader;ye.onload=function(we){var ve=we.target.result,Ee=te.indexOf(ue);se[Ee]=ve,se.indexOf(null)===-1&&o({modelTopology:A,weightSpecs:H,weightData:cu(se),format:d.format,generatedBy:d.generatedBy,convertedBy:d.convertedBy,userDefinedMetadata:d.userDefinedMetadata})},ye.onerror=function(we){return s("Failed to weights data from file of path '"+ue+"'.")},ye.readAsArrayBuffer(D[ue])})})}else s(new Error("weightManifest field is missing from file "+t.name))}else s(new Error("modelTopology field is missing from file "+t.name))},u.onerror=function(l){return s("Failed to read model topology and weights manifest JSON from file '"+t.name+"'. BrowserFiles supports loading Keras-style tf.Model artifacts only.")},u.readAsText(t)})]})})},n.prototype.checkManifestAndWeightFiles=function(t,e){for(var r=[],i=e.map(function(l){return cf(l.name)}),o={},s=0,u=t;s<u.length;s++)u[s].paths.forEach(function(l){var d=cf(l);if(r.indexOf(d)!==-1)throw new Error("Duplicate file basename found in weights manifest: '"+d+"'");if(r.push(d),i.indexOf(d)===-1)throw new Error("Weight file with basename '"+d+"' is not provided.");o[l]=e[i.indexOf(d)]});if(r.length!==e.length)throw new Error("Mismatch in the number of files in weights manifest ("+r.length+") and the number of weight files provided ("+e.length+").");return o},n}();function yf(n,t,e,r){(function(o){ee(o!=null&&Array.isArray(o)&&o.length>0,function(){return"promises must be a none empty array"})})(n),function(o,s){ee(o>=0&&o<=1,function(){return"Progress fraction must be in range [0, 1], but got startFraction "+o}),ee(s>=0&&s<=1,function(){return"Progress fraction must be in range [0, 1], but got endFraction "+s}),ee(s>=o,function(){return"startFraction must be no more than endFraction, but got startFraction "+o+" and endFraction "+s})}(e=e==null?0:e,r=r==null?1:r);var i=0;return Promise.all(n.map(function(o){return o.then(function(s){var u=e+ ++i/n.length*(r-e);return t(u),s}),o}))}function bf(n,t){return E(this,void 0,void 0,function(){var e,r,i,o,s,u,l,d,A;return C(this,function(O){switch(O.label){case 0:return t==null&&(t={}),e=t.fetchFunc==null?M().platform.fetch:t.fetchFunc,r=n.map(function(D){return e(D,t.requestInit,{isBinary:!0})}),i=0,o=.5,t.onProgress!=null?[3,2]:[4,Promise.all(r)];case 1:return s=O.sent(),[3,4];case 2:return[4,yf(r,t.onProgress,i,o)];case 3:s=O.sent(),O.label=4;case 4:return u=s.map(function(D){return D.arrayBuffer()}),l=.5,d=1,t.onProgress!=null?[3,6]:[4,Promise.all(u)];case 5:return A=O.sent(),[3,8];case 6:return[4,yf(u,t.onProgress,l,d)];case 7:A=O.sent(),O.label=8;case 8:return[2,A]}})})}function wf(n){var t=this;return function(e,r,i){return r===void 0&&(r=""),E(t,void 0,void 0,function(){var o,s,u,l,d,A,O,D,H,te;return C(this,function(se){switch(se.label){case 0:if(o=e.map(function(){return!1}),s={},u=i!=null?i.map(function(){return!1}):[],l=[],e.forEach(function(ae,ue){var ye=0;ae.weights.forEach(function(we){var ve="quantization"in we?we.quantization.dtype:we.dtype,Ee=uu[ve]*ce(we.shape),Te=function(){o[ue]=!0,s[ue]==null&&(s[ue]=[]),s[ue].push({manifestEntry:we,groupOffset:ye,sizeBytes:Ee})};i!=null?i.forEach(function(Fe,Le){Fe===we.name&&(Te(),u[Le]=!0)}):Te(),l.push(we.name),ye+=Ee})}),!u.every(function(ae){return ae}))throw d=i.filter(function(ae,ue){return!u[ue]}),new Error("Could not find weights in manifest with names: "+d.join(", ")+`.
Manifest JSON has weights with names: `+l.join(", ")+".");return A=o.reduce(function(ae,ue,ye){return ue&&ae.push(ye),ae},[]),O=[],A.forEach(function(ae){e[ae].paths.forEach(function(ue){var ye=r+(r.endsWith("/")?"":"/")+ue;O.push(ye)})}),[4,n(O)];case 1:return D=se.sent(),H={},te=0,A.forEach(function(ae){for(var ue=e[ae].paths.length,ye=0,we=0;we<ue;we++)ye+=D[te+we].byteLength;for(var ve=new ArrayBuffer(ye),Ee=new Uint8Array(ve),Te=0,Fe=0;Fe<ue;Fe++){var Le=new Uint8Array(D[te+Fe]);Ee.set(Le,Te),Te+=Le.byteLength}s[ae].forEach(function(Me){var Ne=uf(ve.slice(Me.groupOffset,Me.groupOffset+Me.sizeBytes),[Me.manifestEntry]);for(var Ze in Ne)H[Ze]=Ne[Ze]}),te+=ue}),[2,H]}})})}}si.registerSaveRouter(function(n){return M().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(du.URL_SCHEME)?function(t){return t===void 0&&(t="model"),new du(t)}(n.slice(du.URL_SCHEME.length)):null});var Af=function(){function n(t,e){if(this.DEFAULT_METHOD="POST",e==null&&(e={}),this.weightPathPrefix=e.weightPathPrefix,this.onProgress=e.onProgress,e.fetchFunc!=null?(ee(typeof e.fetchFunc=="function",function(){return"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"}),this.fetch=e.fetchFunc):this.fetch=M().platform.fetch,ee(t!=null&&t.length>0,function(){return"URL path for http must not be null, undefined or empty."}),Array.isArray(t)&&ee(t.length===2,function(){return"URL paths for http must have a length of 2, (actual length is "+t.length+")."}),this.path=t,e.requestInit!=null&&e.requestInit.body!=null)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=e.requestInit||{}}return n.prototype.save=function(t){return E(this,void 0,void 0,function(){var e,r,i,o;return C(this,function(s){switch(s.label){case 0:if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");return(e=Object.assign({method:this.DEFAULT_METHOD},this.requestInit)).body=new FormData,r=[{paths:["./model.weights.bin"],weights:t.weightSpecs}],i={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,userDefinedMetadata:t.userDefinedMetadata,weightsManifest:r},e.body.append("model.json",new Blob([JSON.stringify(i)],{type:"application/json"}),"model.json"),t.weightData!=null&&e.body.append("model.weights.bin",new Blob([t.weightData],{type:"application/octet-stream"}),"model.weights.bin"),[4,this.fetch(this.path,e)];case 1:if((o=s.sent()).ok)return[2,{modelArtifactsInfo:ha(t),responses:[o]}];throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+o.status+".")}})})},n.prototype.load=function(){return E(this,void 0,void 0,function(){var t,e,r,i,o,s,u,l,d,A,O,D;return C(this,function(H){switch(H.label){case 0:return[4,this.fetch(this.path,this.requestInit)];case 1:if(!(t=H.sent()).ok)throw new Error("Request to "+this.path+" failed with status code "+t.status+". Please verify this URL points to the model JSON of the model to load.");H.label=2;case 2:return H.trys.push([2,4,,5]),[4,t.json()];case 3:return e=H.sent(),[3,5];case 4:throw H.sent(),r="Failed to parse model JSON of response from "+this.path+".",this.path.endsWith(".pb")?r+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":r+=" Please make sure the server is serving valid JSON for this request.",new Error(r);case 5:if(i=e.modelTopology,o=e.weightsManifest,s=e.generatedBy,u=e.convertedBy,l=e.format,d=e.userDefinedMetadata,i==null&&o==null)throw new Error("The JSON from HTTP path "+this.path+" contains neither model topology or manifest for weights.");return o==null?[3,7]:[4,this.loadWeights(o)];case 6:D=H.sent(),A=D[0],O=D[1],H.label=7;case 7:return[2,{modelTopology:i,weightSpecs:A,weightData:O,userDefinedMetadata:d,generatedBy:s,convertedBy:u,format:l}]}})})},n.prototype.loadWeights=function(t){return E(this,void 0,void 0,function(){var e,r,i,o,s,u,l,d,A,O,D;return C(this,function(H){switch(H.label){case 0:for(e=Array.isArray(this.path)?this.path[1]:this.path,r=function(te){var se=te.lastIndexOf("/"),ae=te.lastIndexOf("?"),ue=te.substring(0,se),ye=ae>se?te.substring(ae):"";return[ue+"/",ye]}(e),i=r[0],o=r[1],s=this.weightPathPrefix||i,u=[],l=0,d=t;l<d.length;l++)A=d[l],u.push.apply(u,A.weights);return O=[],t.forEach(function(te){te.paths.forEach(function(se){O.push(s+se+o)})}),[4,bf(O,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress})];case 1:return D=H.sent(),[2,[u,cu(D)]]}})})},n.URL_SCHEME_REGEX=/^https?:\/\//,n}();function pu(n){return n.match(Af.URL_SCHEME_REGEX)!=null}var xf=function(n,t){return typeof fetch=="undefined"?null:(Array.isArray(n)?n.every(function(e){return pu(e)}):pu(n))?hu(n,{onProgress:t}):null};function hu(n,t){return new Af(n,t)}si.registerSaveRouter(xf),si.registerLoadRouter(xf);var vu=function(){function n(t){this.modelArtifacts=t}return n.prototype.load=function(){return E(this,void 0,void 0,function(){return C(this,function(t){return[2,this.modelArtifacts]})})},n}(),Pg=function(){function n(t){this.saveHandler=t}return n.prototype.save=function(t){return E(this,void 0,void 0,function(){return C(this,function(e){return[2,this.saveHandler(t)]})})},n}(),Ef=Object.freeze({browserFiles:function(n){return new Dg(n)},browserHTTPRequest:function(n,t){return hu(n,t)},concatenateArrayBuffers:cu,decodeWeights:uf,encodeWeights:function(n,t){return E(this,void 0,void 0,function(){var e,r,i,o,s,u=this;return C(this,function(l){switch(l.label){case 0:for(e=[],r=[],i=Array.isArray(n)?n.map(function(d){return d.name}):Object.keys(n),o=function(d){var A=i[d],O=Array.isArray(n)?n[d].tensor:n[A];if(O.dtype!=="float32"&&O.dtype!=="int32"&&O.dtype!=="bool"&&O.dtype!=="string")throw new Error("Unsupported dtype in weight '"+A+"': "+O.dtype);var D={name:A,shape:O.shape,dtype:O.dtype};if(O.dtype==="string"){var H=new Promise(function(te){return E(u,void 0,void 0,function(){var se,ae,ue,ye,we,ve,Ee;return C(this,function(Te){switch(Te.label){case 0:return[4,O.bytes()];case 1:for(se=Te.sent(),ae=se.reduce(function(Fe,Le){return Fe+Le.length},0)+Za*se.length,ue=new Uint8Array(ae),ye=0,we=0;we<se.length;we++)ve=se[we],Ee=new Uint8Array(new Uint32Array([ve.length]).buffer),ue.set(Ee,ye),ye+=Za,ue.set(ve,ye),ye+=ve.length;return te(ue),[2]}})})});r.push(H)}else r.push(O.data());t!=null&&(D.group=t),e.push(D)},s=0;s<i.length;++s)o(s);return[4,Promise.all(r)];case 1:return[2,{data:Ag(l.sent()),specs:e}]}})})},fromMemory:function(n,t,e,r){return arguments.length===1?n.modelTopology!=null||n.weightSpecs!=null?new vu(n):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new vu({modelTopology:n})):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new vu({modelTopology:n,weightSpecs:t,weightData:e,trainingConfig:r}))},getLoadHandlers:function(n,t){return si.getLoadHandlers(n,t)},getModelArtifactsInfoForJSON:ha,getSaveHandlers:function(n){return si.getSaveHandlers(n)},http:hu,isHTTPScheme:pu,loadWeights:function(n,t,e,r){return t===void 0&&(t=""),E(this,void 0,void 0,function(){return C(this,function(i){return[2,wf(function(o){return bf(o,{requestInit:r})})(n,t,e)]})})},registerLoadRouter:function(n){return si.registerLoadRouter(n)},registerSaveRouter:function(n){return si.registerSaveRouter(n)},weightsLoaderFactory:wf,withSaveHandler:function(n){return new Pg(n)},copyModel:function(n,t){return E(this,void 0,void 0,function(){return C(this,function(e){return[2,ff(n,t,!1)]})})},listModels:function(){return E(this,void 0,void 0,function(){var n,t,e,r,i,o,s;return C(this,function(u){switch(u.label){case 0:n=so.getSchemes(),t={},e=0,r=n,u.label=1;case 1:return e<r.length?(i=r[e],[4,so.getManager(i).listModels()]):[3,4];case 2:for(s in o=u.sent())t[i+Vo+s]=o[s];u.label=3;case 3:return e++,[3,1];case 4:return[2,t]}})})},moveModel:function(n,t){return E(this,void 0,void 0,function(){return C(this,function(e){return[2,ff(n,t,!0)]})})},removeModel:function(n){return E(this,void 0,void 0,function(){var t;return C(this,function(e){return t=Ja(n),[2,so.getManager(t.scheme).removeModel(t.path)]})})}}),Ko,Bg=Ge({confusionMatrix_:function(n,t,e){var r=ke(n,"labels","confusionMatrix"),i=ke(t,"predictions","confusionMatrix");ee(e==null||e>0&&Number.isInteger(e),function(){return"If provided, numClasses must be a positive integer, but got "+e}),ee(r.rank===1,function(){return"Expected the rank of labels to be 1, but got "+r.rank}),ee(i.rank===1,function(){return"Expected the rank of predictions to be 1, but got "+i.rank}),ee(r.shape[0]===i.shape[0],function(){return"Mismatch in the number of examples: "+r.shape[0]+" vs. "+i.shape[0]+". Labels and predictions should have the same number of elements."}),ee(e>0&&Number.isInteger(e),function(){return"numClasses is required to be a positive integer, but got "+e});var o=gs(r.asType("int32"),e),s=gs(i.asType("int32"),e);return o.transpose().matMul(s).asType("int32")}}),cb=Object.freeze({confusionMatrix:Bg}),Mg=Ge({fromPixels_:function(n,t){if(t===void 0&&(t=3),t>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(n==null)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var e=!1,r=!1,i=!1,o=!1,s=!1;if(n.data instanceof Uint8Array)e=!0;else if(typeof ImageData!="undefined"&&n instanceof ImageData)r=!0;else if(typeof HTMLVideoElement!="undefined"&&n instanceof HTMLVideoElement)i=!0;else if(typeof HTMLImageElement!="undefined"&&n instanceof HTMLImageElement)o=!0;else{if(n.getContext==null)throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was "+n.constructor.name);s=!0}if(i&&i&&n.readyState<2)throw new Error("The video element has not loaded data yet. Please wait for `loadeddata` event on the <video> element.");if(B("FromPixels",ze.backendName)!=null)return ze.runKernel("FromPixels",{pixels:n},{numChannels:t});var u,l,d=i?[n.videoWidth,n.videoHeight]:[n.width,n.height],A=d[0],O=d[1];if(s?u=n.getContext("2d").getImageData(0,0,A,O).data:r||e?u=n.data:(o||i)&&(Ko==null&&(Ko=document.createElement("canvas").getContext("2d")),Ko.canvas.width=A,Ko.canvas.height=O,Ko.drawImage(n,0,0,A,O),u=Ko.getImageData(0,0,A,O).data),t===4)l=new Int32Array(u);else{var D=A*O;l=new Int32Array(D*t);for(var H=0;H<D;H++)for(var te=0;te<t;++te)l[H*t+te]=u[4*H+te]}return hs(l,[O,A,t],"int32")}}),mu=Object.freeze({toPixels:function(n,t){return E(this,void 0,void 0,function(){var e,r,i,o,s,u,l,d,A,O,D,H,te,se,ae,ue,ye,we,ve,Ee,Te,Fe,Le;return C(this,function(Me){switch(Me.label){case 0:if(e=ke(n,"img","toPixels"),n instanceof Xt||(e=e.toInt()),e.rank!==2&&e.rank!==3)throw new Error("toPixels only supports rank 2 or 3 tensors, got rank "+e.rank+".");if(r=e.shape.slice(0,2),i=r[0],o=r[1],(s=e.rank===2?1:e.shape[2])>4||s===2)throw new Error("toPixels only supports depth of size 1, 3 or 4 but got "+s);return[4,e.data()];case 1:return u=Me.sent(),l=e.min(),d=e.max(),[4,Promise.all([l.data(),d.data()])];case 2:if(A=Me.sent(),O=A[0],D=A[1],H=O[0],te=D[0],l.dispose(),d.dispose(),e.dtype==="float32"){if(H<0||te>1)throw new Error("Tensor values for a float32 Tensor must be in the range [0 - 1] but got range ["+H+" - "+te+"].")}else{if(e.dtype!=="int32")throw new Error("Unsupported type for toPixels: "+e.dtype+". Please use float32 or int32 tensors.");if(H<0||te>255)throw new Error("Tensor values for a int32 Tensor must be in the range [0 - 255] but got range ["+H+" - "+te+"].")}for(se=e.dtype==="float32"?255:1,ae=new Uint8ClampedArray(o*i*4),ue=0;ue<i*o;++ue)ye=void 0,we=void 0,ve=void 0,Ee=void 0,s===1?(ye=u[ue]*se,we=u[ue]*se,ve=u[ue]*se,Ee=255):s===3?(ye=u[3*ue]*se,we=u[3*ue+1]*se,ve=u[3*ue+2]*se,Ee=255):s===4&&(ye=u[4*ue]*se,we=u[4*ue+1]*se,ve=u[4*ue+2]*se,Ee=u[4*ue+3]*se),ae[(Te=4*ue)+0]=Math.round(ye),ae[Te+1]=Math.round(we),ae[Te+2]=Math.round(ve),ae[Te+3]=Math.round(Ee);return t!=null&&(t.width=o,t.height=i,Fe=t.getContext("2d"),Le=new ImageData(ae,o,i),Fe.putImageData(Le,0,0)),e!==n&&e.dispose(),[2,ae]}})})},fromPixels:Mg}),Cf=function(){function n(){}return n.prototype.getClassName=function(){return this.constructor.className},n.fromConfig=function(t,e){return new t(e)},n}(),Sf=function(){function n(){this.classNameMap={}}return n.getMap=function(){return n.instance==null&&(n.instance=new n),n.instance},n.register=function(t){n.getMap().classNameMap[t.className]=[t,t.fromConfig]},n}();function lo(n){ee(n.className!=null,function(){return"Class being registered does not have the static className property defined."}),ee(typeof n.className=="string",function(){return"className is required to be a string, but got type "+typeof n.className}),ee(n.className.length>0,function(){return"Class being registered has an empty-string as its className, which is disallowed."}),Sf.register(n)}var fb=Object.freeze({Serializable:Cf,SerializationMap:Sf,registerClass:lo}),Ng=.001,If=.1;function gu(){return ze.backend.floatPrecision()===32?Ng:If}function yu(n,t,e){var r=!0;if((T(n)||T(t))&&(r=!1),T(n)&&T(t)&&(r=!0),r){var i=n.constructor.name,o=t.constructor.name;if(i!==o)throw new Error("Arrays are of different type. Actual: "+i+". Expected: "+o)}if(Array.isArray(n)&&Array.isArray(t)){var s=Fn(n),u=Fn(t);if(!le(s,u))throw new Error("Arrays have different shapes. Actual: ["+s+"]. Expected: ["+u+"]")}var l=T(n)?n:xe(n),d=T(t)?t:xe(t);if(l.length!==d.length)throw new Error("Arrays have different lengths actual: "+l.length+" vs expected: "+d.length+`.
Actual: `+l+`.
Expected: `+d+".");for(var A=0;A<d.length;++A){var O=l[A],D=d[A];if(!e(O,D))throw new Error("Arrays differ: actual["+A+"] = "+O+", expected["+A+"] = "+D+`.
Actual: `+l+`.
Expected: `+d+".")}}function bu(n,t,e){return!isFinite(n)&&!isFinite(t)||!(isNaN(n)||isNaN(t)||Math.abs(n-t)>e)}var db=Object.freeze({TEST_EPSILON_FLOAT16:If,expectArraysClose:function(n,t,e){return e==null&&(e=gu()),yu(n,t,function(r,i){return bu(r,i,e)})},testEpsilon:gu,expectPromiseToFail:function(n,t){n().then(function(){return t.fail()},function(){return t()})},expectArraysEqual:function(n,t){var e=typeof t=="string"||typeof t=="number"||typeof t=="boolean"?[t]:t;return he(n)||he(n[0])||he(t)||he(t[0])?yu(n,e,function(r,i){return r==i}):yu(n,t,function(r,i){return bu(r,i,0)})},expectNumbersClose:function(n,t,e){if(e==null&&(e=gu()),!bu(n,t,e))throw new Error("Numbers differ: actual === "+n+", expected === "+t)},expectValuesInRange:function(n,t,e){for(var r=0;r<n.length;r++)if(n[r]<t||n[r]>e)throw new Error("Value out of range:"+n[r]+" low: "+t+", high: "+e)},expectArrayBuffersEqual:function(n,t){expect(new Float32Array(n)).toEqual(new Float32Array(t))}}),pb="1.7.0",hb=Object.freeze({gpgpu_util:oh,webgl_util:wi,forceHalfFloat:function(){M().set("WEBGL_FORCE_F16_TEXTURES",!0)},MathBackendWebGL:xc,setWebGLContext:yt,GPGPUContext:oc}),Ro=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return I(t,n),t.prototype.minimize=function(e,r,i){r===void 0&&(r=!1);var o=this.computeGradients(e,i),s=o.value,u=o.grads;if(i!=null){var l=i.map(function(d){return{name:d.name,tensor:u[d.name]}});this.applyGradients(l)}else this.applyGradients(u);return Yt(u),r?s:(s.dispose(),null)},Object.defineProperty(t.prototype,"iterations",{get:function(){return this.iterations_==null&&(this.iterations_=0),this.iterations_},enumerable:!0,configurable:!0}),t.prototype.incrementIterations=function(){this.iterations_=this.iterations+1},t.prototype.computeGradients=function(e,r){return lp(e,r)},t.prototype.dispose=function(){this.iterations_!=null&&Yt(this.iterations_)},t.prototype.saveIterations=function(){return E(this,void 0,void 0,function(){return C(this,function(e){return this.iterations_==null&&(this.iterations_=0),[2,{name:"iter",tensor:Tt(this.iterations_,"int32")}]})})},t.prototype.getWeights=function(){return E(this,void 0,void 0,function(){return C(this,function(e){throw new Error("getWeights() is not implemented for this optimizer yet.")})})},t.prototype.setWeights=function(e){return E(this,void 0,void 0,function(){return C(this,function(r){throw new Error("setWeights() is not implemented for this optimizer class "+this.getClassName())})})},t.prototype.extractIterations=function(e){return E(this,void 0,void 0,function(){var r;return C(this,function(i){switch(i.label){case 0:return r=this,[4,e[0].tensor.data()];case 1:return r.iterations_=i.sent()[0],[2,e.slice(1)]}})})},t}(Cf);Object.defineProperty(Ro,Symbol.hasInstance,{value:function(n){return n.minimize!=null&&n.computeGradients!=null&&n.applyGradients!=null}});var Tf=function(n){function t(e,r,i){i===void 0&&(i=null);var o=n.call(this)||this;return o.learningRate=e,o.rho=r,o.epsilon=i,o.accumulatedGrads=[],o.accumulatedUpdates=[],i==null&&(o.epsilon=ze.backend.epsilon()),o}return I(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,o){var s=ze.registeredVariables[i];r.accumulatedGrads[o]==null&&(r.accumulatedGrads[o]={originalName:i+"/accum_grad",variable:gt(function(){return Cr(s).variable(!1)})}),r.accumulatedUpdates[o]==null&&(r.accumulatedUpdates[o]={originalName:i+"/accum_var",variable:gt(function(){return Cr(s).variable(!1)})});var u=Array.isArray(e)?e[o].tensor:e[i];if(u!=null){var l=r.accumulatedGrads[o].variable,d=r.accumulatedUpdates[o].variable;gt(function(){var A=l.mul(r.rho).add(u.square().mul(1-r.rho)),O=d.add(r.epsilon).sqrt().div(l.add(r.epsilon).sqrt()).mul(u),D=d.mul(r.rho).add(O.square().mul(1-r.rho));l.assign(A),d.assign(D);var H=O.mul(-r.learningRate).add(s);s.assign(H)})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedUpdates!=null&&(Yt(this.accumulatedGrads.map(function(e){return e.variable})),Yt(this.accumulatedUpdates.map(function(e){return e.variable})))},t.prototype.getWeights=function(){return E(this,void 0,void 0,function(){var e;return C(this,function(r){switch(r.label){case 0:return e=this.accumulatedGrads.concat(this.accumulatedUpdates),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return E(this,void 0,void 0,function(){var r;return C(this,function(i){switch(i.label){case 0:return[4,this.extractIterations(e)];case 1:return e=i.sent(),r=e.length/2,this.accumulatedGrads=e.slice(0,r).map(function(o){return{originalName:o.name,variable:o.tensor.variable(!1)}}),this.accumulatedUpdates=e.slice(r,2*r).map(function(o){return{originalName:o.name,variable:o.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}},t.fromConfig=function(e,r){return new e(r.learningRate,r.rho,r.epsilon)},t.className="Adadelta",t}(Ro);lo(Tf);var Rf=function(n){function t(e,r){r===void 0&&(r=.1);var i=n.call(this)||this;return i.learningRate=e,i.initialAccumulatorValue=r,i.accumulatedGrads=[],i}return I(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,o){var s=ze.registeredVariables[i];r.accumulatedGrads[o]==null&&(r.accumulatedGrads[o]={originalName:i+"/accumulator",variable:gt(function(){return ji(s.shape,r.initialAccumulatorValue).variable(!1)})});var u=Array.isArray(e)?e[o].tensor:e[i];if(u!=null){var l=r.accumulatedGrads[o].variable;gt(function(){var d=l.add(u.square());l.assign(d);var A=u.div(d.add(ze.backend.epsilon()).sqrt()).mul(-r.learningRate).add(s);s.assign(A)})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedGrads!=null&&Yt(this.accumulatedGrads.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return E(this,void 0,void 0,function(){return C(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulatedGrads.map(function(r){return{name:r.originalName,tensor:r.variable}}))]}})})},t.prototype.setWeights=function(e){return E(this,void 0,void 0,function(){return C(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:return e=r.sent(),this.accumulatedGrads=e.map(function(i){return{originalName:i.name,variable:i.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}},t.fromConfig=function(e,r){return new e(r.learningRate,r.initialAccumulatorValue)},t.className="Adagrad",t}(Ro);lo(Rf);var Of=function(n){function t(e,r,i,o){o===void 0&&(o=null);var s=n.call(this)||this;return s.learningRate=e,s.beta1=r,s.beta2=i,s.epsilon=o,s.accumulatedFirstMoment=[],s.accumulatedSecondMoment=[],gt(function(){s.accBeta1=Tt(r).variable(),s.accBeta2=Tt(i).variable()}),o==null&&(s.epsilon=ze.backend.epsilon()),s}return I(t,n),t.prototype.applyGradients=function(e){var r=this,i=Array.isArray(e)?e.map(function(o){return o.name}):Object.keys(e);gt(function(){var o=Dn(1,r.accBeta1),s=Dn(1,r.accBeta2);i.forEach(function(u,l){var d=ze.registeredVariables[u];r.accumulatedFirstMoment[l]==null&&(r.accumulatedFirstMoment[l]={originalName:u+"/m",variable:gt(function(){return Cr(d).variable(!1)})}),r.accumulatedSecondMoment[l]==null&&(r.accumulatedSecondMoment[l]={originalName:u+"/v",variable:gt(function(){return Cr(d).variable(!1)})});var A=Array.isArray(e)?e[l].tensor:e[u];if(A!=null){var O=r.accumulatedFirstMoment[l].variable,D=r.accumulatedSecondMoment[l].variable,H=O.mul(r.beta1).add(A.mul(1-r.beta1)),te=D.mul(r.beta2).add(A.square().mul(1-r.beta2)),se=H.div(o),ae=te.div(s);O.assign(H),D.assign(te);var ue=se.div(ae.sqrt().add(r.epsilon)).mul(-r.learningRate).add(d);d.assign(ue)}}),r.accBeta1.assign(r.accBeta1.mul(r.beta1)),r.accBeta2.assign(r.accBeta2.mul(r.beta2))}),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.accBeta2.dispose(),this.accumulatedFirstMoment!=null&&Yt(this.accumulatedFirstMoment.map(function(e){return e.variable})),this.accumulatedSecondMoment!=null&&Yt(this.accumulatedSecondMoment.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return E(this,void 0,void 0,function(){var e;return C(this,function(r){switch(r.label){case 0:return e=this.accumulatedFirstMoment.concat(this.accumulatedSecondMoment),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return E(this,void 0,void 0,function(){var r,i=this;return C(this,function(o){switch(o.label){case 0:return[4,this.extractIterations(e)];case 1:return e=o.sent(),gt(function(){i.accBeta1.assign(Ha(i.beta1,i.iterations_+1)),i.accBeta2.assign(Ha(i.beta2,i.iterations_+1))}),r=e.length/2,this.accumulatedFirstMoment=e.slice(0,r).map(function(s){return{originalName:s.name,variable:s.tensor.variable(!1)}}),this.accumulatedSecondMoment=e.slice(r,2*r).map(function(s){return{originalName:s.name,variable:s.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}},t.fromConfig=function(e,r){return new e(r.learningRate,r.beta1,r.beta2,r.epsilon)},t.className="Adam",t}(Ro);lo(Of);var kf=function(n){function t(e,r,i,o,s){o===void 0&&(o=null),s===void 0&&(s=0);var u=n.call(this)||this;return u.learningRate=e,u.beta1=r,u.beta2=i,u.epsilon=o,u.decay=s,u.accumulatedFirstMoment=[],u.accumulatedWeightedInfNorm=[],gt(function(){u.iteration=Tt(0).variable(),u.accBeta1=Tt(r).variable()}),o==null&&(u.epsilon=ze.backend.epsilon()),u}return I(t,n),t.prototype.applyGradients=function(e){var r=this,i=Array.isArray(e)?e.map(function(o){return o.name}):Object.keys(e);gt(function(){var o=Dn(1,r.accBeta1),s=Si(-r.learningRate,r.iteration.mul(r.decay).add(1));i.forEach(function(u,l){var d=ze.registeredVariables[u];r.accumulatedFirstMoment[l]==null&&(r.accumulatedFirstMoment[l]={originalName:u+"/m",variable:Cr(d).variable(!1)}),r.accumulatedWeightedInfNorm[l]==null&&(r.accumulatedWeightedInfNorm[l]={originalName:u+"/v",variable:Cr(d).variable(!1)});var A=Array.isArray(e)?e[l].tensor:e[u];if(A!=null){var O=r.accumulatedFirstMoment[l].variable,D=r.accumulatedWeightedInfNorm[l].variable,H=O.mul(r.beta1).add(A.mul(1-r.beta1)),te=D.mul(r.beta2),se=A.abs(),ae=te.maximum(se);O.assign(H),D.assign(ae);var ue=s.div(o).mul(H.div(ae.add(r.epsilon))).add(d);d.assign(ue)}}),r.iteration.assign(r.iteration.add(1)),r.accBeta1.assign(r.accBeta1.mul(r.beta1))}),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.iteration.dispose(),this.accumulatedFirstMoment!=null&&Yt(this.accumulatedFirstMoment.map(function(e){return e.variable})),this.accumulatedWeightedInfNorm!=null&&Yt(this.accumulatedWeightedInfNorm.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return E(this,void 0,void 0,function(){return C(this,function(e){throw new Error("getWeights() is not implemented for Adamax yet.")})})},t.prototype.setWeights=function(e){return E(this,void 0,void 0,function(){return C(this,function(r){throw new Error("setWeights() is not implemented for Adamax yet.")})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}},t.fromConfig=function(e,r){return new e(r.learningRate,r.beta1,r.beta2,r.epsilon,r.decay)},t.className="Adamax",t}(Ro);lo(kf);var wu=function(n){function t(e){var r=n.call(this)||this;return r.learningRate=e,r.setLearningRate(e),r}return I(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,o){var s=Array.isArray(e)?e[o].tensor:e[i];if(s!=null){var u=ze.registeredVariables[i];gt(function(){var l=r.c.mul(s).add(u);u.assign(l)})}}),this.incrementIterations()},t.prototype.setLearningRate=function(e){this.learningRate=e,this.c!=null&&this.c.dispose(),this.c=Vr(Tt(-e))},t.prototype.dispose=function(){this.c.dispose()},t.prototype.getWeights=function(){return E(this,void 0,void 0,function(){return C(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()]]}})})},t.prototype.setWeights=function(e){return E(this,void 0,void 0,function(){return C(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:if((e=r.sent()).length!==0)throw new Error("SGD optimizer does not have settable weights.");return[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate}},t.fromConfig=function(e,r){return new e(r.learningRate)},t.className="SGD",t}(Ro);lo(wu);var jf=function(n){function t(e,r,i){i===void 0&&(i=!1);var o=n.call(this,e)||this;return o.learningRate=e,o.momentum=r,o.useNesterov=i,o.accumulations=[],o.m=Tt(o.momentum),o}return I(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,o){var s=ze.registeredVariables[i];r.accumulations[o]==null&&(r.accumulations[o]={originalName:i+"/momentum",variable:gt(function(){return Cr(s).variable(!1)})});var u=r.accumulations[o].variable,l=Array.isArray(e)?e[o].tensor:e[i];l!=null&&gt(function(){var d,A=r.m.mul(u).add(l);d=r.useNesterov?r.c.mul(l.add(A.mul(r.m))).add(s):r.c.mul(A).add(s),u.assign(A),s.assign(d)})}),this.incrementIterations()},t.prototype.dispose=function(){this.m.dispose(),this.accumulations!=null&&Yt(this.accumulations.map(function(e){return e.variable}))},t.prototype.setMomentum=function(e){this.momentum=e},t.prototype.getWeights=function(){return E(this,void 0,void 0,function(){return C(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulations.map(function(r){return{name:r.originalName,tensor:r.variable}}))]}})})},t.prototype.setWeights=function(e){return E(this,void 0,void 0,function(){return C(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:return e=r.sent(),this.accumulations=e.map(function(i){return{originalName:i.name,variable:i.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}},t.fromConfig=function(e,r){return new e(r.learningRate,r.momentum,r.useNesterov)},t.className="Momentum",t}(wu);lo(jf);var Df=function(n){function t(e,r,i,o,s){r===void 0&&(r=.9),i===void 0&&(i=0),o===void 0&&(o=null),s===void 0&&(s=!1);var u=n.call(this)||this;if(u.learningRate=e,u.decay=r,u.momentum=i,u.epsilon=o,u.accumulatedMeanSquares=[],u.accumulatedMoments=[],u.accumulatedMeanGrads=[],u.centered=s,o==null&&(u.epsilon=ze.backend.epsilon()),e==null)throw new Error("learningRate for RMSPropOptimizer must be defined.");return u}return I(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,o){var s=ze.registeredVariables[i];r.accumulatedMeanSquares[o]==null&&(r.accumulatedMeanSquares[o]={originalName:i+"/rms",variable:gt(function(){return Cr(s).variable(!1)})}),r.accumulatedMoments[o]==null&&(r.accumulatedMoments[o]={originalName:i+"/momentum",variable:gt(function(){return Cr(s).variable(!1)})}),r.accumulatedMeanGrads[o]==null&&r.centered&&(r.accumulatedMeanGrads[o]={originalName:i+"/mg",variable:gt(function(){return Cr(s).variable(!1)})});var u=Array.isArray(e)?e[o].tensor:e[i];if(u!=null){var l=r.accumulatedMeanSquares[o].variable,d=r.accumulatedMoments[o].variable;gt(function(){var A=l.mul(r.decay).add(u.square().mul(1-r.decay));if(r.centered){var O=r.accumulatedMeanGrads[o].variable,D=O.mul(r.decay).add(u.mul(1-r.decay)),H=d.mul(r.momentum).add(u.mul(r.learningRate).div(A.sub(D.square().add(r.epsilon)).sqrt()));l.assign(A),O.assign(D),d.assign(H);var te=s.sub(H);s.assign(te)}else{var se=l.mul(r.decay).add(u.square().mul(1-r.decay));H=d.mul(r.momentum).add(u.mul(r.learningRate).div(se.add(r.epsilon).sqrt())),l.assign(se),d.assign(H),te=s.sub(H),s.assign(te)}})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedMeanSquares!=null&&Yt(this.accumulatedMeanSquares.map(function(e){return e.variable})),this.accumulatedMeanGrads!=null&&this.centered&&Yt(this.accumulatedMeanGrads.map(function(e){return e.variable})),this.accumulatedMoments!=null&&Yt(this.accumulatedMoments.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return E(this,void 0,void 0,function(){var e;return C(this,function(r){switch(r.label){case 0:return e=this.accumulatedMeanSquares.concat(this.accumulatedMoments),this.centered&&e.push.apply(e,this.accumulatedMeanGrads),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return E(this,void 0,void 0,function(){var r;return C(this,function(i){switch(i.label){case 0:return[4,this.extractIterations(e)];case 1:return e=i.sent(),r=this.centered?e.length/3:e.length/2,this.accumulatedMeanSquares=e.slice(0,r).map(function(o){return{originalName:o.name,variable:o.tensor.variable(!1)}}),this.accumulatedMoments=e.slice(r,2*r).map(function(o){return{originalName:o.name,variable:o.tensor.variable(!1)}}),this.centered&&(this.accumulatedMeanGrads=e.slice(2*r,3*r).map(function(o){return{originalName:o.name,variable:o.tensor.variable(!1)}})),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}},t.fromConfig=function(e,r){return new e(r.learningRate,r.decay,r.momentum,r.epsilon,r.centered)},t.className="RMSProp",t}(Ro);lo(Df);var Oo=function(){function n(){}return n.sgd=function(t){return new wu(t)},n.momentum=function(t,e,r){return r===void 0&&(r=!1),new jf(t,e,r)},n.rmsprop=function(t,e,r,i,o){return e===void 0&&(e=.9),r===void 0&&(r=0),i===void 0&&(i=null),o===void 0&&(o=!1),new Df(t,e,r,i,o)},n.adam=function(t,e,r,i){return t===void 0&&(t=.001),e===void 0&&(e=.9),r===void 0&&(r=.999),i===void 0&&(i=null),new Of(t,e,r,i)},n.adadelta=function(t,e,r){return t===void 0&&(t=.001),e===void 0&&(e=.95),r===void 0&&(r=null),new Tf(t,e,r)},n.adamax=function(t,e,r,i,o){return t===void 0&&(t=.002),e===void 0&&(e=.9),r===void 0&&(r=.999),i===void 0&&(i=null),o===void 0&&(o=0),new kf(t,e,r,i,o)},n.adagrad=function(t,e){return e===void 0&&(e=.1),new Rf(t,e)},n}(),vb={sgd:Oo.sgd,momentum:Oo.momentum,adadelta:Oo.adadelta,adagrad:Oo.adagrad,rmsprop:Oo.rmsprop,adamax:Oo.adamax,adam:Oo.adam},_g=typeof requestAnimationFrame!="undefined"?requestAnimationFrame:typeof setImmediate!="undefined"?setImmediate:function(n){return n()};function mb(){return new Promise(function(n){return _g(function(){return n()})})}Xt.prototype.squaredDifference=function(n){return Ec(this,n)},Ke=hg;function ko(n,t,e){if(e===void 0&&(e=!1),n.beginPath(),t.slice(1).forEach(function(o,s){var u=o.x,l=o.y,d=t[s];n.moveTo(d.x,d.y),n.lineTo(u,l)}),e){var r=t[t.length-1],i=t[0];if(!r||!i)return;n.moveTo(r.x,r.y),n.lineTo(i.x,i.y)}n.stroke()}var Au=function(n,t){return Au=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])},Au(n,t)};function tr(n,t){Au(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Gn=function(){return Gn=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Gn.apply(this,arguments)};function gb(n,t){var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(e[r[i]]=n[r[i]]);return e}function yb(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var u=n.length-1;u>=0;u--)(s=n[u])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o}function bb(n,t){return function(e,r){t(e,r,n)}}function wb(n,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,t)}function Ut(n,t,e,r){function i(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function u(A){try{d(r.next(A))}catch(O){s(O)}}function l(A){try{d(r.throw(A))}catch(O){s(O)}}function d(A){A.done?o(A.value):i(A.value).then(u,l)}d((r=r.apply(n,t||[])).next())})}function Wt(n,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(d){return function(A){return l([d,A])}}function l(d){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return e.label++,{value:d[1],done:!1};case 5:e.label++,i=d[1],d=[0];continue;case 7:d=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){e=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){e.label=d[1];break}if(d[0]===6&&e.label<o[1]){e.label=o[1],o=d;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(d);break}o[2]&&e.ops.pop(),e.trys.pop();continue}d=t.call(n,e)}catch(A){d=[6,A],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Ab(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}function xb(n,t){for(var e in n)e!=="default"&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Pf(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Fg(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o}function Eb(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(Fg(arguments[t]));return n}function va(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r}function Ya(n){return this instanceof Ya?(this.v=n,this):new Ya(n)}function Cb(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(n,t||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(D){r[D]&&(i[D]=function(H){return new Promise(function(te,se){o.push([D,H,te,se])>1||u(D,H)})})}function u(D,H){try{l(r[D](H))}catch(te){O(o[0][3],te)}}function l(D){D.value instanceof Ya?Promise.resolve(D.value.v).then(d,A):O(o[0][2],D)}function d(D){u("next",D)}function A(D){u("throw",D)}function O(D,H){D(H),o.shift(),o.length&&u(o[0][0],o[0][1])}}function Sb(n){var t,e;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,o){t[i]=n[i]?function(s){return(e=!e)?{value:Ya(n[i](s)),done:i==="return"}:o?o(s):s}:o}}function Ib(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof Pf=="function"?Pf(n):n[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(o){e[o]=n[o]&&function(s){return new Promise(function(u,l){s=n[o](s),i(u,l,s.done,s.value)})}}function i(o,s,u,l){Promise.resolve(l).then(function(d){o({value:d,done:u})},s)}}function Tb(n,t){return Object.defineProperty?Object.defineProperty(n,"raw",{value:t}):n.raw=t,n}function Rb(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)Object.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t}function Ob(n){return n&&n.__esModule?n:{default:n}}function kb(n,t){if(!t.has(n))throw new TypeError("attempted to get private field on non-instance");return t.get(n)}function jb(n,t,e){if(!t.has(n))throw new TypeError("attempted to set private field on non-instance");return t.set(n,e),e}var jo=function(){function n(t,e){if(!Do(t)||!Do(e))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:t,height:e}));this._width=t,this._height=e}return Object.defineProperty(n.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),n.prototype.reverse=function(){return new n(1/this.width,1/this.height)},n}();function ma(n,t){return n instanceof Xt&&n.shape.length===t}function Db(n){return ma(n,1)}function Lg(n){return ma(n,2)}function $a(n){return ma(n,3)}function co(n){return ma(n,4)}function Ug(n){return n%1!==0}function Bf(n){return n%2===0}function xu(n,t){t===void 0&&(t=2);var e=Math.pow(10,t);return Math.floor(n*e)/e}function Mf(n){return n&&n.width&&n.height}function Wg(n,t){var e=n.width,r=n.height,i=t/Math.max(r,e);return new jo(Math.round(e*i),Math.round(r*i))}function Eu(n){return n.reduce(function(t,e){return t.add(e)},new Rr(0,0)).div(new Rr(n.length,n.length))}function ga(n,t,e){return Array(n).fill(0).map(function(r,i){return t+i*e})}function Do(n){return!!n&&n!==1/0&&n!==-1/0&&!isNaN(n)||n===0}function Nf(n){return Do(n)&&0<=n&&n<=1}var Rr=function(){function n(t,e){this._x=t,this._y=e}return Object.defineProperty(n.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),n.prototype.add=function(t){return new n(this.x+t.x,this.y+t.y)},n.prototype.sub=function(t){return new n(this.x-t.x,this.y-t.y)},n.prototype.mul=function(t){return new n(this.x*t.x,this.y*t.y)},n.prototype.div=function(t){return new n(this.x/t.x,this.y/t.y)},n.prototype.abs=function(){return new n(Math.abs(this.x),Math.abs(this.y))},n.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},n.prototype.floor=function(){return new n(Math.floor(this.x),Math.floor(this.y))},n}(),Pi=function(){function n(t,e){e===void 0&&(e=!0);var r=t||{},i=[r.left,r.top,r.right,r.bottom].every(Do),o=[r.x,r.y,r.width,r.height].every(Do);if(!o&&!i)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var s=o?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],u=s[0],l=s[1],d=s[2],A=s[3];n.assertIsValidBox({x:u,y:l,width:d,height:A},"Box.constructor",e),this._x=u,this._y=l,this._width=d,this._height=A}return n.isRect=function(t){return!!t&&[t.x,t.y,t.width,t.height].every(Do)},n.assertIsValidBox=function(t,e,r){if(r===void 0&&(r=!1),!n.isRect(t))throw new Error(e+" - invalid box: "+JSON.stringify(t)+", expected object with properties x, y, width, height");if(!r&&(t.width<0||t.height<0))throw new Error(e+" - width ("+t.width+") and height ("+t.height+") must be positive numbers")},Object.defineProperty(n.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"topLeft",{get:function(){return new Rr(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"topRight",{get:function(){return new Rr(this.right,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottomLeft",{get:function(){return new Rr(this.left,this.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottomRight",{get:function(){return new Rr(this.right,this.bottom)},enumerable:!0,configurable:!0}),n.prototype.round=function(){var t=[this.x,this.y,this.width,this.height].map(function(s){return Math.round(s)}),e=t[0],r=t[1],i=t[2],o=t[3];return new n({x:e,y:r,width:i,height:o})},n.prototype.floor=function(){var t=[this.x,this.y,this.width,this.height].map(function(s){return Math.floor(s)}),e=t[0],r=t[1],i=t[2],o=t[3];return new n({x:e,y:r,width:i,height:o})},n.prototype.toSquare=function(){var t=this,e=t.x,r=t.y,i=t.width,o=t.height,s=Math.abs(i-o);return i<o&&(e-=s/2,i+=s),o<i&&(r-=s/2,o+=s),new n({x:e,y:r,width:i,height:o})},n.prototype.rescale=function(t){var e=Mf(t)?t.width:t,r=Mf(t)?t.height:t;return new n({x:this.x*e,y:this.y*r,width:this.width*e,height:this.height*r})},n.prototype.pad=function(t,e){var r=[this.x-t/2,this.y-e/2,this.width+t,this.height+e],i=r[0],o=r[1],s=r[2],u=r[3];return new n({x:i,y:o,width:s,height:u})},n.prototype.clipAtImageBorders=function(t,e){var r=this,i=r.x,o=r.y,s=r.right,u=r.bottom,l=Math.max(i,0),d=Math.max(o,0),A=s-l,O=u-d,D=Math.min(A,t-l),H=Math.min(O,e-d);return new n({x:l,y:d,width:D,height:H}).floor()},n.prototype.shift=function(t,e){var r=this,i=r.width,o=r.height,s=this.x+t,u=this.y+e;return new n({x:s,y:u,width:i,height:o})},n.prototype.padAtBorders=function(t,e){var r=this.width+1,i=this.height+1,o=1,s=1,u=r,l=i,d=this.left,A=this.top,O=this.right,D=this.bottom;return O>e&&(u=-O+e+r,O=e),D>t&&(l=-D+t+i,D=t),d<1&&(l=2-d,d=1),A<1&&(l=2-A,A=1),{dy:s,edy:l,dx:o,edx:u,y:A,ey:D,x:d,ex:O,w:r,h:i}},n.prototype.calibrate=function(t){return new n({left:this.left+t.left*this.width,top:this.top+t.top*this.height,right:this.right+t.right*this.width,bottom:this.bottom+t.bottom*this.height}).toSquare().round()},n}(),qa=function(n){tr(t,n);function t(e,r,i,o,s){return s===void 0&&(s=!1),n.call(this,{left:e,top:r,right:i,bottom:o},s)||this}return t}(Pi),_f=function(){function n(t,e,r,i,o){this._imageDims=new jo(o.width,o.height),this._score=t,this._classScore=e,this._className=r,this._box=new Pi(i).rescale(this._imageDims)}return Object.defineProperty(n.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"relativeBox",{get:function(){return new Pi(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),n.prototype.forSize=function(t,e){return new n(this.score,this.classScore,this.className,this.relativeBox,{width:t,height:e})},n}(),ui=function(n){tr(t,n);function t(e,r,i){return n.call(this,e,e,"",r,i)||this}return t.prototype.forSize=function(e,r){var i=n.prototype.forSize.call(this,e,r),o=i.score,s=i.relativeBox,u=i.imageDims;return new t(o,s,u)},t}(_f);function zg(n){var t=n.map(function(u){return u.x}),e=n.map(function(u){return u.y}),r=t.reduce(function(u,l){return l<u?l:u},1/0),i=e.reduce(function(u,l){return l<u?l:u},1/0),o=t.reduce(function(u,l){return u<l?l:u},0),s=e.reduce(function(u,l){return u<l?l:u},0);return new qa(r,i,o,s)}function Hg(n,t,e){e===void 0&&(e=!0);var r=Math.max(0,Math.min(n.right,t.right)-Math.max(n.left,t.left)),i=Math.max(0,Math.min(n.bottom,t.bottom)-Math.max(n.top,t.top)),o=r*i;return e?o/(n.area+t.area-o):o/Math.min(n.area,t.area)}function ya(n,t,e,r){r===void 0&&(r=!0);for(var i=t.map(function(u,l){return{score:u,boxIndex:l}}).sort(function(u,l){return u.score-l.score}).map(function(u){return u.boxIndex}),o=[],s=function(){var u=i.pop();o.push(u);for(var l=i,d=[],A=0;A<l.length;A++){var O=l[A],D=n[u],H=n[O];d.push(Hg(D,H,r))}i=i.filter(function(te,se){return d[se]<=e})};i.length>0;)s();return o}function ba(n,t){return gt(function(){var e=t[0],r=t[1],i=t[2],o=ji(va(n.shape.slice(0,3),[1]),e),s=ji(va(n.shape.slice(0,3),[1]),r),u=ji(va(n.shape.slice(0,3),[1]),i),l=kn([o,s,u],3);return Dn(n,l)})}function Vg(n,t){return t===void 0&&(t=!1),gt(function(){var e=n.shape.slice(1),r=e[0],i=e[1];if(r===i)return n;var o=Math.abs(r-i),s=Math.round(o*(t?.5:1)),u=r>i?2:1,l=function(H){var te=n.shape.slice();return te[u]=H,ji(te,0)},d=l(s),A=o-d.shape[u],O=t&&A?l(A):null,D=[O,n,d].filter(function(H){return!!H}).map(function(H){return H.toFloat()});return kn(D,u)})}function Cu(n){return 1/(1+Math.exp(-n))}function Pb(n){return Math.log(n/(1-n))}var Su=function(n){tr(t,n);function t(e,r,i,o,s){return s===void 0&&(s=!1),n.call(this,{x:e,y:r,width:i,height:o},s)||this}return t}(Pi),Gg=.5,Qg=.43,Xg=.45,Zo=function(){function n(t,e,r){r===void 0&&(r=new Rr(0,0));var i=e.width,o=e.height;this._imgDims=new jo(i,o),this._shift=r,this._positions=t.map(function(s){return s.mul(new Rr(i,o)).add(r)})}return Object.defineProperty(n.prototype,"shift",{get:function(){return new Rr(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"relativePositions",{get:function(){var t=this;return this._positions.map(function(e){return e.sub(t._shift).div(new Rr(t.imageWidth,t.imageHeight))})},enumerable:!0,configurable:!0}),n.prototype.forSize=function(t,e){return new this.constructor(this.relativePositions,{width:t,height:e})},n.prototype.shiftBy=function(t,e){return new this.constructor(this.relativePositions,this._imgDims,new Rr(t,e))},n.prototype.shiftByPoint=function(t){return this.shiftBy(t.x,t.y)},n.prototype.align=function(t,e){if(e===void 0&&(e={}),t){var r=t instanceof ui?t.box.floor():new Pi(t);return this.shiftBy(r.x,r.y).align(null,e)}var i=Object.assign({},{useDlibAlignment:!1,minBoxPadding:.2},e),o=i.useDlibAlignment,s=i.minBoxPadding;return o?this.alignDlib():this.alignMinBbox(s)},n.prototype.alignDlib=function(){var t=this.getRefPointsForAlignment(),e=t[0],r=t[1],i=t[2],o=function(O){return i.sub(O).magnitude()},s=(o(e)+o(r))/2,u=Math.floor(s/Xg),l=Eu(t),d=Math.floor(Math.max(0,l.x-Gg*u)),A=Math.floor(Math.max(0,l.y-Qg*u));return new Su(d,A,Math.min(u,this.imageWidth+d),Math.min(u,this.imageHeight+A))},n.prototype.alignMinBbox=function(t){var e=zg(this.positions);return e.pad(e.width*t,e.height*t)},n.prototype.getRefPointsForAlignment=function(){throw new Error("getRefPointsForAlignment not implemented by base class")},n}(),Kg=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getRefPointsForAlignment=function(){var e=this.positions;return[e[0],e[1],Eu([e[3],e[4]])]},t}(Zo),Ff=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getJawOutline=function(){return this.positions.slice(0,17)},t.prototype.getLeftEyeBrow=function(){return this.positions.slice(17,22)},t.prototype.getRightEyeBrow=function(){return this.positions.slice(22,27)},t.prototype.getNose=function(){return this.positions.slice(27,36)},t.prototype.getLeftEye=function(){return this.positions.slice(36,42)},t.prototype.getRightEye=function(){return this.positions.slice(42,48)},t.prototype.getMouth=function(){return this.positions.slice(48,68)},t.prototype.getRefPointsForAlignment=function(){return[this.getLeftEye(),this.getRightEye(),this.getMouth()].map(Eu)},t}(Zo),Lf=function(){function n(t,e){this._label=t,this._distance=e}return Object.defineProperty(n.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),n.prototype.toString=function(t){return t===void 0&&(t=!0),""+this.label+(t?" ("+xu(this.distance)+")":"")},n}(),Uf=function(n){tr(t,n);function t(e,r){var i=n.call(this,e)||this;return i._label=r,i}return t.assertIsValidLabeledBox=function(e,r){if(Pi.assertIsValidBox(e,r),!Do(e.label))throw new Error(r+" - expected property label ("+e.label+") to be a number")},Object.defineProperty(t.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),t}(Pi),es=function(){function n(t,e){if(typeof t!="string")throw new Error("LabeledFaceDescriptors - constructor expected label to be a string");if(!Array.isArray(e)||e.some(function(r){return!(r instanceof Float32Array)}))throw new Error("LabeledFaceDescriptors - constructor expected descriptors to be an array of Float32Array");this._label=t,this._descriptors=e}return Object.defineProperty(n.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"descriptors",{get:function(){return this._descriptors},enumerable:!0,configurable:!0}),n.prototype.toJSON=function(){return{label:this.label,descriptors:this.descriptors.map(function(t){return Array.from(t)})}},n.fromJSON=function(t){var e=t.descriptors.map(function(r){return new Float32Array(r)});return new n(t.label,e)},n}(),Bb=function(n){tr(t,n);function t(e,r,i,o){var s=n.call(this,e,r)||this;return s._score=i,s._classScore=o,s}return t.assertIsValidPredictedBox=function(e,r){if(Uf.assertIsValidLabeledBox(e,r),!Nf(e.score)||!Nf(e.classScore))throw new Error(r+" - expected properties score ("+e.score+") and ("+e.classScore+") to be a number between [0, 1]")},Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),t}(Uf);function wa(n){return n.detection instanceof ui}function Aa(n,t){var e={detection:t};return Object.assign({},n,e)}function Wf(){var n=window.fetch||function(){throw new Error("fetch - missing fetch implementation for browser environment")},t=function(){throw new Error("readFile - filesystem not available for browser environment")};return{Canvas:HTMLCanvasElement,CanvasRenderingContext2D,Image:HTMLImageElement,ImageData,Video:HTMLVideoElement,createCanvasElement:function(){return document.createElement("canvas")},createImageElement:function(){return document.createElement("img")},fetch:n,readFile:t}}function zf(n){var t="";if(!n)try{n=Se(90872)}catch(r){t=r.toString()}var e=n?function(r){return new Promise(function(i,o){n.readFile(r,function(s,u){return s?o(s):i(u)})})}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+t)};return{readFile:e}}function Hf(){var n=Se.g.Canvas||Se.g.HTMLCanvasElement,t=Se.g.Image||Se.g.HTMLImageElement,e=function(){if(n)return new n;throw new Error("createCanvasElement - missing Canvas implementation for nodejs environment")},r=function(){if(t)return new t;throw new Error("createImageElement - missing Image implementation for nodejs environment")},i=Se.g.fetch||function(){throw new Error("fetch - missing fetch implementation for nodejs environment")},o=zf();return Gn({Canvas:n||function(){function s(){}return s}(),CanvasRenderingContext2D:Se.g.CanvasRenderingContext2D||function(){function s(){}return s}(),Image:t||function(){function s(){}return s}(),ImageData:Se.g.ImageData||function(){function s(){}return s}(),Video:Se.g.HTMLVideoElement||function(){function s(){}return s}(),createCanvasElement:e,createImageElement:r,fetch:i},o)}function Vf(){return typeof window=="object"&&typeof document!="undefined"&&typeof HTMLImageElement!="undefined"&&typeof HTMLCanvasElement!="undefined"&&typeof HTMLVideoElement!="undefined"&&typeof ImageData!="undefined"&&typeof CanvasRenderingContext2D!="undefined"}var Gf=Se(97671);function Qf(){return typeof Se.g=="object"&&!0&&!0&&typeof Gf!="undefined"&&!!Gf.version}var Pn;function Zg(){if(!Pn)throw new Error("getEnv - environment is not defined, check isNodejs() and isBrowser()");return Pn}function Iu(n){Pn=n}function Tu(){Vf()&&Iu(Wf()),Qf()&&Iu(Hf())}function Jg(n){if(Pn||Tu(),!Pn)throw new Error("monkeyPatch - environment is not defined, check isNodejs() and isBrowser()");var t=n.Canvas,e=t===void 0?Pn.Canvas:t,r=n.Image,i=r===void 0?Pn.Image:r;Pn.Canvas=e,Pn.Image=i,Pn.createCanvasElement=n.createCanvasElement||function(){return new e},Pn.createImageElement=n.createImageElement||function(){return new i},Pn.ImageData=n.ImageData||Pn.ImageData,Pn.Video=n.Video||Pn.Video,Pn.fetch=n.fetch||Pn.fetch,Pn.readFile=n.readFile||Pn.readFile}var Qn={getEnv:Zg,setEnv:Iu,initialize:Tu,createBrowserEnv:Wf,createFileSystem:zf,createNodejsEnv:Hf,monkeyPatch:Jg,isBrowser:Vf,isNodejs:Qf};Tu();function Ru(n){return!Qn.isNodejs()&&typeof n=="string"?document.getElementById(n):n}function Bi(n){var t=Qn.getEnv(),e=t.Canvas,r=t.CanvasRenderingContext2D;if(n instanceof r)return n;var i=Ru(n);if(!(i instanceof e))throw new Error("resolveContext2d - expected canvas to be of instance of Canvas");var o=i.getContext("2d");if(!o)throw new Error("resolveContext2d - canvas 2d context is null");return o}var fo;(function(n){n.TOP_LEFT="TOP_LEFT",n.TOP_RIGHT="TOP_RIGHT",n.BOTTOM_LEFT="BOTTOM_LEFT",n.BOTTOM_RIGHT="BOTTOM_RIGHT"})(fo||(fo={}));var Xf=function(){function n(t){t===void 0&&(t={});var e=t.anchorPosition,r=t.backgroundColor,i=t.fontColor,o=t.fontSize,s=t.fontStyle,u=t.padding;this.anchorPosition=e||fo.TOP_LEFT,this.backgroundColor=r||"rgba(0, 0, 0, 0.5)",this.fontColor=i||"rgba(255, 255, 255, 1)",this.fontSize=o||14,this.fontStyle=s||"Georgia",this.padding=u||4}return n}(),Kf=function(){function n(t,e,r){r===void 0&&(r={}),this.text=typeof t=="string"?[t]:t instanceof n?t.text:t,this.anchor=e,this.options=new Xf(r)}return n.prototype.measureWidth=function(t){var e=this.options.padding;return this.text.map(function(r){return t.measureText(r).width}).reduce(function(r,i){return r<i?i:r},0)+2*e},n.prototype.measureHeight=function(){var t=this.options,e=t.fontSize,r=t.padding;return this.text.length*e+2*r},n.prototype.getUpperLeft=function(t,e){var r=this.options.anchorPosition,i=r===fo.BOTTOM_RIGHT||r===fo.TOP_RIGHT,o=r===fo.BOTTOM_LEFT||r===fo.BOTTOM_RIGHT,s=this.measureWidth(t),u=this.measureHeight(),l=i?this.anchor.x-s:this.anchor.x,d=o?this.anchor.y-u:this.anchor.y;if(e){var A=e.width,O=e.height,D=Math.max(Math.min(l,A-s),0),H=Math.max(Math.min(d,O-u),0);return{x:D,y:H}}return{x:l,y:d}},n.prototype.draw=function(t){var e=Ru(t),r=Bi(e),i=this.options,o=i.backgroundColor,s=i.fontColor,u=i.fontSize,l=i.fontStyle,d=i.padding;r.font=u+"px "+l;var A=this.measureWidth(r),O=this.measureHeight();r.fillStyle=o;var D=this.getUpperLeft(r,e);r.fillRect(D.x,D.y,A,O),r.fillStyle=s,this.text.forEach(function(H,te){var se=d+D.x,ae=d+D.y+(te+1)*u;r.fillText(H,se,ae)})},n}(),Yg=function(){function n(t){t===void 0&&(t={});var e=t.boxColor,r=t.lineWidth,i=t.label,o=t.drawLabelOptions;this.boxColor=e||"rgba(0, 0, 255, 1)",this.lineWidth=r||2,this.label=i;var s={anchorPosition:fo.BOTTOM_LEFT,backgroundColor:this.boxColor};this.drawLabelOptions=new Xf(Object.assign({},s,o))}return n}(),$g=function(){function n(t,e){e===void 0&&(e={}),this.box=new Pi(t),this.options=new Yg(e)}return n.prototype.draw=function(t){var e=Bi(t),r=this.options,i=r.boxColor,o=r.lineWidth,s=this.box,u=s.x,l=s.y,d=s.width,A=s.height;e.strokeStyle=i,e.lineWidth=o,e.strokeRect(u,l,d,A);var O=this.options.label;O&&new Kf([O],{x:u-o/2,y:l},this.options.drawLabelOptions).draw(t)},n}();function qg(n,t){var e=Array.isArray(t)?t:[t];e.forEach(function(r){var i=r instanceof ui?r.score:wa(r)?r.detection.score:void 0,o=r instanceof ui?r.box:wa(r)?r.detection.box:new Pi(r),s=i?""+xu(i):void 0;new $g(o,{label:s}).draw(n)})}function Zf(n){var t=Qn.getEnv(),e=t.Image,r=t.Video;return n instanceof e&&n.complete||n instanceof r&&n.readyState>=3}function ey(n){return new Promise(function(t,e){if(n instanceof Qn.getEnv().Canvas||Zf(n))return t();function r(o){o.currentTarget&&(o.currentTarget.removeEventListener("load",r),o.currentTarget.removeEventListener("error",i),t(o))}function i(o){o.currentTarget&&(o.currentTarget.removeEventListener("load",r),o.currentTarget.removeEventListener("error",i),e(o))}n.addEventListener("load",r),n.addEventListener("error",i)})}function Mb(n){return new Promise(function(t,e){if(!(n instanceof Blob))return e("bufferToImage - expected buf to be of type: Blob");var r=new FileReader;r.onload=function(){if(typeof r.result!="string")return e("bufferToImage - expected reader.result to be a string, in onload");var i=env.getEnv().createImageElement();i.onload=function(){return t(i)},i.onerror=e,i.src=r.result},r.onerror=e,r.readAsDataURL(n)})}function Ou(n){var t=Qn.getEnv(),e=t.Image,r=t.Video;return n instanceof e?new jo(n.naturalWidth,n.naturalHeight):n instanceof r?new jo(n.videoWidth,n.videoHeight):new jo(n.width,n.height)}function ts(n){var t=n.width,e=n.height,r=Qn.getEnv().createCanvasElement,i=r();return i.width=t,i.height=e,i}function ku(n,t){var e=Qn.getEnv().ImageData;if(!(n instanceof e)&&!Zf(n))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=t||Ou(n),i=r.width,o=r.height,s=ts({width:i,height:o});return n instanceof e?Bi(s).putImageData(n,0,0):Bi(s).drawImage(n,0,0,i,o),s}function ty(n,t){return Ut(this,void 0,void 0,function(){var e,r,i,o,s,u;return Wt(this,function(l){switch(l.label){case 0:return e=t||Qn.getEnv().createCanvasElement(),r=n.shape.slice(co(n)?1:0),i=r[0],o=r[1],s=r[2],u=gt(function(){return n.as3D(i,o,s).toInt()}),[4,mu.toPixels(u,e)];case 1:return l.sent(),u.dispose(),[2,e]}})})}function Jf(n){var t=Qn.getEnv(),e=t.Image,r=t.Canvas,i=t.Video;return n instanceof e||n instanceof r||n instanceof i}function ry(n,t,e){e===void 0&&(e=!1);var r=Qn.getEnv(),i=r.Image,o=r.Canvas;if(!(n instanceof i||n instanceof o))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var s=Ou(n),u=t/Math.max(s.height,s.width),l=u*s.width,d=u*s.height,A=ts({width:t,height:t}),O=n instanceof o?n:ku(n),D=Math.abs(l-d)/2,H=e&&l<d?D:0,te=e&&d<l?D:0;return Bi(A).drawImage(O,H,te,l,d),A}var rs=function(){function n(t,e){var r=this;if(e===void 0&&(e=!1),this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(t))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+t);this._treatAsBatchInput=e,this._batchSize=t.length,t.forEach(function(i,o){if($a(i)){r._imageTensors[o]=i,r._inputDimensions[o]=i.shape;return}if(co(i)){var s=i.shape[0];if(s!==1)throw new Error("NetInput - tf.Tensor4D with batchSize "+s+" passed, but not supported in input array");r._imageTensors[o]=i,r._inputDimensions[o]=i.shape.slice(1);return}var u=i instanceof Qn.getEnv().Canvas?i:ku(i);r._canvases[o]=u,r._inputDimensions[o]=[u.height,u.width,3]})}return Object.defineProperty(n.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"reshapedInputDimensions",{get:function(){var t=this;return ga(this.batchSize,0,1).map(function(e,r){return t.getReshapedInputDimensions(r)})},enumerable:!0,configurable:!0}),n.prototype.getInput=function(t){return this.canvases[t]||this.imageTensors[t]},n.prototype.getInputDimensions=function(t){return this._inputDimensions[t]},n.prototype.getInputHeight=function(t){return this._inputDimensions[t][0]},n.prototype.getInputWidth=function(t){return this._inputDimensions[t][1]},n.prototype.getReshapedInputDimensions=function(t){if(typeof this.inputSize!="number")throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");var e=this.getInputWidth(t),r=this.getInputHeight(t);return Wg({width:e,height:r},this.inputSize)},n.prototype.toBatchTensor=function(t,e){var r=this;return e===void 0&&(e=!0),this._inputSize=t,gt(function(){var i=ga(r.batchSize,0,1).map(function(s){var u=r.getInput(s);if(u instanceof Xt){var l=co(u)?u:u.expandDims();return l=Vg(l,e),(l.shape[1]!==t||l.shape[2]!==t)&&(l=Ys.resizeBilinear(l,[t,t])),l.as3D(t,t,3)}if(u instanceof Qn.getEnv().Canvas)return mu.fromPixels(ry(u,t,e));throw new Error("toBatchTensor - at batchIdx "+s+", expected input to be instanceof tf.Tensor or instanceof HTMLCanvasElement, instead have "+u)}),o=ai(i.map(function(s){return s.toFloat()})).as4D(r.batchSize,t,t,3);return o})},n}();function Mn(n){return Ut(this,void 0,void 0,function(){var t,e,r;return Wt(this,function(i){switch(i.label){case 0:if(n instanceof rs)return[2,n];if(t=Array.isArray(n)?n:[n],!t.length)throw new Error("toNetInput - empty array passed as input");return e=function(o){return Array.isArray(n)?" at input index "+o+":":""},r=t.map(Ru),r.forEach(function(o,s){if(!Jf(o)&&!$a(o)&&!co(o))throw typeof t[s]=="string"?new Error("toNetInput -"+e(s)+" string passed, but could not resolve HTMLElement for element id "+t[s]):new Error("toNetInput -"+e(s)+" expected media to be of type HTMLImageElement | HTMLVideoElement | HTMLCanvasElement | tf.Tensor3D, or to be an element id");if(co(o)){var u=o.shape[0];if(u!==1)throw new Error("toNetInput -"+e(s)+" tf.Tensor4D with batchSize "+u+" passed, but not supported in input array")}}),[4,Promise.all(r.map(function(o){return Jf(o)&&ey(o)}))];case 1:return i.sent(),[2,new rs(r,Array.isArray(n))]}})})}function ju(n,t){return Ut(this,void 0,void 0,function(){var e,r,i,o,s,u,l;return Wt(this,function(d){switch(d.label){case 0:return e=Qn.getEnv().Canvas,r=n,n instanceof e?[3,5]:[4,Mn(n)];case 1:if(i=d.sent(),i.batchSize>1)throw new Error("extractFaces - batchSize > 1 not supported");return o=i.getInput(0),o instanceof e?(s=o,[3,4]):[3,2];case 2:return[4,ty(o)];case 3:s=d.sent(),d.label=4;case 4:r=s,d.label=5;case 5:return u=Bi(r),l=t.map(function(A){return A instanceof ui?A.forSize(r.width,r.height).box.floor():A}).map(function(A){return A.clipAtImageBorders(r.width,r.height)}),[2,l.map(function(A){var O=A.x,D=A.y,H=A.width,te=A.height,se=ts({width:H,height:te});return Bi(se).putImageData(u.getImageData(O,D,H,te),0,0),se})]}})})}function Du(n,t){return Ut(this,void 0,void 0,function(){return Wt(this,function(e){if(!$a(n)&&!co(n))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if(co(n)&&n.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,gt(function(){var r=n.shape.slice(co(n)?1:0),i=r[0],o=r[1],s=r[2],u=t.map(function(d){return d instanceof ui?d.forSize(o,i).box:d}).map(function(d){return d.clipAtImageBorders(o,i)}),l=u.map(function(d){var A=d.x,O=d.y,D=d.width,H=d.height;return Qc(n.as3D(i,o,s),[O,A,0],[H,D,s])});return l})]})})}function ny(n,t){return Ut(this,void 0,void 0,function(){var e,r;return Wt(this,function(i){switch(i.label){case 0:return e=Qn.getEnv().fetch,[4,e(n,t)];case 1:if(r=i.sent(),!(r.status<400))throw new Error("failed to fetch: ("+r.status+") "+r.statusText+", from url: "+r.url);return[2,r]}})})}function Nb(n){return __awaiter(this,void 0,void 0,function(){var t,e;return __generator(this,function(r){switch(r.label){case 0:return[4,fetchOrThrow(n)];case 1:return t=r.sent(),[4,t.blob()];case 2:if(e=r.sent(),!e.type.startsWith("image/"))throw new Error("fetchImage - expected blob type to be of type image/*, instead have: "+e.type+", for url: "+t.url);return[2,bufferToImage(e)]}})})}function iy(n){return Ut(this,void 0,void 0,function(){return Wt(this,function(t){switch(t.label){case 0:return[4,ny(n)];case 1:return[2,t.sent().json()]}})})}function _b(n){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return t=Float32Array.bind,[4,fetchOrThrow(n)];case 1:return[4,e.sent().arrayBuffer()];case 2:return[2,new(t.apply(Float32Array,[void 0,e.sent()]))]}})})}function Yf(n,t){var e=t+"-weights_manifest.json";if(!n)return{modelBaseUri:"",manifestUri:e};if(n==="/")return{modelBaseUri:"/",manifestUri:"/"+e};var r=n.startsWith("http://")?"http://":n.startsWith("https://")?"https://":"";n=n.replace(r,"");var i=n.split("/").filter(function(u){return u}),o=n.endsWith(".json")?i[i.length-1]:e,s=r+(n.endsWith(".json")?i.slice(0,i.length-1):i).join("/");return s=n.startsWith("/")?"/"+s:s,{modelBaseUri:s,manifestUri:s==="/"?"/"+o:s+"/"+o}}function oy(n,t){return Ut(this,void 0,void 0,function(){var e,r,i,o;return Wt(this,function(s){switch(s.label){case 0:return e=Yf(n,t),r=e.manifestUri,i=e.modelBaseUri,[4,iy(r)];case 1:return o=s.sent(),[2,Ef.loadWeights(o,i)]}})})}function Fb(n,t,e){e===void 0&&(e=!1);var r=e?getMediaDimensions(t):t,i=r.width,o=r.height;return n.width=i,n.height=o,{width:i,height:o}}var Zi=function(){function n(t){this._name=t,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(n.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),n.prototype.getParamFromPath=function(t){var e=this.traversePropertyPath(t),r=e.obj,i=e.objProp;return r[i]},n.prototype.reassignParamFromPath=function(t,e){var r=this.traversePropertyPath(t),i=r.obj,o=r.objProp;i[o].dispose(),i[o]=e},n.prototype.getParamList=function(){var t=this;return this._paramMappings.map(function(e){var r=e.paramPath;return{path:r,tensor:t.getParamFromPath(r)}})},n.prototype.getTrainableParams=function(){return this.getParamList().filter(function(t){return t.tensor instanceof gr})},n.prototype.getFrozenParams=function(){return this.getParamList().filter(function(t){return!(t.tensor instanceof gr)})},n.prototype.variable=function(){var t=this;this.getFrozenParams().forEach(function(e){var r=e.path,i=e.tensor;t.reassignParamFromPath(r,i.variable())})},n.prototype.freeze=function(){var t=this;this.getTrainableParams().forEach(function(e){var r=e.path,i=e.tensor,o=Un(i.dataSync());i.dispose(),t.reassignParamFromPath(r,o)})},n.prototype.dispose=function(t){t===void 0&&(t=!0),this.getParamList().forEach(function(e){if(t&&e.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+e.path);e.tensor.dispose()}),this._params=void 0},n.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map(function(t){var e=t.tensor;return Array.from(e.dataSync())}).reduce(function(t,e){return t.concat(e)}))},n.prototype.load=function(t){return Ut(this,void 0,void 0,function(){return Wt(this,function(e){switch(e.label){case 0:return t instanceof Float32Array?(this.extractWeights(t),[2]):[4,this.loadFromUri(t)];case 1:return e.sent(),[2]}})})},n.prototype.loadFromUri=function(t){return Ut(this,void 0,void 0,function(){var e;return Wt(this,function(r){switch(r.label){case 0:if(t&&typeof t!="string")throw new Error(this._name+".loadFromUri - expected model uri");return[4,oy(t,this.getDefaultModelName())];case 1:return e=r.sent(),this.loadFromWeightMap(e),[2]}})})},n.prototype.loadFromDisk=function(t){return Ut(this,void 0,void 0,function(){var e,r,i,o,s,u,l,d,A,O;return Wt(this,function(D){switch(D.label){case 0:if(t&&typeof t!="string")throw new Error(this._name+".loadFromDisk - expected model file path");return e=Qn.getEnv().readFile,r=Yf(t,this.getDefaultModelName()),i=r.manifestUri,o=r.modelBaseUri,s=function(H){return Promise.all(H.map(function(te){return e(te).then(function(se){return se.buffer})}))},u=Ef.weightsLoaderFactory(s),A=(d=JSON).parse,[4,e(i)];case 1:return l=A.apply(d,[D.sent().toString()]),[4,u(l,o)];case 2:return O=D.sent(),this.loadFromWeightMap(O),[2]}})})},n.prototype.loadFromWeightMap=function(t){var e=this.extractParamsFromWeigthMap(t),r=e.paramMappings,i=e.params;this._paramMappings=r,this._params=i},n.prototype.extractWeights=function(t){var e=this.extractParams(t),r=e.paramMappings,i=e.params;this._paramMappings=r,this._params=i},n.prototype.traversePropertyPath=function(t){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var e=t.split("/").reduce(function(o,s){if(!o.nextObj.hasOwnProperty(s))throw new Error("traversePropertyPath - object does not have property "+s+", for path "+t);return{obj:o.nextObj,objProp:s,nextObj:o.nextObj[s]}},{nextObj:this.params}),r=e.obj,i=e.objProp;if(!r||!i||!(r[i]instanceof Xt))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+t);return{obj:r,objProp:i}},n}();function li(n,t,e){return gt(function(){var r=Qs(n,t.depthwise_filter,t.pointwise_filter,e,"same");return r=dr(r,t.bias),r})}function Pu(n,t,e){return e===void 0&&(e=!1),gt(function(){var r=un(e?dr(yi(n,t.conv0.filters,[2,2],"same"),t.conv0.bias):li(n,t.conv0,[2,2])),i=li(r,t.conv1,[1,1]),o=un(dr(r,i)),s=li(o,t.conv2,[1,1]);return un(dr(r,dr(i,s)))})}function ns(n,t,e,r){return e===void 0&&(e=!1),r===void 0&&(r=!0),gt(function(){var i=un(e?dr(yi(n,t.conv0.filters,r?[2,2]:[1,1],"same"),t.conv0.bias):li(n,t.conv0,r?[2,2]:[1,1])),o=li(i,t.conv1,[1,1]),s=un(dr(i,o)),u=li(s,t.conv2,[1,1]),l=un(dr(i,dr(o,u))),d=li(l,t.conv3,[1,1]);return un(dr(i,dr(o,dr(u,d))))})}function Ii(n,t,e,r){return e===void 0&&(e="same"),r===void 0&&(r=!1),gt(function(){var i=dr(yi(n,t.filters,[1,1],e),t.bias);return r?un(i):i})}function Ji(n,t){Object.keys(n).forEach(function(e){t.some(function(r){return r.originalPath===e})||n[e].dispose()})}function is(n,t){return function(e,r,i,o){var s=ei(n(e*r*i*i),[i,i,e,r]),u=Sn(n(r));return t.push({paramPath:o+"/filters"},{paramPath:o+"/bias"}),{filters:s,bias:u}}}function Bu(n,t){return function(e,r,i){var o=io(n(e*r),[e,r]),s=Sn(n(r));return t.push({paramPath:i+"/weights"},{paramPath:i+"/bias"}),{weights:o,bias:s}}}var $f=function(){function n(t,e,r){this.depthwise_filter=t,this.pointwise_filter=e,this.bias=r}return n}();function Mu(n,t){return function(e,r,i){var o=ei(n(9*e),[3,3,e,1]),s=ei(n(e*r),[1,1,e,r]),u=Sn(n(r));return t.push({paramPath:i+"/depthwise_filter"},{paramPath:i+"/pointwise_filter"},{paramPath:i+"/bias"}),new $f(o,s,u)}}function Nu(n){return function(t){var e=n(t+"/depthwise_filter",4),r=n(t+"/pointwise_filter",4),i=n(t+"/bias",1);return new $f(e,r,i)}}function po(n,t){return function(e,r,i){var o=n[e];if(!ma(o,r))throw new Error("expected weightMap["+e+"] to be a Tensor"+r+"D, instead have "+o);return t.push({originalPath:e,paramPath:i||e}),o}}function Yi(n){var t=n;function e(i){var o=t.slice(0,i);return t=t.slice(i),o}function r(){return t}return{extractWeights:e,getRemainingWeights:r}}function qf(n,t){var e=is(n,t),r=Mu(n,t);function i(s,u,l,d){d===void 0&&(d=!1);var A=d?e(s,u,3,l+"/conv0"):r(s,u,l+"/conv0"),O=r(u,u,l+"/conv1"),D=r(u,u,l+"/conv2");return{conv0:A,conv1:O,conv2:D}}function o(s,u,l,d){d===void 0&&(d=!1);var A=i(s,u,l,d),O=A.conv0,D=A.conv1,H=A.conv2,te=r(u,u,l+"/conv3");return{conv0:O,conv1:D,conv2:H,conv3:te}}return{extractDenseBlock3Params:i,extractDenseBlock4Params:o}}function ay(n){var t=[],e=Yi(n),r=e.extractWeights,i=e.getRemainingWeights,o=qf(r,t).extractDenseBlock4Params,s=o(3,32,"dense0",!0),u=o(32,64,"dense1"),l=o(64,128,"dense2"),d=o(128,256,"dense3");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{dense0:s,dense1:u,dense2:l,dense3:d}}}function ed(n){return function(t){var e=n(t+"/filters",4),r=n(t+"/bias",1);return{filters:e,bias:r}}}function td(n,t){var e=po(n,t),r=ed(e),i=Nu(e);function o(u,l){l===void 0&&(l=!1);var d=l?r(u+"/conv0"):i(u+"/conv0"),A=i(u+"/conv1"),O=i(u+"/conv2");return{conv0:d,conv1:A,conv2:O}}function s(u,l){l===void 0&&(l=!1);var d=l?r(u+"/conv0"):i(u+"/conv0"),A=i(u+"/conv1"),O=i(u+"/conv2"),D=i(u+"/conv3");return{conv0:d,conv1:A,conv2:O,conv3:D}}return{extractDenseBlock3Params:o,extractDenseBlock4Params:s}}function sy(n){var t=[],e=td(n,t).extractDenseBlock4Params,r={dense0:e("dense0",!0),dense1:e("dense1"),dense2:e("dense2"),dense3:e("dense3")};return Ji(n,t),{params:r,paramMappings:t}}var rd=function(n){tr(t,n);function t(){return n.call(this,"FaceFeatureExtractor")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("FaceFeatureExtractor - load model before inference");return gt(function(){var i=e.toBatchTensor(112,!0),o=[122.782,117.001,104.298],s=ba(i,o).div(Tt(255)),u=ns(s,r.dense0,!0);return u=ns(u,r.dense1),u=ns(u,r.dense2),u=ns(u,r.dense3),u=pa(u,[7,7],[2,2],"valid"),u})},t.prototype.forward=function(e){return Ut(this,void 0,void 0,function(){var r;return Wt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Mn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},t.prototype.extractParamsFromWeigthMap=function(e){return sy(e)},t.prototype.extractParams=function(e){return ay(e)},t}(Zi);function Mi(n,t){return gt(function(){return dr(Ga(n,t.weights),t.bias)})}function uy(n,t,e){var r=[],i=Yi(n),o=i.extractWeights,s=i.getRemainingWeights,u=Bu(o,r),l=u(t,e,"fc");if(s().length!==0)throw new Error("weights remaing after extract: "+s().length);return{paramMappings:r,params:{fc:l}}}function ly(n){var t=[],e=po(n,t);function r(o){var s=e(o+"/weights",2),u=e(o+"/bias",1);return{weights:s,bias:u}}var i={fc:r("fc")};return Ji(n,t),{params:i,paramMappings:t}}function nd(n){var t={},e={};return Object.keys(n).forEach(function(r){var i=r.startsWith("fc")?e:t;i[r]=n[r]}),{featureExtractorMap:t,classifierMap:e}}var id=function(n){tr(t,n);function t(e,r){var i=n.call(this,e)||this;return i._faceFeatureExtractor=r,i}return Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var r=this,i=this.params;if(!i)throw new Error(this._name+" - load model before inference");return gt(function(){var o=e instanceof rs?r.faceFeatureExtractor.forwardInput(e):e;return Mi(o.as2D(o.shape[0],-1),i.fc)})},t.prototype.dispose=function(e){e===void 0&&(e=!0),this.faceFeatureExtractor.dispose(e),n.prototype.dispose.call(this,e)},t.prototype.loadClassifierParams=function(e){var r=this.extractClassifierParams(e),i=r.params,o=r.paramMappings;this._params=i,this._paramMappings=o},t.prototype.extractClassifierParams=function(e){return uy(e,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},t.prototype.extractParamsFromWeigthMap=function(e){var r=nd(e),i=r.featureExtractorMap,o=r.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(i),ly(o)},t.prototype.extractParams=function(e){var r=this.getClassifierChannelsIn(),i=this.getClassifierChannelsOut(),o=i*r+i,s=e.slice(0,e.length-o),u=e.slice(e.length-o);return this.faceFeatureExtractor.extractWeights(s),this.extractClassifierParams(u)},t}(Zi),od=["neutral","happy","sad","angry","fearful","disgusted","surprised"],_u=function(){function n(t){var e=this;if(t.length!==7)throw new Error("FaceExpressions.constructor - expected probabilities.length to be 7, have: "+t.length);od.forEach(function(r,i){e[r]=t[i]})}return n.prototype.asSortedArray=function(){var t=this;return od.map(function(e){return{expression:e,probability:t[e]}}).sort(function(e,r){return r.probability-e.probability})},n}(),cy=function(n){tr(t,n);function t(e){return e===void 0&&(e=new rd),n.call(this,"FaceExpressionNet",e)||this}return t.prototype.forwardInput=function(e){var r=this;return gt(function(){return Vi(r.runNet(e))})},t.prototype.forward=function(e){return Ut(this,void 0,void 0,function(){var r;return Wt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Mn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.predictExpressions=function(e){return Ut(this,void 0,void 0,function(){var r,i,o,s,u=this;return Wt(this,function(l){switch(l.label){case 0:return[4,Mn(e)];case 1:return r=l.sent(),[4,this.forwardInput(r)];case 2:return i=l.sent(),[4,Promise.all(jn(i).map(function(d){return Ut(u,void 0,void 0,function(){var A;return Wt(this,function(O){switch(O.label){case 0:return[4,d.data()];case 1:return A=O.sent(),d.dispose(),[2,A]}})})}))];case 3:return o=l.sent(),i.dispose(),s=o.map(function(d){return new _u(d)}),[2,r.isBatchInput?s:s[0]]}})})},t.prototype.getDefaultModelName=function(){return"face_expression_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t.prototype.getClassifierChannelsOut=function(){return 7},t}(id);function fy(n){return n.expressions instanceof _u}function ad(n,t){var e={expressions:t};return Object.assign({},n,e)}function Lb(n,t,e,r){e===void 0&&(e=.1);var i=Array.isArray(t)?t:[t];i.forEach(function(o){var s=o instanceof _u?o:fy(o)?o.expressions:void 0;if(!s)throw new Error("drawFaceExpressions - expected faceExpressions to be FaceExpressions | WithFaceExpressions<{}> or array thereof");var u=s.asSortedArray(),l=u.filter(function(O){return O.probability>e}),d=wa(o)?o.detection.box.bottomLeft:r||new Rr(0,0),A=new Kf(l.map(function(O){return O.expression+" ("+xu(O.probability)+")"}),d);A.draw(n)})}function Fu(n){return wa(n)&&n.landmarks instanceof Zo&&n.unshiftedLandmarks instanceof Zo&&n.alignedRect instanceof ui}function os(n,t){var e=n.detection.box,r=t.shiftBy(e.x,e.y),i=r.align(),o=n.detection.imageDims,s=new ui(n.detection.score,i.rescale(o.reverse()),o),u={landmarks:r,unshiftedLandmarks:t,alignedRect:s};return Object.assign({},n,u)}var dy=function(){function n(t){t===void 0&&(t={});var e=t.drawLines,r=e===void 0?!0:e,i=t.drawPoints,o=i===void 0?!0:i,s=t.lineWidth,u=t.lineColor,l=t.pointSize,d=t.pointColor;this.drawLines=r,this.drawPoints=o,this.lineWidth=s||1,this.pointSize=l||2,this.lineColor=u||"rgba(0, 255, 255, 1)",this.pointColor=d||"rgba(255, 0, 255, 1)"}return n}(),py=function(){function n(t,e){e===void 0&&(e={}),this.faceLandmarks=t,this.options=new dy(e)}return n.prototype.draw=function(t){var e=Bi(t),r=this.options,i=r.drawLines,o=r.drawPoints,s=r.lineWidth,u=r.lineColor,l=r.pointSize,d=r.pointColor;if(i&&this.faceLandmarks instanceof Ff&&(e.strokeStyle=u,e.lineWidth=s,ko(e,this.faceLandmarks.getJawOutline()),ko(e,this.faceLandmarks.getLeftEyeBrow()),ko(e,this.faceLandmarks.getRightEyeBrow()),ko(e,this.faceLandmarks.getNose()),ko(e,this.faceLandmarks.getLeftEye(),!0),ko(e,this.faceLandmarks.getRightEye(),!0),ko(e,this.faceLandmarks.getMouth(),!0)),o){e.strokeStyle=d,e.fillStyle=d;var A=function(O){e.beginPath(),e.arc(O.x,O.y,l,0,2*Math.PI),e.fill()};this.faceLandmarks.positions.forEach(A)}},n}();function Ub(n,t){var e=Array.isArray(t)?t:[t];e.forEach(function(r){var i=r instanceof Zo?r:Fu(r)?r.landmarks:void 0;if(!i)throw new Error("drawFaceLandmarks - expected faceExpressions to be FaceLandmarks | WithFaceLandmarks<WithFaceDetection<{}>> or array thereof");new py(i).draw(n)})}function hy(n,t){var e=is(n,t),r=Mu(n,t);function i(s,u,l){var d=r(s,u,l+"/separable_conv0"),A=r(u,u,l+"/separable_conv1"),O=e(s,u,1,l+"/expansion_conv");return{separable_conv0:d,separable_conv1:A,expansion_conv:O}}function o(s,u){var l=r(s,s,u+"/separable_conv0"),d=r(s,s,u+"/separable_conv1"),A=r(s,s,u+"/separable_conv2");return{separable_conv0:l,separable_conv1:d,separable_conv2:A}}return{extractConvParams:e,extractSeparableConvParams:r,extractReductionBlockParams:i,extractMainBlockParams:o}}function vy(n,t){var e=[],r=Yi(n),i=r.extractWeights,o=r.getRemainingWeights,s=hy(i,e),u=s.extractConvParams,l=s.extractSeparableConvParams,d=s.extractReductionBlockParams,A=s.extractMainBlockParams,O=u(3,32,3,"entry_flow/conv_in"),D=d(32,64,"entry_flow/reduction_block_0"),H=d(64,128,"entry_flow/reduction_block_1"),te={conv_in:O,reduction_block_0:D,reduction_block_1:H},se={};ga(t,0,1).forEach(function(we){se["main_block_"+we]=A(128,"middle_flow/main_block_"+we)});var ae=d(128,256,"exit_flow/reduction_block"),ue=l(256,512,"exit_flow/separable_conv"),ye={reduction_block:ae,separable_conv:ue};if(o().length!==0)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:e,params:{entry_flow:te,middle_flow:se,exit_flow:ye}}}function my(n,t){var e=po(n,t),r=ed(e),i=Nu(e);function o(u){var l=i(u+"/separable_conv0"),d=i(u+"/separable_conv1"),A=r(u+"/expansion_conv");return{separable_conv0:l,separable_conv1:d,expansion_conv:A}}function s(u){var l=i(u+"/separable_conv0"),d=i(u+"/separable_conv1"),A=i(u+"/separable_conv2");return{separable_conv0:l,separable_conv1:d,separable_conv2:A}}return{extractConvParams:r,extractSeparableConvParams:i,extractReductionBlockParams:o,extractMainBlockParams:s}}function gy(n,t){var e=[],r=my(n,e),i=r.extractConvParams,o=r.extractSeparableConvParams,s=r.extractReductionBlockParams,u=r.extractMainBlockParams,l=i("entry_flow/conv_in"),d=s("entry_flow/reduction_block_0"),A=s("entry_flow/reduction_block_1"),O={conv_in:l,reduction_block_0:d,reduction_block_1:A},D={};ga(t,0,1).forEach(function(ae){D["main_block_"+ae]=u("middle_flow/main_block_"+ae)});var H=s("exit_flow/reduction_block"),te=o("exit_flow/separable_conv"),se={reduction_block:H,separable_conv:te};return Ji(n,e),{params:{entry_flow:O,middle_flow:D,exit_flow:se},paramMappings:e}}function sd(n,t,e){return dr(yi(n,t.filters,e,"same"),t.bias)}function Lu(n,t,e){e===void 0&&(e=!0);var r=e?un(n):n;return r=li(r,t.separable_conv0,[1,1]),r=li(un(r),t.separable_conv1,[1,1]),r=Bn(r,[3,3],[2,2],"same"),r=dr(r,sd(n,t.expansion_conv,[2,2])),r}function yy(n,t){var e=li(un(n),t.separable_conv0,[1,1]);return e=li(un(e),t.separable_conv1,[1,1]),e=li(un(e),t.separable_conv2,[1,1]),e=dr(e,n),e}var by=function(n){tr(t,n);function t(e){var r=n.call(this,"TinyXception")||this;return r._numMainBlocks=e,r}return t.prototype.forwardInput=function(e){var r=this,i=this.params;if(!i)throw new Error("TinyXception - load model before inference");return gt(function(){var o=e.toBatchTensor(112,!0),s=[122.782,117.001,104.298],u=ba(o,s).div(Tt(256)),l=un(sd(u,i.entry_flow.conv_in,[2,2]));return l=Lu(l,i.entry_flow.reduction_block_0,!1),l=Lu(l,i.entry_flow.reduction_block_1),ga(r._numMainBlocks,0,1).forEach(function(d){l=yy(l,i.middle_flow["main_block_"+d])}),l=Lu(l,i.exit_flow.reduction_block),l=un(li(l,i.exit_flow.separable_conv,[1,1])),l})},t.prototype.forward=function(e){return Ut(this,void 0,void 0,function(){var r;return Wt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Mn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"tiny_xception_model"},t.prototype.extractParamsFromWeigthMap=function(e){return gy(e,this._numMainBlocks)},t.prototype.extractParams=function(e){return vy(e,this._numMainBlocks)},t}(Zi);function wy(n){var t=[],e=Yi(n),r=e.extractWeights,i=e.getRemainingWeights,o=Bu(r,t),s=o(512,1,"fc/age"),u=o(512,2,"fc/gender");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{fc:{age:s,gender:u}}}}function Ay(n){var t=[],e=po(n,t);function r(o){var s=e(o+"/weights",2),u=e(o+"/bias",1);return{weights:s,bias:u}}var i={fc:{age:r("fc/age"),gender:r("fc/gender")}};return Ji(n,t),{params:i,paramMappings:t}}var as;(function(n){n.FEMALE="female",n.MALE="male"})(as||(as={}));var xy=function(n){tr(t,n);function t(e){e===void 0&&(e=new by(2));var r=n.call(this,"AgeGenderNet")||this;return r._faceFeatureExtractor=e,r}return Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var r=this,i=this.params;if(!i)throw new Error(this._name+" - load model before inference");return gt(function(){var o=e instanceof rs?r.faceFeatureExtractor.forwardInput(e):e,s=pa(o,[7,7],[2,2],"valid").as2D(o.shape[0],-1),u=Mi(s,i.fc.age).as1D(),l=Mi(s,i.fc.gender);return{age:u,gender:l}})},t.prototype.forwardInput=function(e){var r=this;return gt(function(){var i=r.runNet(e),o=i.age,s=i.gender;return{age:o,gender:Vi(s)}})},t.prototype.forward=function(e){return Ut(this,void 0,void 0,function(){var r;return Wt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Mn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.predictAgeAndGender=function(e){return Ut(this,void 0,void 0,function(){var r,i,o,s,u,l,d=this;return Wt(this,function(A){switch(A.label){case 0:return[4,Mn(e)];case 1:return r=A.sent(),[4,this.forwardInput(r)];case 2:return i=A.sent(),o=jn(i.age),s=jn(i.gender),u=o.map(function(O,D){return{ageTensor:O,genderTensor:s[D]}}),[4,Promise.all(u.map(function(O){var D=O.ageTensor,H=O.genderTensor;return Ut(d,void 0,void 0,function(){var te,se,ae,ue,ye;return Wt(this,function(we){switch(we.label){case 0:return[4,D.data()];case 1:return te=we.sent()[0],[4,H.data()];case 2:return se=we.sent()[0],ae=se>.5,ue=ae?as.MALE:as.FEMALE,ye=ae?se:1-se,D.dispose(),H.dispose(),[2,{age:te,gender:ue,genderProbability:ye}]}})})}))];case 3:return l=A.sent(),i.age.dispose(),i.gender.dispose(),[2,r.isBatchInput?l:l[0]]}})})},t.prototype.getDefaultModelName=function(){return"age_gender_model"},t.prototype.dispose=function(e){e===void 0&&(e=!0),this.faceFeatureExtractor.dispose(e),n.prototype.dispose.call(this,e)},t.prototype.loadClassifierParams=function(e){var r=this.extractClassifierParams(e),i=r.params,o=r.paramMappings;this._params=i,this._paramMappings=o},t.prototype.extractClassifierParams=function(e){return wy(e)},t.prototype.extractParamsFromWeigthMap=function(e){var r=nd(e),i=r.featureExtractorMap,o=r.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(i),Ay(o)},t.prototype.extractParams=function(e){var r=1539,i=e.slice(0,e.length-r),o=e.slice(e.length-r);return this.faceFeatureExtractor.extractWeights(i),this.extractClassifierParams(o)},t}(Zi),ud=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postProcess=function(e,r,i){var o=i.map(function(u){var l=u.width,d=u.height,A=r/Math.max(d,l);return{width:l*A,height:d*A}}),s=o.length;return gt(function(){var u=function(D,H){return ai([ji([68],D),ji([68],H)],1).as2D(1,136).as1D()},l=function(D,H){var te=o[D],se=te.width,ae=te.height;return H(se,ae)?Math.abs(se-ae)/2:0},d=function(D){return l(D,function(H,te){return H<te})},A=function(D){return l(D,function(H,te){return te<H})},O=e.mul(ji([s,136],r)).sub(ai(Array.from(Array(s),function(D,H){return u(d(H),A(H))}))).div(ai(Array.from(Array(s),function(D,H){return u(o[H].width,o[H].height)})));return O})},t.prototype.forwardInput=function(e){var r=this;return gt(function(){var i=r.runNet(e);return r.postProcess(i,e.inputSize,e.inputDimensions.map(function(o){var s=o[0],u=o[1];return{height:s,width:u}}))})},t.prototype.forward=function(e){return Ut(this,void 0,void 0,function(){var r;return Wt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Mn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.detectLandmarks=function(e){return Ut(this,void 0,void 0,function(){var r,i,o,s=this;return Wt(this,function(u){switch(u.label){case 0:return[4,Mn(e)];case 1:return r=u.sent(),i=gt(function(){return jn(s.forwardInput(r))}),[4,Promise.all(i.map(function(l,d){return Ut(s,void 0,void 0,function(){var A,O,D,H,te;return Wt(this,function(se){switch(se.label){case 0:return D=(O=Array).from,[4,l.data()];case 1:return A=D.apply(O,[se.sent()]),H=A.filter(function(ae,ue){return Bf(ue)}),te=A.filter(function(ae,ue){return!Bf(ue)}),[2,new Ff(Array(68).fill(0).map(function(ae,ue){return new Rr(H[ue],te[ue])}),{height:r.getInputHeight(d),width:r.getInputWidth(d)})]}})})}))];case 2:return o=u.sent(),i.forEach(function(l){return l.dispose()}),[2,r.isBatchInput?o:o[0]]}})})},t.prototype.getClassifierChannelsOut=function(){return 136},t}(id),ld=function(n){tr(t,n);function t(e){return e===void 0&&(e=new rd),n.call(this,"FaceLandmark68Net",e)||this}return t.prototype.getDefaultModelName=function(){return"face_landmark_68_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t}(ud);function Ey(n){var t=[],e=td(n,t).extractDenseBlock3Params,r={dense0:e("dense0",!0),dense1:e("dense1"),dense2:e("dense2")};return Ji(n,t),{params:r,paramMappings:t}}function Cy(n){var t=[],e=Yi(n),r=e.extractWeights,i=e.getRemainingWeights,o=qf(r,t).extractDenseBlock3Params,s=o(3,32,"dense0",!0),u=o(32,64,"dense1"),l=o(64,128,"dense2");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{dense0:s,dense1:u,dense2:l}}}var Sy=function(n){tr(t,n);function t(){return n.call(this,"TinyFaceFeatureExtractor")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("TinyFaceFeatureExtractor - load model before inference");return gt(function(){var i=e.toBatchTensor(112,!0),o=[122.782,117.001,104.298],s=ba(i,o).div(Tt(255)),u=Pu(s,r.dense0,!0);return u=Pu(u,r.dense1),u=Pu(u,r.dense2),u=pa(u,[14,14],[2,2],"valid"),u})},t.prototype.forward=function(e){return Ut(this,void 0,void 0,function(){var r;return Wt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Mn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_tiny_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Ey(e)},t.prototype.extractParams=function(e){return Cy(e)},t}(Zi),Iy=function(n){tr(t,n);function t(e){return e===void 0&&(e=new Sy),n.call(this,"FaceLandmark68TinyNet",e)||this}return t.prototype.getDefaultModelName=function(){return"face_landmark_68_tiny_model"},t.prototype.getClassifierChannelsIn=function(){return 128},t}(ud),Wb=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t}(ld);function Ty(n,t){return dr(Hn(n,t.weights),t.biases)}function Uu(n,t,e,r,i){i===void 0&&(i="same");var o=t.conv,s=o.filters,u=o.bias,l=yi(n,s,e,i);return l=dr(l,u),l=Ty(l,t.scale),r?un(l):l}function Ry(n,t){return Uu(n,t,[1,1],!0)}function cd(n,t){return Uu(n,t,[1,1],!1)}function fd(n,t){return Uu(n,t,[2,2],!0,"valid")}function Oy(n,t){function e(u,l,d){var A=n(u),O=A.length/(l*d*d);if(Ug(O))throw new Error("depth has to be an integer: "+O+", weights.length: "+A.length+", numFilters: "+l+", filterSize: "+d);return gt(function(){return ao(ei(A,[l,O,d,d]),[2,3,1,0])})}function r(u,l,d,A){var O=e(u,l,d),D=Sn(n(l));return t.push({paramPath:A+"/filters"},{paramPath:A+"/bias"}),{filters:O,bias:D}}function i(u,l){var d=Sn(n(u)),A=Sn(n(u));return t.push({paramPath:l+"/weights"},{paramPath:l+"/biases"}),{weights:d,biases:A}}function o(u,l,d,A){var O=r(u,l,d,A+"/conv"),D=i(l,A+"/scale");return{conv:O,scale:D}}function s(u,l,d,A,O){O===void 0&&(O=!1);var D=o((O?.5:1)*u,l,d,A+"/conv1"),H=o(u,l,d,A+"/conv2");return{conv1:D,conv2:H}}return{extractConvLayerParams:o,extractResidualLayerParams:s}}function ky(n){var t=Yi(n),e=t.extractWeights,r=t.getRemainingWeights,i=[],o=Oy(e,i),s=o.extractConvLayerParams,u=o.extractResidualLayerParams,l=s(4704,32,7,"conv32_down"),d=u(9216,32,3,"conv32_1"),A=u(9216,32,3,"conv32_2"),O=u(9216,32,3,"conv32_3"),D=u(36864,64,3,"conv64_down",!0),H=u(36864,64,3,"conv64_1"),te=u(36864,64,3,"conv64_2"),se=u(36864,64,3,"conv64_3"),ae=u(147456,128,3,"conv128_down",!0),ue=u(147456,128,3,"conv128_1"),ye=u(147456,128,3,"conv128_2"),we=u(589824,256,3,"conv256_down",!0),ve=u(589824,256,3,"conv256_1"),Ee=u(589824,256,3,"conv256_2"),Te=u(589824,256,3,"conv256_down_out"),Fe=gt(function(){return ao(io(e(256*128),[128,256]),[1,0])});if(i.push({paramPath:"fc"}),r().length!==0)throw new Error("weights remaing after extract: "+r().length);var Le={conv32_down:l,conv32_1:d,conv32_2:A,conv32_3:O,conv64_down:D,conv64_1:H,conv64_2:te,conv64_3:se,conv128_down:ae,conv128_1:ue,conv128_2:ye,conv256_down:we,conv256_1:ve,conv256_2:Ee,conv256_down_out:Te,fc:Fe};return{params:Le,paramMappings:i}}function jy(n,t){var e=po(n,t);function r(s){var u=e(s+"/scale/weights",1),l=e(s+"/scale/biases",1);return{weights:u,biases:l}}function i(s){var u=e(s+"/conv/filters",4),l=e(s+"/conv/bias",1),d=r(s);return{conv:{filters:u,bias:l},scale:d}}function o(s){return{conv1:i(s+"/conv1"),conv2:i(s+"/conv2")}}return{extractConvLayerParams:i,extractResidualLayerParams:o}}function Dy(n){var t=[],e=jy(n,t),r=e.extractConvLayerParams,i=e.extractResidualLayerParams,o=r("conv32_down"),s=i("conv32_1"),u=i("conv32_2"),l=i("conv32_3"),d=i("conv64_down"),A=i("conv64_1"),O=i("conv64_2"),D=i("conv64_3"),H=i("conv128_down"),te=i("conv128_1"),se=i("conv128_2"),ae=i("conv256_down"),ue=i("conv256_1"),ye=i("conv256_2"),we=i("conv256_down_out"),ve=n.fc;if(t.push({originalPath:"fc",paramPath:"fc"}),!Lg(ve))throw new Error("expected weightMap[fc] to be a Tensor2D, instead have "+ve);var Ee={conv32_down:o,conv32_1:s,conv32_2:u,conv32_3:l,conv64_down:d,conv64_1:A,conv64_2:O,conv64_3:D,conv128_down:H,conv128_1:te,conv128_2:se,conv256_down:ae,conv256_1:ue,conv256_2:ye,conv256_down_out:we,fc:ve};return Ji(n,t),{params:Ee,paramMappings:t}}function Ni(n,t){var e=Ry(n,t.conv1);return e=cd(e,t.conv2),e=dr(e,n),e=un(e),e}function ss(n,t){var e=fd(n,t.conv1);e=cd(e,t.conv2);var r=pa(n,2,2,"valid"),i=en(r.shape),o=r.shape[3]!==e.shape[3],s=r.shape[1]!==e.shape[1]||r.shape[2]!==e.shape[2];if(s){var u=va(e.shape);u[1]=1;var l=en(u);e=kn([e,l],1);var d=va(e.shape);d[2]=1;var A=en(d);e=kn([e,A],2)}return r=o?kn([r,i],3):r,e=dr(r,e),e=un(e),e}var Py=function(n){tr(t,n);function t(){return n.call(this,"FaceRecognitionNet")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("FaceRecognitionNet - load model before inference");return gt(function(){var i=e.toBatchTensor(150,!0).toFloat(),o=[122.782,117.001,104.298],s=ba(i,o).div(Tt(256)),u=fd(s,r.conv32_down);u=Bn(u,3,2,"valid"),u=Ni(u,r.conv32_1),u=Ni(u,r.conv32_2),u=Ni(u,r.conv32_3),u=ss(u,r.conv64_down),u=Ni(u,r.conv64_1),u=Ni(u,r.conv64_2),u=Ni(u,r.conv64_3),u=ss(u,r.conv128_down),u=Ni(u,r.conv128_1),u=Ni(u,r.conv128_2),u=ss(u,r.conv256_down),u=Ni(u,r.conv256_1),u=Ni(u,r.conv256_2),u=ss(u,r.conv256_down_out);var l=u.mean([1,2]),d=Ga(l,r.fc);return d})},t.prototype.forward=function(e){return Ut(this,void 0,void 0,function(){var r;return Wt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Mn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.computeFaceDescriptor=function(e){return Ut(this,void 0,void 0,function(){var r,i,o,s=this;return Wt(this,function(u){switch(u.label){case 0:return[4,Mn(e)];case 1:return r=u.sent(),i=gt(function(){return jn(s.forwardInput(r))}),[4,Promise.all(i.map(function(l){return l.data()}))];case 2:return o=u.sent(),i.forEach(function(l){return l.dispose()}),[2,r.isBatchInput?o:o[0]]}})})},t.prototype.getDefaultModelName=function(){return"face_recognition_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Dy(e)},t.prototype.extractParams=function(e){return ky(e)},t}(Zi);function zb(n){var t=new FaceRecognitionNet;return t.extractWeights(n),t}function Hb(n){return(n.gender===Gender.MALE||n.gender===Gender.FEMALE)&&isValidProbablitiy(n.genderProbability)}function dd(n,t,e){var r={gender:t,genderProbability:e};return Object.assign({},n,r)}var pd=function(){function n(t){var e=t===void 0?{}:t,r=e.minFaceSize,i=e.scaleFactor,o=e.maxNumScales,s=e.scoreThresholds,u=e.scaleSteps;if(this._name="MtcnnOptions",this._minFaceSize=r||20,this._scaleFactor=i||.709,this._maxNumScales=o||10,this._scoreThresholds=s||[.6,.7,.7],this._scaleSteps=u,typeof this._minFaceSize!="number"||this._minFaceSize<0)throw new Error(this._name+" - expected minFaceSize to be a number > 0");if(typeof this._scaleFactor!="number"||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if(typeof this._maxNumScales!="number"||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||this._scoreThresholds.length!==3||this._scoreThresholds.some(function(l){return typeof l!="number"}))throw new Error(this._name+" - expected scoreThresholds to be an array of numbers of length 3");if(this._scaleSteps&&(!Array.isArray(this._scaleSteps)||this._scaleSteps.some(function(l){return typeof l!="number"})))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(n.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),n}();function By(n,t){function e(l,d){var A=ei(n(9*l),[3,3,l,1]),O=Sn(n(l)),D=Sn(n(l)),H=Sn(n(l)),te=Sn(n(l));return t.push({paramPath:d+"/filters"},{paramPath:d+"/batch_norm_scale"},{paramPath:d+"/batch_norm_offset"},{paramPath:d+"/batch_norm_mean"},{paramPath:d+"/batch_norm_variance"}),{filters:A,batch_norm_scale:O,batch_norm_offset:D,batch_norm_mean:H,batch_norm_variance:te}}function r(l,d,A,O,D){var H=ei(n(l*d*A*A),[A,A,l,d]),te=Sn(n(d));return t.push({paramPath:O+"/filters"},{paramPath:O+"/"+(D?"batch_norm_offset":"bias")}),{filters:H,bias:te}}function i(l,d,A,O){var D=r(l,d,A,O,!0),H=D.filters,te=D.bias;return{filters:H,batch_norm_offset:te}}function o(l,d,A){var O=e(l,A+"/depthwise_conv"),D=i(l,d,1,A+"/pointwise_conv");return{depthwise_conv:O,pointwise_conv:D}}function s(){var l=i(3,32,3,"mobilenetv1/conv_0"),d=o(32,64,"mobilenetv1/conv_1"),A=o(64,128,"mobilenetv1/conv_2"),O=o(128,128,"mobilenetv1/conv_3"),D=o(128,256,"mobilenetv1/conv_4"),H=o(256,256,"mobilenetv1/conv_5"),te=o(256,512,"mobilenetv1/conv_6"),se=o(512,512,"mobilenetv1/conv_7"),ae=o(512,512,"mobilenetv1/conv_8"),ue=o(512,512,"mobilenetv1/conv_9"),ye=o(512,512,"mobilenetv1/conv_10"),we=o(512,512,"mobilenetv1/conv_11"),ve=o(512,1024,"mobilenetv1/conv_12"),Ee=o(1024,1024,"mobilenetv1/conv_13");return{conv_0:l,conv_1:d,conv_2:A,conv_3:O,conv_4:D,conv_5:H,conv_6:te,conv_7:se,conv_8:ae,conv_9:ue,conv_10:ye,conv_11:we,conv_12:ve,conv_13:Ee}}function u(){var l=i(1024,256,1,"prediction_layer/conv_0"),d=i(256,512,3,"prediction_layer/conv_1"),A=i(512,128,1,"prediction_layer/conv_2"),O=i(128,256,3,"prediction_layer/conv_3"),D=i(256,128,1,"prediction_layer/conv_4"),H=i(128,256,3,"prediction_layer/conv_5"),te=i(256,64,1,"prediction_layer/conv_6"),se=i(64,128,3,"prediction_layer/conv_7"),ae=r(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),ue=r(512,9,1,"prediction_layer/box_predictor_0/class_predictor"),ye=r(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),we=r(1024,18,1,"prediction_layer/box_predictor_1/class_predictor"),ve=r(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),Ee=r(512,18,1,"prediction_layer/box_predictor_2/class_predictor"),Te=r(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),Fe=r(256,18,1,"prediction_layer/box_predictor_3/class_predictor"),Le=r(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),Me=r(256,18,1,"prediction_layer/box_predictor_4/class_predictor"),Ne=r(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),Ze=r(128,18,1,"prediction_layer/box_predictor_5/class_predictor"),Xe={box_encoding_predictor:ae,class_predictor:ue},qe={box_encoding_predictor:ye,class_predictor:we},tt={box_encoding_predictor:ve,class_predictor:Ee},ct={box_encoding_predictor:Te,class_predictor:Fe},bt={box_encoding_predictor:Le,class_predictor:Me},mt={box_encoding_predictor:Ne,class_predictor:Ze};return{conv_0:l,conv_1:d,conv_2:A,conv_3:O,conv_4:D,conv_5:H,conv_6:te,conv_7:se,box_predictor_0:Xe,box_predictor_1:qe,box_predictor_2:tt,box_predictor_3:ct,box_predictor_4:bt,box_predictor_5:mt}}return{extractMobilenetV1Params:s,extractPredictionLayerParams:u}}function My(n){var t=[],e=Yi(n),r=e.extractWeights,i=e.getRemainingWeights,o=By(r,t),s=o.extractMobilenetV1Params,u=o.extractPredictionLayerParams,l=s(),d=u(),A=hs(r(5118*4),[1,5118,4]),O={extra_dim:A};if(t.push({paramPath:"output_layer/extra_dim"}),i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{params:{mobilenetv1:l,prediction_layer:d,output_layer:O},paramMappings:t}}function Ny(n,t){var e=po(n,t);function r(d,A,O){var D=e(d+"/Conv2d_"+A+"_pointwise/weights",4,O+"/filters"),H=e(d+"/Conv2d_"+A+"_pointwise/convolution_bn_offset",1,O+"/batch_norm_offset");return{filters:D,batch_norm_offset:H}}function i(d){var A="mobilenetv1/conv_"+d,O="MobilenetV1/Conv2d_"+d+"_depthwise",D=A+"/depthwise_conv",H=A+"/pointwise_conv",te=e(O+"/depthwise_weights",4,D+"/filters"),se=e(O+"/BatchNorm/gamma",1,D+"/batch_norm_scale"),ae=e(O+"/BatchNorm/beta",1,D+"/batch_norm_offset"),ue=e(O+"/BatchNorm/moving_mean",1,D+"/batch_norm_mean"),ye=e(O+"/BatchNorm/moving_variance",1,D+"/batch_norm_variance");return{depthwise_conv:{filters:te,batch_norm_scale:se,batch_norm_offset:ae,batch_norm_mean:ue,batch_norm_variance:ye},pointwise_conv:r("MobilenetV1",d,H)}}function o(){return{conv_0:r("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:i(1),conv_2:i(2),conv_3:i(3),conv_4:i(4),conv_5:i(5),conv_6:i(6),conv_7:i(7),conv_8:i(8),conv_9:i(9),conv_10:i(10),conv_11:i(11),conv_12:i(12),conv_13:i(13)}}function s(d,A){var O=e(d+"/weights",4,A+"/filters"),D=e(d+"/biases",1,A+"/bias");return{filters:O,bias:D}}function u(d){var A=s("Prediction/BoxPredictor_"+d+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+d+"/box_encoding_predictor"),O=s("Prediction/BoxPredictor_"+d+"/ClassPredictor","prediction_layer/box_predictor_"+d+"/class_predictor");return{box_encoding_predictor:A,class_predictor:O}}function l(){return{conv_0:r("Prediction",0,"prediction_layer/conv_0"),conv_1:r("Prediction",1,"prediction_layer/conv_1"),conv_2:r("Prediction",2,"prediction_layer/conv_2"),conv_3:r("Prediction",3,"prediction_layer/conv_3"),conv_4:r("Prediction",4,"prediction_layer/conv_4"),conv_5:r("Prediction",5,"prediction_layer/conv_5"),conv_6:r("Prediction",6,"prediction_layer/conv_6"),conv_7:r("Prediction",7,"prediction_layer/conv_7"),box_predictor_0:u(0),box_predictor_1:u(1),box_predictor_2:u(2),box_predictor_3:u(3),box_predictor_4:u(4),box_predictor_5:u(5)}}return{extractMobilenetV1Params:o,extractPredictionLayerParams:l}}function _y(n){var t=[],e=Ny(n,t),r=e.extractMobilenetV1Params,i=e.extractPredictionLayerParams,o=n["Output/extra_dim"];if(t.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!$a(o))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+o);var s={mobilenetv1:r(),prediction_layer:i(),output_layer:{extra_dim:o}};return Ji(n,t),{params:s,paramMappings:t}}function _i(n,t,e){return gt(function(){var r=yi(n,t.filters,e,"same");return r=dr(r,t.batch_norm_offset),Us(r,0,6)})}var Fy=.0010000000474974513;function Ly(n,t,e){return gt(function(){var r=Va(n,t.filters,e,"same");return r=Oc(r,t.batch_norm_mean,t.batch_norm_variance,t.batch_norm_offset,t.batch_norm_scale,Fy),Us(r,0,6)})}function Uy(n){return[2,4,6,12].some(function(t){return t===n})?[2,2]:[1,1]}function Wy(n,t){return gt(function(){var e=null,r=_i(n,t.conv_0,[2,2]),i=[t.conv_1,t.conv_2,t.conv_3,t.conv_4,t.conv_5,t.conv_6,t.conv_7,t.conv_8,t.conv_9,t.conv_10,t.conv_11,t.conv_12,t.conv_13];if(i.forEach(function(o,s){var u=s+1,l=Uy(u);r=Ly(r,o.depthwise_conv,l),r=_i(r,o.pointwise_conv,[1,1]),u===11&&(e=r)}),e===null)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:r,conv11:e}})}function zy(n,t,e,r,i){var o=n.shape[0],s=Math.min(e,o),u=t.map(function(A,O){return{score:A,boxIndex:O}}).filter(function(A){return A.score>i}).sort(function(A,O){return O.score-A.score}),l=function(A){return A<=r?1:0},d=[];return u.forEach(function(A){if(!(d.length>=s)){for(var O=A.score,D=d.length-1;D>=0;--D){var H=Hy(n,A.boxIndex,d[D]);if(H!==0&&(A.score*=l(H),A.score<=i))break}O===A.score&&d.push(A.boxIndex)}}),d}function Hy(n,t,e){var r=n.arraySync(),i=Math.min(r[t][0],r[t][2]),o=Math.min(r[t][1],r[t][3]),s=Math.max(r[t][0],r[t][2]),u=Math.max(r[t][1],r[t][3]),l=Math.min(r[e][0],r[e][2]),d=Math.min(r[e][1],r[e][3]),A=Math.max(r[e][0],r[e][2]),O=Math.max(r[e][1],r[e][3]),D=(s-i)*(u-o),H=(A-l)*(O-d);if(D<=0||H<=0)return 0;var te=Math.max(i,l),se=Math.max(o,d),ae=Math.min(s,A),ue=Math.min(u,O),ye=Math.max(ae-te,0)*Math.max(ue-se,0);return ye/(D+H-ye)}function Vy(n){var t=jn(ao(n,[1,0])),e=[Dn(t[2],t[0]),Dn(t[3],t[1])],r=[dr(t[0],Si(e[0],Tt(2))),dr(t[1],Si(e[1],Tt(2)))];return{sizes:e,centers:r}}function Gy(n,t){var e=Vy(n),r=e.sizes,i=e.centers,o=jn(ao(t,[1,0])),s=Si(Hn(Ws(Si(o[2],Tt(5))),r[0]),Tt(2)),u=dr(Hn(Si(o[0],Tt(10)),r[0]),i[0]),l=Si(Hn(Ws(Si(o[3],Tt(5))),r[1]),Tt(2)),d=dr(Hn(Si(o[1],Tt(10)),r[1]),i[1]);return ao(ai([Dn(u,s),Dn(d,l),dr(u,s),dr(d,l)]),[1,0])}function Qy(n,t,e){return gt(function(){var r=n.shape[0],i=Gy(Ei(No(e.extra_dim,[r,1,1]),[-1,4]),Ei(n,[-1,4]));i=Ei(i,[r,i.shape[0]/r,4]);var o=Sc(Di(t,[0,0,1],[-1,-1,-1])),s=Di(o,[0,0,0],[-1,-1,1]);s=Ei(s,[r,s.shape[1]]);var u=jn(i),l=jn(s);return{boxes:u,scores:l}})}function Jo(n,t){return gt(function(){var e=n.shape[0],r=Ei(Ii(n,t.box_encoding_predictor),[e,-1,1,4]),i=Ei(Ii(n,t.class_predictor),[e,-1,3]);return{boxPredictionEncoding:r,classPrediction:i}})}function Xy(n,t,e){return gt(function(){var r=_i(n,e.conv_0,[1,1]),i=_i(r,e.conv_1,[2,2]),o=_i(i,e.conv_2,[1,1]),s=_i(o,e.conv_3,[2,2]),u=_i(s,e.conv_4,[1,1]),l=_i(u,e.conv_5,[2,2]),d=_i(l,e.conv_6,[1,1]),A=_i(d,e.conv_7,[2,2]),O=Jo(t,e.box_predictor_0),D=Jo(n,e.box_predictor_1),H=Jo(i,e.box_predictor_2),te=Jo(s,e.box_predictor_3),se=Jo(l,e.box_predictor_4),ae=Jo(A,e.box_predictor_5),ue=kn([O.boxPredictionEncoding,D.boxPredictionEncoding,H.boxPredictionEncoding,te.boxPredictionEncoding,se.boxPredictionEncoding,ae.boxPredictionEncoding],1),ye=kn([O.classPrediction,D.classPrediction,H.classPrediction,te.classPrediction,se.classPrediction,ae.classPrediction],1);return{boxPredictions:ue,classPredictions:ye}})}var us=function(){function n(t){var e=t===void 0?{}:t,r=e.minConfidence,i=e.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=r||.5,this._maxResults=i||100,typeof this._minConfidence!="number"||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if(typeof this._maxResults!="number")throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(n.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),n}(),hd=function(n){tr(t,n);function t(){return n.call(this,"SsdMobilenetv1")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("SsdMobilenetv1 - load model before inference");return gt(function(){var i=e.toBatchTensor(512,!1).toFloat(),o=Dn(Hn(i,Tt(.007843137718737125)),Tt(1)),s=Wy(o,r.mobilenetv1),u=Xy(s.out,s.conv11,r.prediction_layer),l=u.boxPredictions,d=u.classPredictions;return Qy(l,d,r.output_layer)})},t.prototype.forward=function(e){return Ut(this,void 0,void 0,function(){var r;return Wt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Mn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.locateFaces=function(e,r){return r===void 0&&(r={}),Ut(this,void 0,void 0,function(){var i,o,s,u,l,d,A,O,D,H,te,se,ae,ue,ye,we,ve,Ee,Te,Fe,Le;return Wt(this,function(Me){switch(Me.label){case 0:return i=new us(r),o=i.maxResults,s=i.minConfidence,[4,Mn(e)];case 1:for(u=Me.sent(),l=this.forwardInput(u),d=l.boxes,A=l.scores,O=d[0],D=A[0],H=1;H<d.length;H++)d[H].dispose(),A[H].dispose();return ae=(se=Array).from,[4,D.data()];case 2:return te=ae.apply(se,[Me.sent()]),ue=.5,ye=zy(O,te,o,ue,s),we=u.getReshapedInputDimensions(0),ve=u.inputSize,Ee=ve/we.width,Te=ve/we.height,Fe=O.arraySync(),Le=ye.map(function(Ne){var Ze=[Math.max(0,Fe[Ne][0]),Math.min(1,Fe[Ne][2])].map(function(mt){return mt*Te}),Xe=Ze[0],qe=Ze[1],tt=[Math.max(0,Fe[Ne][1]),Math.min(1,Fe[Ne][3])].map(function(mt){return mt*Ee}),ct=tt[0],bt=tt[1];return new ui(te[Ne],new Su(ct,Xe,bt-ct,qe-Xe),{height:u.getInputHeight(0),width:u.getInputWidth(0)})}),O.dispose(),D.dispose(),[2,Le]}})})},t.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},t.prototype.extractParamsFromWeigthMap=function(e){return _y(e)},t.prototype.extractParams=function(e){return My(e)},t}(Zi);function Ky(n){var t=new SsdMobilenetv1;return t.extractWeights(n),t}function Vb(n){return Ky(n)}var Gb=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t}(hd),Zy=.4,Jy=[new Rr(.738768,.874946),new Rr(2.42204,2.65704),new Rr(4.30971,7.04493),new Rr(10.246,4.59428),new Rr(12.6868,11.8741)],Yy=[new Rr(1.603231,2.094468),new Rr(6.041143,7.080126),new Rr(2.882459,3.518061),new Rr(4.266906,5.178857),new Rr(9.041765,10.66308)],$y=[117.001,114.697,97.404],qy="tiny_yolov2_model",e0="tiny_yolov2_separable_conv_model",ls=function(n){return typeof n=="number"};function t0(n){if(!n)throw new Error("invalid config: "+n);if(typeof n.withSeparableConvs!="boolean")throw new Error("config.withSeparableConvs has to be a boolean, have: "+n.withSeparableConvs);if(!ls(n.iouThreshold)||n.iouThreshold<0||n.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+n.iouThreshold);if(!Array.isArray(n.classes)||!n.classes.length||!n.classes.every(function(t){return typeof t=="string"}))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(n.classes));if(!Array.isArray(n.anchors)||!n.anchors.length||!n.anchors.map(function(t){return t||{}}).every(function(t){return ls(t.x)&&ls(t.y)}))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(n.anchors));if(n.meanRgb&&(!Array.isArray(n.meanRgb)||n.meanRgb.length!==3||!n.meanRgb.every(ls)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(n.meanRgb))}function Wu(n){return gt(function(){var t=Hn(n,Tt(.10000000149011612));return dr(un(Dn(n,t)),t)})}function ho(n,t){return gt(function(){var e=xo(n,[[0,0],[1,1],[1,1],[0,0]]);return e=yi(e,t.conv.filters,[1,1],"valid"),e=Dn(e,t.bn.sub),e=Hn(e,t.bn.truediv),e=dr(e,t.conv.bias),Wu(e)})}function vo(n,t){return gt(function(){var e=xo(n,[[0,0],[1,1],[1,1],[0,0]]);return e=Qs(e,t.depthwise_filter,t.pointwise_filter,[1,1],"valid"),e=dr(e,t.bias),Wu(e)})}function r0(n,t){var e=is(n,t);function r(s,u){var l=Sn(n(s)),d=Sn(n(s));return t.push({paramPath:u+"/sub"},{paramPath:u+"/truediv"}),{sub:l,truediv:d}}function i(s,u,l){var d=e(s,u,3,l+"/conv"),A=r(u,l+"/bn");return{conv:d,bn:A}}var o=Mu(n,t);return{extractConvParams:e,extractConvWithBatchNormParams:i,extractSeparableConvParams:o}}function n0(n,t,e,r){var i=Yi(n),o=i.extractWeights,s=i.getRemainingWeights,u=[],l=r0(o,u),d=l.extractConvParams,A=l.extractConvWithBatchNormParams,O=l.extractSeparableConvParams,D;if(t.withSeparableConvs){var H=r[0],te=r[1],se=r[2],ae=r[3],ue=r[4],ye=r[5],we=r[6],ve=r[7],Ee=r[8],Te=t.isFirstLayerConv2d?d(H,te,3,"conv0"):O(H,te,"conv0"),Fe=O(te,se,"conv1"),Le=O(se,ae,"conv2"),Me=O(ae,ue,"conv3"),Ne=O(ue,ye,"conv4"),Ze=O(ye,we,"conv5"),Xe=ve?O(we,ve,"conv6"):void 0,qe=Ee?O(ve,Ee,"conv7"):void 0,tt=d(Ee||ve||we,5*e,1,"conv8");D={conv0:Te,conv1:Fe,conv2:Le,conv3:Me,conv4:Ne,conv5:Ze,conv6:Xe,conv7:qe,conv8:tt}}else{var H=r[0],te=r[1],se=r[2],ae=r[3],ue=r[4],ye=r[5],we=r[6],ve=r[7],Ee=r[8],Te=A(H,te,"conv0"),Fe=A(te,se,"conv1"),Le=A(se,ae,"conv2"),Me=A(ae,ue,"conv3"),Ne=A(ue,ye,"conv4"),Ze=A(ye,we,"conv5"),Xe=A(we,ve,"conv6"),qe=A(ve,Ee,"conv7"),tt=d(Ee,5*e,1,"conv8");D={conv0:Te,conv1:Fe,conv2:Le,conv3:Me,conv4:Ne,conv5:Ze,conv6:Xe,conv7:qe,conv8:tt}}if(s().length!==0)throw new Error("weights remaing after extract: "+s().length);return{params:D,paramMappings:u}}function i0(n,t){var e=po(n,t);function r(u){var l=e(u+"/sub",1),d=e(u+"/truediv",1);return{sub:l,truediv:d}}function i(u){var l=e(u+"/filters",4),d=e(u+"/bias",1);return{filters:l,bias:d}}function o(u){var l=i(u+"/conv"),d=r(u+"/bn");return{conv:l,bn:d}}var s=Nu(e);return{extractConvParams:i,extractConvWithBatchNormParams:o,extractSeparableConvParams:s}}function o0(n,t){var e=[],r=i0(n,e),i=r.extractConvParams,o=r.extractConvWithBatchNormParams,s=r.extractSeparableConvParams,u;if(t.withSeparableConvs){var l=t.filterSizes&&t.filterSizes.length||9;u={conv0:t.isFirstLayerConv2d?i("conv0"):s("conv0"),conv1:s("conv1"),conv2:s("conv2"),conv3:s("conv3"),conv4:s("conv4"),conv5:s("conv5"),conv6:l>7?s("conv6"):void 0,conv7:l>8?s("conv7"):void 0,conv8:i("conv8")}}else u={conv0:o("conv0"),conv1:o("conv1"),conv2:o("conv2"),conv3:o("conv3"),conv4:o("conv4"),conv5:o("conv5"),conv6:o("conv6"),conv7:o("conv7"),conv8:i("conv8")};return Ji(n,e),{params:u,paramMappings:e}}var vd;(function(n){n[n.XS=224]="XS",n[n.SM=320]="SM",n[n.MD=416]="MD",n[n.LG=608]="LG"})(vd||(vd={}));var zu=function(){function n(t){var e=t===void 0?{}:t,r=e.inputSize,i=e.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=r||416,this._scoreThreshold=i||.5,typeof this._inputSize!="number"||this._inputSize%32!==0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if(typeof this._scoreThreshold!="number"||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(n.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),n}(),md=function(n){tr(t,n);function t(e){var r=n.call(this,"TinyYolov2")||this;return t0(e),r._config=e,r}return Object.defineProperty(t.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"withClassScores",{get:function(){return this.config.withClassScores||this.config.classes.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"boxEncodingSize",{get:function(){return 5+(this.withClassScores?this.config.classes.length:0)},enumerable:!0,configurable:!0}),t.prototype.runTinyYolov2=function(e,r){var i=ho(e,r.conv0);return i=Bn(i,[2,2],[2,2],"same"),i=ho(i,r.conv1),i=Bn(i,[2,2],[2,2],"same"),i=ho(i,r.conv2),i=Bn(i,[2,2],[2,2],"same"),i=ho(i,r.conv3),i=Bn(i,[2,2],[2,2],"same"),i=ho(i,r.conv4),i=Bn(i,[2,2],[2,2],"same"),i=ho(i,r.conv5),i=Bn(i,[2,2],[1,1],"same"),i=ho(i,r.conv6),i=ho(i,r.conv7),Ii(i,r.conv8,"valid",!1)},t.prototype.runMobilenet=function(e,r){var i=this.config.isFirstLayerConv2d?Wu(Ii(e,r.conv0,"valid",!1)):vo(e,r.conv0);return i=Bn(i,[2,2],[2,2],"same"),i=vo(i,r.conv1),i=Bn(i,[2,2],[2,2],"same"),i=vo(i,r.conv2),i=Bn(i,[2,2],[2,2],"same"),i=vo(i,r.conv3),i=Bn(i,[2,2],[2,2],"same"),i=vo(i,r.conv4),i=Bn(i,[2,2],[2,2],"same"),i=vo(i,r.conv5),i=Bn(i,[2,2],[1,1],"same"),i=r.conv6?vo(i,r.conv6):i,i=r.conv7?vo(i,r.conv7):i,Ii(i,r.conv8,"valid",!1)},t.prototype.forwardInput=function(e,r){var i=this,o=this.params;if(!o)throw new Error("TinyYolov2 - load model before inference");return gt(function(){var s=e.toBatchTensor(r,!1).toFloat();return s=i.config.meanRgb?ba(s,i.config.meanRgb):s,s=s.div(Tt(256)),i.config.withSeparableConvs?i.runMobilenet(s,o):i.runTinyYolov2(s,o)})},t.prototype.forward=function(e,r){return Ut(this,void 0,void 0,function(){var i;return Wt(this,function(o){switch(o.label){case 0:return i=this.forwardInput,[4,Mn(e)];case 1:return[4,i.apply(this,[o.sent(),r])];case 2:return[2,o.sent()]}})})},t.prototype.detect=function(e,r){return r===void 0&&(r={}),Ut(this,void 0,void 0,function(){var i,o,s,u,l,d,A,O,D,H,te,se,ae,ue,ye=this;return Wt(this,function(we){switch(we.label){case 0:return i=new zu(r),o=i.inputSize,s=i.scoreThreshold,[4,Mn(e)];case 1:return u=we.sent(),[4,this.forwardInput(u,o)];case 2:return l=we.sent(),d=gt(function(){return jn(l)[0].expandDims()}),A={width:u.getInputWidth(0),height:u.getInputHeight(0)},[4,this.extractBoxes(d,u.getReshapedInputDimensions(0),s)];case 3:return O=we.sent(),l.dispose(),d.dispose(),D=O.map(function(ve){return ve.box}),H=O.map(function(ve){return ve.score}),te=O.map(function(ve){return ve.classScore}),se=O.map(function(ve){return ye.config.classes[ve.label]}),ae=ya(D.map(function(ve){return ve.rescale(o)}),H,this.config.iouThreshold,!0),ue=ae.map(function(ve){return new _f(H[ve],te[ve],se[ve],D[ve],A)}),[2,ue]}})})},t.prototype.getDefaultModelName=function(){return""},t.prototype.extractParamsFromWeigthMap=function(e){return o0(e,this.config)},t.prototype.extractParams=function(e){var r=this.config.filterSizes||t.DEFAULT_FILTER_SIZES,i=r?r.length:void 0;if(i!==7&&i!==8&&i!==9)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+i+" filterSizes in config");return n0(e,this.config,this.boxEncodingSize,r)},t.prototype.extractBoxes=function(e,r,i){return Ut(this,void 0,void 0,function(){var o,s,u,l,d,A,O,D,H,te,se,ae,ue,ye,we,ve,Ee,Te,Fe,Le,Me,Ne,Ze,Xe,qe,tt,ct,bt,mt,ht=this;return Wt(this,function(At){switch(At.label){case 0:return o=r.width,s=r.height,u=Math.max(o,s),l=u/o,d=u/s,A=e.shape[1],O=this.config.anchors.length,D=gt(function(){var ft=e.reshape([A,A,O,ht.boxEncodingSize]),xt=ft.slice([0,0,0,0],[A,A,O,4]),St=ft.slice([0,0,0,4],[A,A,O,1]),Lt=ht.withClassScores?Vi(ft.slice([0,0,0,5],[A,A,O,ht.config.classes.length]),3):Tt(0);return[xt,St,Lt]}),H=D[0],te=D[1],se=D[2],ae=[],[4,te.array()];case 1:return ue=At.sent(),[4,H.array()];case 2:ye=At.sent(),we=0,At.label=3;case 3:if(!(we<A))return[3,12];ve=0,At.label=4;case 4:if(!(ve<A))return[3,11];Ee=0,At.label=5;case 5:return Ee<O?(Te=Cu(ue[we][ve][Ee][0]),!i||Te>i?(Fe=(ve+Cu(ye[we][ve][Ee][0]))/A*l,Le=(we+Cu(ye[we][ve][Ee][1]))/A*d,Me=Math.exp(ye[we][ve][Ee][2])*this.config.anchors[Ee].x/A*l,Ne=Math.exp(ye[we][ve][Ee][3])*this.config.anchors[Ee].y/A*d,Ze=Fe-Me/2,Xe=Le-Ne/2,qe={row:we,col:ve,anchor:Ee},this.withClassScores?[4,this.extractPredictedClass(se,qe)]:[3,7]):[3,9]):[3,10];case 6:return mt=At.sent(),[3,8];case 7:mt={classScore:1,label:0},At.label=8;case 8:tt=mt,ct=tt.classScore,bt=tt.label,ae.push(Gn({box:new qa(Ze,Xe,Ze+Me,Xe+Ne),score:Te,classScore:Te*ct,label:bt},qe)),At.label=9;case 9:return Ee++,[3,5];case 10:return ve++,[3,4];case 11:return we++,[3,3];case 12:return H.dispose(),te.dispose(),se.dispose(),[2,ae]}})})},t.prototype.extractPredictedClass=function(e,r){return Ut(this,void 0,void 0,function(){var i,o,s,u;return Wt(this,function(l){switch(l.label){case 0:return i=r.row,o=r.col,s=r.anchor,[4,e.array()];case 1:return u=l.sent(),[2,Array(this.config.classes.length).fill(0).map(function(d,A){return u[i][o][s][A]}).map(function(d,A){return{classScore:d,label:A}}).reduce(function(d,A){return d.classScore>A.classScore?d:A})]}})})},t.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],t}(Zi),a0=function(n){tr(t,n);function t(e){e===void 0&&(e=!0);var r=this,i=Object.assign({},{withSeparableConvs:e,iouThreshold:Zy,classes:["face"]},e?{anchors:Yy,meanRgb:$y}:{anchors:Jy,withClassScores:!0});return r=n.call(this,i)||this,r}return Object.defineProperty(t.prototype,"withSeparableConvs",{get:function(){return this.config.withSeparableConvs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,r){return Ut(this,void 0,void 0,function(){var i;return Wt(this,function(o){switch(o.label){case 0:return[4,this.detect(e,r)];case 1:return i=o.sent(),[2,i.map(function(s){return new ui(s.score,s.relativeBox,{width:s.imageWidth,height:s.imageHeight})})]}})})},t.prototype.getDefaultModelName=function(){return this.withSeparableConvs?e0:qy},t.prototype.extractParamsFromWeigthMap=function(e){return n.prototype.extractParamsFromWeigthMap.call(this,e)},t}(md);function Qb(n,t){t===void 0&&(t=!0);var e=new TinyYolov2(t);return e.extractWeights(n),e}var gd=function(n){tr(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._name="TinyFaceDetectorOptions",e}return t}(zu),xa=function(){function n(){}return n.prototype.then=function(t){return Ut(this,void 0,void 0,function(){var e;return Wt(this,function(r){switch(r.label){case 0:return e=t,[4,this.run()];case 1:return[2,e.apply(void 0,[r.sent()])]}})})},n.prototype.run=function(){return Ut(this,void 0,void 0,function(){return Wt(this,function(t){throw new Error("ComposableTask - run is not implemented")})})},n}();function yd(n,t){var e={descriptor:t};return Object.assign({},n,e)}function cs(n,t,e,r,i){return i===void 0&&(i=function(o){var s=o.alignedRect;return s}),Ut(this,void 0,void 0,function(){var o,s,u,l,d;return Wt(this,function(A){switch(A.label){case 0:return o=n.map(function(O){return Fu(O)?i(O):O.detection}),u=r,u?[3,5]:t instanceof Xt?[4,Du(t,o)]:[3,2];case 1:return l=A.sent(),[3,4];case 2:return[4,ju(t,o)];case 3:l=A.sent(),A.label=4;case 4:u=l,A.label=5;case 5:return s=u,[4,e(s)];case 6:return d=A.sent(),s.forEach(function(O){return O instanceof Xt&&O.dispose()}),[2,d]}})})}function Hu(n,t,e,r,i){return Ut(this,void 0,void 0,function(){var o=this;return Wt(this,function(s){return[2,cs([n],t,function(u){return Ut(o,void 0,void 0,function(){return Wt(this,function(l){return[2,e(u[0])]})})},r,i)]})})}function s0(n){return gt(function(){return ai(jn(n,3).reverse(),3)})}var fs=2,ds=12;function u0(n,t){var e=is(n,t),r=Bu(n,t);function i(d,A){var O=Sn(n(d));return t.push({paramPath:A}),O}function o(d,A,O){O===void 0&&(O=!1);var D=e(d[0],d[1],3,A+"/conv1"),H=i(d[1],A+"/prelu1_alpha"),te=e(d[1],d[2],3,A+"/conv2"),se=i(d[2],A+"/prelu2_alpha"),ae=e(d[2],d[3],O?2:3,A+"/conv3"),ue=i(d[3],A+"/prelu3_alpha");return{conv1:D,prelu1_alpha:H,conv2:te,prelu2_alpha:se,conv3:ae,prelu3_alpha:ue}}function s(){var d=o([3,10,16,32],"pnet"),A=e(32,2,1,"pnet/conv4_1"),O=e(32,4,1,"pnet/conv4_2");return Gn(Gn({},d),{conv4_1:A,conv4_2:O})}function u(){var d=o([3,28,48,64],"rnet",!0),A=r(576,128,"rnet/fc1"),O=i(128,"rnet/prelu4_alpha"),D=r(128,2,"rnet/fc2_1"),H=r(128,4,"rnet/fc2_2");return Gn(Gn({},d),{fc1:A,prelu4_alpha:O,fc2_1:D,fc2_2:H})}function l(){var d=o([3,32,64,64],"onet"),A=e(64,128,2,"onet/conv4"),O=i(128,"onet/prelu4_alpha"),D=r(1152,256,"onet/fc1"),H=i(256,"onet/prelu5_alpha"),te=r(256,2,"onet/fc2_1"),se=r(256,4,"onet/fc2_2"),ae=r(256,10,"onet/fc2_3");return Gn(Gn({},d),{conv4:A,prelu4_alpha:O,fc1:D,prelu5_alpha:H,fc2_1:te,fc2_2:se,fc2_3:ae})}return{extractPNetParams:s,extractRNetParams:u,extractONetParams:l}}function l0(n){var t=Yi(n),e=t.extractWeights,r=t.getRemainingWeights,i=[],o=u0(e,i),s=o.extractPNetParams,u=o.extractRNetParams,l=o.extractONetParams,d=s(),A=u(),O=l();if(r().length!==0)throw new Error("weights remaing after extract: "+r().length);return{params:{pnet:d,rnet:A,onet:O},paramMappings:i}}function c0(n,t){var e=po(n,t);function r(A){var O=e(A+"/weights",4,A+"/filters"),D=e(A+"/bias",1);return{filters:O,bias:D}}function i(A){var O=e(A+"/weights",2),D=e(A+"/bias",1);return{weights:O,bias:D}}function o(A){return e(A,1)}function s(A){var O=r(A+"/conv1"),D=o(A+"/prelu1_alpha"),H=r(A+"/conv2"),te=o(A+"/prelu2_alpha"),se=r(A+"/conv3"),ae=o(A+"/prelu3_alpha");return{conv1:O,prelu1_alpha:D,conv2:H,prelu2_alpha:te,conv3:se,prelu3_alpha:ae}}function u(){var A=s("pnet"),O=r("pnet/conv4_1"),D=r("pnet/conv4_2");return Gn(Gn({},A),{conv4_1:O,conv4_2:D})}function l(){var A=s("rnet"),O=i("rnet/fc1"),D=o("rnet/prelu4_alpha"),H=i("rnet/fc2_1"),te=i("rnet/fc2_2");return Gn(Gn({},A),{fc1:O,prelu4_alpha:D,fc2_1:H,fc2_2:te})}function d(){var A=s("onet"),O=r("onet/conv4"),D=o("onet/prelu4_alpha"),H=i("onet/fc1"),te=o("onet/prelu5_alpha"),se=i("onet/fc2_1"),ae=i("onet/fc2_2"),ue=i("onet/fc2_3");return Gn(Gn({},A),{conv4:O,prelu4_alpha:D,fc1:H,prelu5_alpha:te,fc2_1:se,fc2_2:ae,fc2_3:ue})}return{extractPNetParams:u,extractRNetParams:l,extractONetParams:d}}function f0(n){var t=[],e=c0(n,t),r=e.extractPNetParams,i=e.extractRNetParams,o=e.extractONetParams,s=r(),u=i(),l=o();return Ji(n,t),{params:{pnet:s,rnet:u,onet:l},paramMappings:t}}function Vu(n,t){var e=t[0],r=t[1];return{height:Math.floor(e*n),width:Math.floor(r*n)}}function d0(n,t,e){for(var r=e[0],i=e[1],o=ds/n,s=[],u=Math.min(r,i)*o,l=0;u>=12;)s.push(o*Math.pow(t,l)),u=u*t,l+=1;return s}var Gu=function(n){tr(t,n);function t(e,r,i,o){return n.call(this,{left:e,top:r,right:i,bottom:o},!0)||this}return t}(Pi);function bd(n){return gt(function(){return Hn(Dn(n,Tt(127.5)),Tt(.0078125))})}function Yo(n,t){return gt(function(){return dr(un(n),Hn(t,La(un(La(n)))))})}function Qu(n,t,e){return e===void 0&&(e=!1),gt(function(){var r=Ii(n,t.conv1,"valid");return r=Yo(r,t.prelu1_alpha),r=Bn(r,e?[2,2]:[3,3],[2,2],"same"),r=Ii(r,t.conv2,"valid"),r=Yo(r,t.prelu2_alpha),r=e?r:Bn(r,[3,3],[2,2],"valid"),r=Ii(r,t.conv3,"valid"),r=Yo(r,t.prelu3_alpha),r})}function p0(n,t){return gt(function(){var e=Qu(n,t,!0),r=Ii(e,t.conv4_1,"valid"),i=gi(Qa(r,3),3),o=Vi(Dn(r,i),3),s=Ii(e,t.conv4_2,"valid");return{prob:o,regions:s}})}function h0(n,t){return gt(function(){var e=Vu(t,n.shape.slice(1)),r=e.height,i=e.width,o=Ys.resizeBilinear(n,[r,i]),s=bd(o);return ao(s,[0,2,1,3])})}function v0(n,t,e,r){for(var i=[],o=n.arraySync(),s=0;s<n.shape[0];s++)for(var u=0;u<n.shape[1];u++)o[s][u]>=r&&i.push(new Rr(u,s));var l=i.map(function(d){var A=new qa(Math.round((d.y*fs+1)/e),Math.round((d.x*fs+1)/e),Math.round((d.y*fs+ds)/e),Math.round((d.x*fs+ds)/e)),O=o[d.y][d.x],D=t.arraySync(),H=new Gu(D[d.y][d.x][0],D[d.y][d.x][1],D[d.y][d.x][2],D[d.y][d.x][3]);return{cell:A,score:O,region:H}});return l}function m0(n,t,e,r,i){i.stage1=[];var o=t.map(function(D){return gt(function(){var H={scale:D},te=h0(n,D),se=Date.now(),ae=p0(te,r),ue=ae.prob,ye=ae.regions;H.pnet=Date.now()-se;var we=jn(jn(ue,3)[1])[0],ve=jn(ye)[0];return{scoresTensor:we,regionsTensor:ve,scale:D,statsForScale:H}})}),s=o.map(function(D){var H=D.scoresTensor,te=D.regionsTensor,se=D.scale,ae=D.statsForScale,ue=v0(H,te,se,e);if(H.dispose(),te.dispose(),!ue.length)return i.stage1.push(ae),[];var ye=Date.now(),we=ya(ue.map(function(ve){return ve.cell}),ue.map(function(ve){return ve.score}),.5);return ae.nms=Date.now()-ye,ae.numBoxes=we.length,i.stage1.push(ae),we.map(function(ve){return ue[ve]})}),u=s.reduce(function(D,H){return D.concat(H)},[]),l=[],d=[];if(u.length>0){var A=Date.now(),O=ya(u.map(function(D){return D.cell}),u.map(function(D){return D.score}),.7);i.stage1_nms=Date.now()-A,d=O.map(function(D){return u[D].score}),l=O.map(function(D){return u[D]}).map(function(D){var H=D.cell,te=D.region;return new qa(H.left+te.left*H.width,H.top+te.top*H.height,H.right+te.right*H.width,H.bottom+te.bottom*H.height).toSquare().round()})}return{boxes:l,scores:d}}function wd(n,t,e){var r=e.width,i=e.height;return Ut(this,void 0,void 0,function(){var o,s,u,l=this;return Wt(this,function(d){switch(d.label){case 0:return o=Bi(n),[4,Promise.all(t.map(function(A){return Ut(l,void 0,void 0,function(){var O,D,H,te,se,ae,ue,ye;return Wt(this,function(we){return O=A.padAtBorders(n.height,n.width),D=O.y,H=O.ey,te=O.x,se=O.ex,ae=te-1,ue=D-1,ye=o.getImageData(ae,ue,se-ae,H-ue),[2,Qn.isNodejs()?ku(ye):createImageBitmap(ye)]})})}))];case 1:return s=d.sent(),u=[],s.forEach(function(A){var O=ts({width:r,height:i}),D=Bi(O);D.drawImage(A,0,0,r,i);for(var H=D.getImageData(0,0,r,i).data,te=[],se=0;se<H.length;se+=4)te.push(H[se+2]),te.push(H[se+1]),te.push(H[se]);u.push(te)}),[2,u.map(function(A){var O=gt(function(){var D=ao(ei(A,[1,r,i,3]),[0,2,1,3]).toFloat();return bd(D)});return O})]}})})}function g0(n,t){return gt(function(){var e=Qu(n,t),r=Ei(e,[e.shape[0],t.fc1.weights.shape[0]]),i=Mi(r,t.fc1),o=Yo(i,t.prelu4_alpha),s=Mi(o,t.fc2_1),u=gi(Qa(s,1),1),l=Vi(Dn(s,u),1),d=Mi(o,t.fc2_2),A=jn(l,1)[1];return{scores:A,regions:d}})}function y0(n,t,e,r,i){return Ut(this,void 0,void 0,function(){var o,s,u,l,d,A,O,D,H,te,se,ae,ue,ye;return Wt(this,function(we){switch(we.label){case 0:return o=Date.now(),[4,wd(n,t,{width:24,height:24})];case 1:return s=we.sent(),i.stage2_extractImagePatches=Date.now()-o,o=Date.now(),u=s.map(function(ve){var Ee=g0(ve,r);return ve.dispose(),Ee}),i.stage2_rnet=Date.now()-o,l=u.length>1?kn(u.map(function(ve){return ve.scores})):u[0].scores,O=(A=Array).from,[4,l.data()];case 2:return d=O.apply(A,[we.sent()]),l.dispose(),D=d.map(function(ve,Ee){return{score:ve,idx:Ee}}).filter(function(ve){return ve.score>e}).map(function(ve){var Ee=ve.idx;return Ee}),H=D.map(function(ve){return t[ve]}),te=D.map(function(ve){return d[ve]}),se=[],ae=[],H.length>0&&(o=Date.now(),ue=ya(H,te,.7),i.stage2_nms=Date.now()-o,ye=ue.map(function(ve){var Ee=u[D[ve]].regions.arraySync();return new Gu(Ee[0][0],Ee[0][1],Ee[0][2],Ee[0][3])}),ae=ue.map(function(ve){return te[ve]}),se=ue.map(function(ve,Ee){return H[ve].calibrate(ye[Ee])})),u.forEach(function(ve){ve.regions.dispose(),ve.scores.dispose()}),[2,{boxes:se,scores:ae}]}})})}function b0(n,t){return gt(function(){var e=Qu(n,t);e=Bn(e,[2,2],[2,2],"same"),e=Ii(e,t.conv4,"valid"),e=Yo(e,t.prelu4_alpha);var r=Ei(e,[e.shape[0],t.fc1.weights.shape[0]]),i=Mi(r,t.fc1),o=Yo(i,t.prelu5_alpha),s=Mi(o,t.fc2_1),u=gi(Qa(s,1),1),l=Vi(Dn(s,u),1),d=Mi(o,t.fc2_2),A=Mi(o,t.fc2_3),O=jn(l,1)[1];return{scores:O,regions:d,points:A}})}function w0(n,t,e,r,i){return Ut(this,void 0,void 0,function(){var o,s,u,l,d,A,O,D,H,te,se,ae,ue,ye,we;return Wt(this,function(ve){switch(ve.label){case 0:return o=Date.now(),[4,wd(n,t,{width:48,height:48})];case 1:return s=ve.sent(),i.stage3_extractImagePatches=Date.now()-o,o=Date.now(),u=s.map(function(Ee){var Te=b0(Ee,r);return Ee.dispose(),Te}),i.stage3_onet=Date.now()-o,l=u.length>1?kn(u.map(function(Ee){return Ee.scores})):u[0].scores,O=(A=Array).from,[4,l.data()];case 2:return d=O.apply(A,[ve.sent()]),l.dispose(),D=d.map(function(Ee,Te){return{score:Ee,idx:Te}}).filter(function(Ee){return Ee.score>e}).map(function(Ee){var Te=Ee.idx;return Te}),H=D.map(function(Ee){var Te=u[Ee].regions.arraySync();return new Gu(Te[0][0],Te[0][1],Te[0][2],Te[0][3])}),te=D.map(function(Ee,Te){return t[Ee].calibrate(H[Te])}),se=D.map(function(Ee){return d[Ee]}),ae=[],ue=[],ye=[],te.length>0&&(o=Date.now(),we=ya(te,se,.7,!1),i.stage3_nms=Date.now()-o,ae=we.map(function(Ee){return te[Ee]}),ue=we.map(function(Ee){return se[Ee]}),ye=we.map(function(Ee,Te){return Array(5).fill(0).map(function(Fe,Le){var Me=u[Ee].points.arraySync();return new Rr(Me[0][Le]*(ae[Te].width+1)+ae[Te].left,Me[0][Le+5]*(ae[Te].height+1)+ae[Te].top)})})),u.forEach(function(Ee){Ee.regions.dispose(),Ee.scores.dispose(),Ee.points.dispose()}),[2,{boxes:ae,scores:ue,points:ye}]}})})}var A0=function(n){tr(t,n);function t(){return n.call(this,"Mtcnn")||this}return t.prototype.load=function(e){return Ut(this,void 0,void 0,function(){return Wt(this,function(r){return console.warn("mtcnn is deprecated and will be removed soon"),[2,n.prototype.load.call(this,e)]})})},t.prototype.loadFromDisk=function(e){return Ut(this,void 0,void 0,function(){return Wt(this,function(r){return console.warn("mtcnn is deprecated and will be removed soon"),[2,n.prototype.loadFromDisk.call(this,e)]})})},t.prototype.forwardInput=function(e,r){return r===void 0&&(r={}),Ut(this,void 0,void 0,function(){var i,o,s,u,l,d,A,O,D,H,te,se,ae,ue,ye,we,ve,Ee,Te,Fe,Le;return Wt(this,function(Me){switch(Me.label){case 0:if(i=this.params,!i)throw new Error("Mtcnn - load model before inference");if(o=e.canvases[0],!o)throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return s={},u=Date.now(),l=gt(function(){return s0(gi(mu.fromPixels(o)).toFloat())}),d=function(Ne){return l.dispose(),s.total=Date.now()-u,Ne},A=l.shape.slice(1),O=A[0],D=A[1],H=new pd(r),te=H.minFaceSize,se=H.scaleFactor,ae=H.maxNumScales,ue=H.scoreThresholds,ye=H.scaleSteps,we=(ye||d0(te,se,[O,D])).filter(function(Ne){var Ze=Vu(Ne,[O,D]);return Math.min(Ze.width,Ze.height)>ds}).slice(0,ae),s.scales=we,s.pyramid=we.map(function(Ne){return Vu(Ne,[O,D])}),ve=Date.now(),[4,m0(l,we,ue[0],i.pnet,s)];case 1:return Ee=Me.sent(),s.total_stage1=Date.now()-ve,Ee.boxes.length?(s.stage2_numInputBoxes=Ee.boxes.length,ve=Date.now(),[4,y0(o,Ee.boxes,ue[1],i.rnet,s)]):[2,d({results:[],stats:s})];case 2:return Te=Me.sent(),s.total_stage2=Date.now()-ve,Te.boxes.length?(s.stage3_numInputBoxes=Te.boxes.length,ve=Date.now(),[4,w0(o,Te.boxes,ue[2],i.onet,s)]):[2,d({results:[],stats:s})];case 3:return Fe=Me.sent(),s.total_stage3=Date.now()-ve,Le=Fe.boxes.map(function(Ne,Ze){return os(Aa({},new ui(Fe.scores[Ze],new Su(Ne.left/D,Ne.top/O,Ne.width/D,Ne.height/O),{height:O,width:D})),new Kg(Fe.points[Ze].map(function(Xe){return Xe.sub(new Rr(Ne.left,Ne.top)).div(new Rr(Ne.width,Ne.height))}),{width:Ne.width,height:Ne.height}))}),[2,d({results:Le,stats:s})]}})})},t.prototype.forward=function(e,r){return r===void 0&&(r={}),Ut(this,void 0,void 0,function(){var i;return Wt(this,function(o){switch(o.label){case 0:return i=this.forwardInput,[4,Mn(e)];case 1:return[4,i.apply(this,[o.sent(),r])];case 2:return[2,o.sent().results]}})})},t.prototype.forwardWithStats=function(e,r){return r===void 0&&(r={}),Ut(this,void 0,void 0,function(){var i;return Wt(this,function(o){switch(o.label){case 0:return i=this.forwardInput,[4,Mn(e)];case 1:return[2,i.apply(this,[o.sent(),r])]}})})},t.prototype.getDefaultModelName=function(){return"mtcnn_model"},t.prototype.extractParamsFromWeigthMap=function(e){return f0(e)},t.prototype.extractParams=function(e){return l0(e)},t}(Zi),x0=.4,E0=[new Rr(1.603231,2.094468),new Rr(6.041143,7.080126),new Rr(2.882459,3.518061),new Rr(4.266906,5.178857),new Rr(9.041765,10.66308)],C0=[117.001,114.697,97.404],S0=function(n){tr(t,n);function t(){var e=this,r={withSeparableConvs:!0,iouThreshold:x0,classes:["face"],anchors:E0,meanRgb:C0,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return e=n.call(this,r)||this,e}return Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,r){return Ut(this,void 0,void 0,function(){var i;return Wt(this,function(o){switch(o.label){case 0:return[4,this.detect(e,r)];case 1:return i=o.sent(),[2,i.map(function(s){return new ui(s.score,s.relativeBox,{width:s.imageWidth,height:s.imageHeight})})]}})})},t.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},t.prototype.extractParamsFromWeigthMap=function(e){return n.prototype.extractParamsFromWeigthMap.call(this,e)},t}(md),Br={ssdMobilenetv1:new hd,tinyFaceDetector:new S0,tinyYolov2:new a0,mtcnn:new A0,faceLandmark68Net:new ld,faceLandmark68TinyNet:new Iy,faceRecognitionNet:new Py,faceExpressionNet:new cy,ageGenderNet:new xy},Xb=function(n,t){return Br.ssdMobilenetv1.locateFaces(n,t)},Kb=function(n,t){return Br.tinyFaceDetector.locateFaces(n,t)},Zb=function(n,t){return Br.tinyYolov2.locateFaces(n,t)},Jb=function(n,t){return Br.mtcnn.forward(n,t)},Yb=function(n){return Br.faceLandmark68Net.detectLandmarks(n)},$b=function(n){return Br.faceLandmark68TinyNet.detectLandmarks(n)},qb=function(n){return Br.faceRecognitionNet.computeFaceDescriptor(n)},e1=function(n){return Br.faceExpressionNet.predictExpressions(n)},t1=function(n){return Br.ageGenderNet.predictAgeAndGender(n)},r1=function(n){return Br.ssdMobilenetv1.load(n)},I0=function(n){return Br.tinyFaceDetector.load(n)},n1=function(n){return Br.mtcnn.load(n)},i1=function(n){return Br.tinyYolov2.load(n)},T0=function(n){return Br.faceLandmark68Net.load(n)},o1=function(n){return Br.faceLandmark68TinyNet.load(n)},R0=function(n){return Br.faceRecognitionNet.load(n)},a1=function(n){return Br.faceExpressionNet.load(n)},s1=function(n){return Br.ageGenderNet.load(n)},u1=null,l1=null,c1=null;function f1(n){return typeof n.age=="number"}function Ad(n,t){var e={age:t};return Object.assign({},n,e)}var xd=function(n){tr(t,n);function t(e,r,i){var o=n.call(this)||this;return o.parentTask=e,o.input=r,o.extractedFaces=i,o}return t}(xa),Xu=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Ut(this,void 0,void 0,function(){var e,r,i=this;return Wt(this,function(o){switch(o.label){case 0:return[4,this.parentTask];case 1:return e=o.sent(),[4,cs(e,this.input,function(s){return Ut(i,void 0,void 0,function(){return Wt(this,function(u){switch(u.label){case 0:return[4,Promise.all(s.map(function(l){return Br.faceExpressionNet.predictExpressions(l)}))];case 1:return[2,u.sent()]}})})},this.extractedFaces)];case 2:return r=o.sent(),[2,e.map(function(s,u){return ad(s,r[u])})]}})})},t.prototype.withAgeAndGender=function(){return new Yu(this,this.input)},t}(xd),Ku=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Ut(this,void 0,void 0,function(){var e,r;return Wt(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),e?[4,Hu(e,this.input,function(o){return Br.faceExpressionNet.predictExpressions(o)},this.extractedFaces)]:[2];case 2:return r=i.sent(),[2,ad(e,r)]}})})},t.prototype.withAgeAndGender=function(){return new $u(this,this.input)},t}(xd),Zu=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withAgeAndGender=function(){return new qu(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tl(this,this.input)},t}(Xu),Ju=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withAgeAndGender=function(){return new el(this,this.input)},t.prototype.withFaceDescriptor=function(){return new rl(this,this.input)},t}(Ku),Ed=function(n){tr(t,n);function t(e,r,i){var o=n.call(this)||this;return o.parentTask=e,o.input=r,o.extractedFaces=i,o}return t}(xa),Yu=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Ut(this,void 0,void 0,function(){var e,r,i=this;return Wt(this,function(o){switch(o.label){case 0:return[4,this.parentTask];case 1:return e=o.sent(),[4,cs(e,this.input,function(s){return Ut(i,void 0,void 0,function(){return Wt(this,function(u){switch(u.label){case 0:return[4,Promise.all(s.map(function(l){return Br.ageGenderNet.predictAgeAndGender(l)}))];case 1:return[2,u.sent()]}})})},this.extractedFaces)];case 2:return r=o.sent(),[2,e.map(function(s,u){var l=r[u],d=l.age,A=l.gender,O=l.genderProbability;return Ad(dd(s,A,O),d)})]}})})},t.prototype.withFaceExpressions=function(){return new Xu(this,this.input)},t}(Ed),$u=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Ut(this,void 0,void 0,function(){var e,r,i,o,s;return Wt(this,function(u){switch(u.label){case 0:return[4,this.parentTask];case 1:return e=u.sent(),e?[4,Hu(e,this.input,function(l){return Br.ageGenderNet.predictAgeAndGender(l)},this.extractedFaces)]:[2];case 2:return r=u.sent(),i=r.age,o=r.gender,s=r.genderProbability,[2,Ad(dd(e,o,s),i)]}})})},t.prototype.withFaceExpressions=function(){return new Ku(this,this.input)},t}(Ed),qu=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withFaceExpressions=function(){return new Zu(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tl(this,this.input)},t}(Yu),el=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withFaceExpressions=function(){return new Ju(this,this.input)},t.prototype.withFaceDescriptor=function(){return new rl(this,this.input)},t}($u),Cd=function(n){tr(t,n);function t(e,r){var i=n.call(this)||this;return i.parentTask=e,i.input=r,i}return t}(xa),tl=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Ut(this,void 0,void 0,function(){var e,r;return Wt(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),[4,cs(e,this.input,function(o){return Promise.all(o.map(function(s){return Br.faceRecognitionNet.computeFaceDescriptor(s)}))},null,function(o){return o.landmarks.align(null,{useDlibAlignment:!0})})];case 2:return r=i.sent(),[2,r.map(function(o,s){return yd(e[s],o)})]}})})},t.prototype.withFaceExpressions=function(){return new Zu(this,this.input)},t.prototype.withAgeAndGender=function(){return new qu(this,this.input)},t}(Cd),rl=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Ut(this,void 0,void 0,function(){var e,r;return Wt(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),e?[4,Hu(e,this.input,function(o){return Br.faceRecognitionNet.computeFaceDescriptor(o)},null,function(o){return o.landmarks.align(null,{useDlibAlignment:!0})})]:[2];case 2:return r=i.sent(),[2,yd(e,r)]}})})},t.prototype.withFaceExpressions=function(){return new Ju(this,this.input)},t.prototype.withAgeAndGender=function(){return new el(this,this.input)},t}(Cd),Sd=function(n){tr(t,n);function t(e,r,i){var o=n.call(this)||this;return o.parentTask=e,o.input=r,o.useTinyLandmarkNet=i,o}return Object.defineProperty(t.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?Br.faceLandmark68TinyNet:Br.faceLandmark68Net},enumerable:!0,configurable:!0}),t}(xa),O0=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Ut(this,void 0,void 0,function(){var e,r,i,o,s,u=this;return Wt(this,function(l){switch(l.label){case 0:return[4,this.parentTask];case 1:return e=l.sent(),r=e.map(function(d){return d.detection}),this.input instanceof Xt?[4,Du(this.input,r)]:[3,3];case 2:return o=l.sent(),[3,5];case 3:return[4,ju(this.input,r)];case 4:o=l.sent(),l.label=5;case 5:return i=o,[4,Promise.all(i.map(function(d){return u.landmarkNet.detectLandmarks(d)}))];case 6:return s=l.sent(),i.forEach(function(d){return d instanceof Xt&&d.dispose()}),[2,e.map(function(d,A){return os(d,s[A])})]}})})},t.prototype.withFaceExpressions=function(){return new Zu(this,this.input)},t.prototype.withAgeAndGender=function(){return new qu(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tl(this,this.input)},t}(Sd),k0=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Ut(this,void 0,void 0,function(){var e,r,i,o,s;return Wt(this,function(u){switch(u.label){case 0:return[4,this.parentTask];case 1:return e=u.sent(),e?(r=e.detection,this.input instanceof Xt?[4,Du(this.input,[r])]:[3,3]):[2];case 2:return o=u.sent(),[3,5];case 3:return[4,ju(this.input,[r])];case 4:o=u.sent(),u.label=5;case 5:return i=o,[4,this.landmarkNet.detectLandmarks(i[0])];case 6:return s=u.sent(),i.forEach(function(l){return l instanceof Xt&&l.dispose()}),[2,os(e,s)]}})})},t.prototype.withFaceExpressions=function(){return new Ju(this,this.input)},t.prototype.withAgeAndGender=function(){return new el(this,this.input)},t.prototype.withFaceDescriptor=function(){return new rl(this,this.input)},t}(Sd),Id=function(n){tr(t,n);function t(e,r){r===void 0&&(r=new us);var i=n.call(this)||this;return i.input=e,i.options=r,i}return t}(xa),j0=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Ut(this,void 0,void 0,function(){var e,r,i,o;return Wt(this,function(s){switch(s.label){case 0:return e=this,r=e.input,i=e.options,i instanceof pd?[4,Br.mtcnn.forward(r,i)]:[3,2];case 1:return[2,s.sent().map(function(u){return u.detection})];case 2:if(o=i instanceof gd?function(u){return Br.tinyFaceDetector.locateFaces(u,i)}:i instanceof us?function(u){return Br.ssdMobilenetv1.locateFaces(u,i)}:i instanceof zu?function(u){return Br.tinyYolov2.locateFaces(u,i)}:null,!o)throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,o(r)]}})})},t.prototype.runAndExtendWithFaceDetections=function(){var e=this;return new Promise(function(r){return Ut(e,void 0,void 0,function(){var i;return Wt(this,function(o){switch(o.label){case 0:return[4,this.run()];case 1:return i=o.sent(),[2,r(i.map(function(s){return Aa({},s)}))]}})})})},t.prototype.withFaceLandmarks=function(e){return e===void 0&&(e=!1),new O0(this.runAndExtendWithFaceDetections(),this.input,e)},t.prototype.withFaceExpressions=function(){return new Xu(this.runAndExtendWithFaceDetections(),this.input)},t.prototype.withAgeAndGender=function(){return new Yu(this.runAndExtendWithFaceDetections(),this.input)},t}(Id),D0=function(n){tr(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Ut(this,void 0,void 0,function(){var e,r;return Wt(this,function(i){switch(i.label){case 0:return[4,new j0(this.input,this.options)];case 1:return e=i.sent(),r=e[0],e.forEach(function(o){o.score>r.score&&(r=o)}),[2,r]}})})},t.prototype.runAndExtendWithFaceDetection=function(){var e=this;return new Promise(function(r){return Ut(e,void 0,void 0,function(){var i;return Wt(this,function(o){switch(o.label){case 0:return[4,this.run()];case 1:return i=o.sent(),[2,r(i?Aa({},i):void 0)]}})})})},t.prototype.withFaceLandmarks=function(e){return e===void 0&&(e=!1),new k0(this.runAndExtendWithFaceDetection(),this.input,e)},t.prototype.withFaceExpressions=function(){return new Ku(this.runAndExtendWithFaceDetection(),this.input)},t.prototype.withAgeAndGender=function(){return new $u(this.runAndExtendWithFaceDetection(),this.input)},t}(Id);function nl(n,t){return t===void 0&&(t=new us),new D0(n,t)}function d1(n,t){return t===void 0&&(t=new SsdMobilenetv1Options),new DetectAllFacesTask(n,t)}function p1(n,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesSsdMobilenetv1 is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new SsdMobilenetv1Options(t?{minConfidence:t}:{})).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}function h1(n,t){return t===void 0&&(t={}),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesTinyYolov2 is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new TinyYolov2Options(t)).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}function v1(n,t){return t===void 0&&(t={}),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesMtcnn is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new MtcnnOptions(t)).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}var m1=null;function P0(n,t){if(n.length!==t.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var e=Array.from(n),r=Array.from(t);return Math.sqrt(e.map(function(i,o){return i-r[o]}).reduce(function(i,o){return i+Math.pow(o,2)},0))}var B0=function(){function n(t,e){e===void 0&&(e=.6),this._distanceThreshold=e;var r=Array.isArray(t)?t:[t];if(!r.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var i=1,o=function(){return"person "+i++};this._labeledDescriptors=r.map(function(s){if(s instanceof es)return s;if(s instanceof Float32Array)return new es(o(),[s]);if(s.descriptor&&s.descriptor instanceof Float32Array)return new es(o(),[s.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array | Array<LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array>")})}return Object.defineProperty(n.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),n.prototype.computeMeanDistance=function(t,e){return e.map(function(r){return P0(r,t)}).reduce(function(r,i){return r+i},0)/(e.length||1)},n.prototype.matchDescriptor=function(t){var e=this;return this.labeledDescriptors.map(function(r){var i=r.descriptors,o=r.label;return new Lf(o,e.computeMeanDistance(t,i))}).reduce(function(r,i){return r.distance<i.distance?r:i})},n.prototype.findBestMatch=function(t){var e=this.matchDescriptor(t);return e.distance<this.distanceThreshold?e:new Lf("unknown",e.distance)},n.prototype.toJSON=function(){return{distanceThreshold:this.distanceThreshold,labeledDescriptors:this.labeledDescriptors.map(function(t){return t.toJSON()})}},n.fromJSON=function(t){var e=t.labeledDescriptors.map(function(r){return es.fromJSON(r)});return new n(e,t.distanceThreshold)},n}();function g1(n){var t=new Mtcnn;return t.extractWeights(n),t}function y1(n){var t=new TinyFaceDetector;return t.extractWeights(n),t}function Td(n,t){var e=new jo(t.width,t.height),r=e.width,i=e.height;if(r<=0||i<=0)throw new Error("resizeResults - invalid dimensions: "+JSON.stringify({width:r,height:i}));if(Array.isArray(n))return n.map(function(u){return Td(u,{width:r,height:i})});if(Fu(n)){var o=n.detection.forSize(r,i),s=n.unshiftedLandmarks.forSize(o.box.width,o.box.height);return os(Aa(n,o),s)}return wa(n)?Aa(n,n.detection.forSize(r,i)):n instanceof Zo||n instanceof ui?n.forSize(r,i):n}var M0=Se(71418),N0=Se(47257),_0=Se.n(N0),F0=Se(1012),L0=Se(81939),U0=Se(99064),W0={wrp:"wrp___x6ffm"},$o=Se(59301),Ti=(n,t,e)=>new Promise((r,i)=>{var o=l=>{try{u(e.next(l))}catch(d){i(d)}},s=l=>{try{u(e.throw(l))}catch(d){i(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);u((e=e.apply(n,t)).next())});const z0=function(t,e){const r=t.split(","),i=r[0].match(/:(.*?);/)[1],o=atob(r[1]);let s=o.length;const u=new Uint8Array(s);for(;s--;)u[s]=o.charCodeAt(s);return new Blob([u],{type:i})},H0=n=>Ti(void 0,null,function*(){return new Promise((t,e)=>{let r=new Image;(n==null?void 0:n.indexOf("educoder.net"))>-1?r.setAttribute("crossOrigin","educoder.net"):r.setAttribute("crossOrigin","aliyuncs.com"),r.onload=function(){let i=document.createElement("canvas");i.width=this.naturalWidth,i.height=this.naturalHeight,i.getContext("2d").drawImage(r,0,0);let o=i.toDataURL("image/png");t(o)},r.src=n,r.onerror=()=>{e(new Error("\u56FE\u7247\u6D41\u5F02\u5E38")),j.ZP.error("\u60A8\u7684\u8EAB\u4EFD\u7167\u7247\u5F02\u5E38\uFF0C\u8BF7\u62CD\u7167\u540E\u63D0\u4EA4\u81F3\u4EBA\u5DE5\u5BA1\u6838")}})});var V0=(0,Ae.forwardRef)(({outputResult:n,identity_url:t,onCameraReady:e,defaultOpen:r},i)=>{const o=(0,Ye.useParams)(),s=(0,Ae.useRef)(),u=(0,Ae.useRef)(),l=(0,Ae.useRef)(),d=(0,Ae.useRef)(!1);let A=(0,Ae.useRef)();const[O,D]=(0,Ae.useState)(!0),[H,te]=(0,Ae.useState)(""),[se,ae]=(0,Ae.useState)(""),ue=(0,Ae.useRef)(!1),ye=(0,Ae.useRef)(""),[we]=(0,Ae.useState)(!0),ve=.7,Ee=224,Te="\u5BA1\u6838\u5931\u8D25",Fe=(0,Ae.useMemo)(()=>new gd({inputSize:Ee,scoreThreshold:ve}),[]),Le=()=>Ti(void 0,null,function*(){yield Br.ssdMobilenetv1.loadFromUri("https://www-cdn.educoder.net/weights/"),yield I0("https://www-cdn.educoder.net/weights/"),yield T0("https://www-cdn.educoder.net/weights/"),yield R0("https://www-cdn.educoder.net/weights/"),mt(!0)});(0,Ae.useEffect)(()=>{r&&Le()},[r]),(0,Ae.useImperativeHandle)(i,()=>({handleStop:bt,handleRemove:ct,handlePlay:mt,startDiscern:qe,handleUploadImage:Xe}));const Me=ft=>Ti(void 0,null,function*(){if(!s.current){setTimeout(()=>Me(ft));return}navigator.mediaDevices.getUserMedia({video:{width:640,height:360}}).then(xt=>Ti(void 0,null,function*(){if("srcObject"in s.current?s.current.srcObject=xt:s.current.src=window.URL.createObjectURL(xt),s.current.onloadedmetadata=function(St){D(!1),s.current.play()},ft){const St=document.createElement("img");St.src=yield H0(t+"?t="+new Date().getTime()),A.current=yield nl(St,Fe).withFaceLandmarks().withFaceDescriptor()}})).catch(function(xt){console.log("err:",xt,xt.message),xt.message==="Permission denied"||xt.name==="NotAllowedError"?j.ZP.error("\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"):xt.message!="\u56FE\u7247\u6D41\u5F02\u5E38"&&j.ZP.error("\u6444\u50CF\u5934\u83B7\u53D6\u5931\u8D25\uFF0C\u6216\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934")})}),Ne=(ft,xt)=>Ti(void 0,null,function*(){return new Promise(St=>Ti(void 0,null,function*(){var Lt,$t,ir,ur,vr,pr,mr;const lr=yield(0,U0.ZP)("/api/buckets/get_upload_token.json",{method:"get"});lr.data=JSON.parse((0,L0.pe)(lr.data));const hr=(0,F0.Z)(),Ur=new(_0())({endpoint:(Lt=lr==null?void 0:lr.data)==null?void 0:Lt.end_point,region:($t=lr==null?void 0:lr.data)==null?void 0:$t.region,accessKeyId:(ir=lr==null?void 0:lr.data)==null?void 0:ir.access_key_id,accessKeySecret:(ur=lr==null?void 0:lr.data)==null?void 0:ur.access_key_secret,bucket:(vr=lr==null?void 0:lr.data)==null?void 0:vr.bucket,stsToken:(pr=lr==null?void 0:lr.data)==null?void 0:pr.security_token}),Ir=z0(ft,hr);Ur.multipartUpload(`${hr}.png`,Ir,{timeout:10*1e3,partSize:10485760,callback:{url:(mr=lr==null?void 0:lr.data)==null?void 0:mr.callback_url,host:lr==null?void 0:lr.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&login="+o.login+"&container_id="+o.categoryId+"&container_type=ExerciseIdentity&p="+xt}}).then(function(Xr){St(Xr),console.log("result:",Xr)}).catch(function(Xr){console.log("err:",Xr)})}))}),Ze=ft=>Ti(void 0,null,function*(){try{u.current.width=s.current.videoWidth,u.current.height=360,yield u.current.getContext("2d").drawImage(s.current,0,0,u.current.width,u.current.height),ye.current=u.current.toDataURL("image/png"),ft===1&&Ne(ye.current,ft)}catch(xt){}}),Xe=ft=>Ti(void 0,null,function*(){return new Promise(xt=>Ti(void 0,null,function*(){yield u.current.getContext("2d").drawImage(s.current,0,0,u.current.width,u.current.height),yield Ne(ye.current,ft),xt()}))}),qe=()=>Ti(void 0,null,function*(){d.current=!0;const ft=yield nl(s.current,Fe).withFaceLandmarks().withFaceDescriptor();if(ft&&A.current){const St=new B0(ft).findBestMatch(A.current.descriptor);te(St._distance<.43?"\u8BC6\u522B\u6210\u529F":Te),Ze(St._distance<.43?1:0),setTimeout(()=>{n==null||n({content:St._distance<.43?"\u8BC6\u522B\u6210\u529F":Te,success:St._distance<.43})},1e3),ue.current=!0}else Ze(0),te(Te),setTimeout(()=>{n==null||n({content:Te,success:!1})},1e3);setTimeout(()=>{s.current.pause()},600)}),tt=()=>Ti(void 0,null,function*(){var ft,xt;if((ft=s.current)!=null&&ft.paused||(xt=s.current)!=null&&xt.ended)return setTimeout(()=>tt());const St=yield nl(s.current,Fe).withFaceLandmarks().withFaceDescriptor();d.current||(d.current=!0,e(!0)),St&&s.current?(ae(""),ht(s.current,l.current,[St],we)):ae("\u8BF7\u5C06\u8138\u90E8\u79FB\u52A8\u81F3\u53D6\u666F\u6846\u5185"),ue.current||setTimeout(()=>tt())}),ct=()=>{try{s.current.srcObject.getTracks().forEach(function(St){St.stop()}),d.current=!1}catch(ft){}},bt=()=>{D(!1);try{d.current=!1}catch(ft){}},mt=ft=>{d.current=!1,ue.current=!1,u.current.getContext("2d").clearRect(0,0,640,480),te(""),D(!0);try{Me(ft||!1)}catch(xt){}},ht=(ft,xt,St,Lt=!0)=>{const $t=At(ft,xt,St);Lt&&qg(xt,$t.map(ir=>ir.detection))},At=(ft,xt,St)=>{const{width:Lt,height:$t}=ft instanceof HTMLVideoElement?Ou(ft):ft;return xt.width=Lt,xt.height=$t,Td(St,{width:Lt,height:$t})};return $o.createElement("div",{className:W0.wrp},$o.createElement(M0.Z,{spinning:O,tip:"\u6B63\u5728\u542F\u52A8\u6444\u50CF\u5934\uFF0C\u8BF7\u7A0D\u540E..."},$o.createElement("video",{onPlay:tt,ref:s,id:"inputVideo",autoPlay:!0,muted:!0}),$o.createElement("canvas",{style:{zIndex:2},ref:l}),$o.createElement("canvas",{ref:u}),$o.createElement("div",{className:"c-red mt5 tc",style:{height:22}},H," ",se)))}),G0="data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAABEAAAAHoCAYAAABJiJprAAAAAXNSR0IArs4c6QAAQABJREFUeAHsnQegXFW1/r+Z23vqTe89IYEAoQpBRBBFLIiU518BeYoFffr08RQVEbF3fE9AEaygwEOUJh1CaIkEEpIQ0utNQurtbe7815q5J/fM3Jkz7ZwzZ858S4c5ZZ9dfvvumzvfrL1WAHEWDocDcZd4SgIkQAIkQAIkQAIkQAIkQAIkQAIkQAIFRSAQCITNHT4idlD4MGPhMQmQAAmQAAmQAAmQAAmQAAmQAAmQgB8IGEJIRABJV/y4/vrrjwgmfoDAMZAACZAACZAACZAACZAACZAACZAACRQugeuuuy7GyyPZSFQESSmAHBE9rrsO1/XXdPfdd1MISUaV10mABEiABEiABEiABEiABEiABEiABBwlcOGFF0aEj+u1lesj/4WVGBIRQJJ5fxjCh1QQcrTXrJwESIAESIAESIAESIAESIAESIAESIAEciQgOkaJVpFMCAkmqj8ifojHx9y5c+npkQgQr5EACZAACZAACZAACZAACZAACZAACXiKQETDEC3DcOiI79wgAeSI+MFtLvGseE4CJEACJEACJEACJEACJEACJEACJOBhAnNVy0giggwSQHQckQfkfeTIkfQA8fDEsmskQAIkQAIkQAIkQAIkQAIkQAIkQAJRAoaGYWga8VxiBBD1/pC9MpEy+uCbb75JASSeGM9JgARIgARIgARIgARIgARIgARIgAQ8R0A1DEMEUW0jfitMjACivdcML2v6xY+hQ4dSAPHclLJDJEACJEACJEACJEACJEACJEACJEAC8QRUw1ARRDWNRNlrYwWQfu+PxVrLccdh9+7dFEDiifKcBEiABEiABEiABEiABEiABEiABEjAcwQiGoZoGRFNQ3vXr3EYHT0igES2v/RfVcVk6KZNgenTpxvl+E4CJEACJEACJEACJEACJEACJEACJEACniWgGoZqGUY4Dw3wYd4Gc0QAMUawZs2aI14fe/bsOXJs3Oc7CZAACZAACZAACZAACZAACZAACZAACXiNgFnDMGsbRj9jBJDIHpnFUWcRbn8xEPGdBEiABEiABEiABEiABEiABEiABEigEAgc0TJE24iPA1KacACyZwZ79+Jgays9QBIC4kUSIAESIAESIAESIAESIAESIAESIAEvEThYUxMoHTUqjMZGoKVlUNdiPEAG3eUFEiABEiABEiABEiABEiABEiABEiABEvABAQogPphEDoEESIAESIAESIAESIAESIAESIAESMCaAAUQaz68SwIkQAIkQAIkQAIkQAIkQAIkQAIk4AMCFEB8MIkcAgmQAAmQAAmQAAmQAAmQAAmQAAmQgDUBCiDWfHiXBEiABEiABEiABEiABEiABEiABEjABwQogPhgEjkEEiABEiABEiABEiABEiABEiABEiABawIUQKz58C4JkAAJkAAJkAAJkAAJkAAJkAAJkIAPCFAA8cEkcggkQAIkQAIkQAIkQAIkQAIkQAIkQALWBCiAWPPhXRIgARIgARIgARIgARIgARIgARIgAR8QoADig0nkEEiABEiABEiABEiABEiABEiABEiABKwJUACx5sO7JEACJEACJEACJEACJEACJEACJEACPiBAAcQHk8ghkAAJkAAJkAAJkAAJkAAJkAAJkAAJWBOgAGLNh3dJgARIgARIgARIgARIgARIgARIgAR8QIACiA8mkUMgARIgARIgARIgARIgARIgARIgARKwJkABxJoP75IACZAACZAACZAACZAACZAACZAACfiAAAUQH0wih0ACJEACJEACJEACJEACJEACJEACJGBNgAKINR/eJQESIAESIAESIAESIAESIAESIAES8AEBCiA+mEQOgQRIgARIgARIgARIgARIgARIgARIwJoABRBrPrxLAiRAAiRAAiRAAiRAAiRAAiRAAiTgAwIUQHwwiRwCCZAACZAACZAACZAACZAACZAACZCANQEKINZ8eJcESIAESIAESIAESIAESIAESIAESMAHBCiA+GASOQQSIAESIAESIAESIAESIAESIAESIAFrAhRArPnwLgmQAAmQAAmQAAmQAAmQAAmQAAmQgA8IUADxwSRyCCRAAiRAAiRAAiRAAiRAAiRAAiRAAtYEKIBY8+FdEiABEiABEiABEiABEiABEiABEiABHxCgAOKDSeQQSIAESIAESIAESIAESIAESIAESIAErAlQALHmw7skQAIkQAIkQAIkQAIkQAIkQAIkQAI+IEABxAeTyCGQAAmQAAmQAAmQAAmQAAmQAAmQAAlYE6AAYs2Hd0mABEiABEiABEiABEiABEiABEiABHxAgAKIDyaRQyABEiABEiABEiABEiABEiABEiABErAmQAHEmg/vkgAJkAAJkAAJkAAJkAAJkAAJkAAJ+IAABRAfTCKHQAIkQAIkQAIkQAIkQAIkQAIkQAIkYE2AAog1H94lARIgARIgARIgARIgARIgARIgARLwAQEKID6YRA6BBEiABEiABEiABEiABEiABEiABEjAmgAFEGs+vEsCJEACJEACJEACJEACJEACJEACJOADAhRAfDCJHAIJkAAJkAAJkAAJkAAJkAAJkAAJkIA1AQog1nx4lwRIgARIgARIgARIgARIgARIgARIwAcEKID4YBI5BBIgARIgARIgARIgARIgARIgARIgAWsCFECs+fAuCZAACZAACZAACZAACZAACZAACZCADwhQAPHBJHIIJEACJEACJEACJEACJEACJEACJEAC1gQogFjz4V0SIAESIAESIAESIAESIAESIAESIAEfEKAA4oNJ5BBIgARIgARIgARIgARIgARIgARIgASsCVAAsebDuyRAAiRAAiRAAiRAAiRAAiRAAiRAAj4gQAHEB5PIIZAACZAACZAACZAACZAACZAACZAACVgToABizYd3SYAESIAESIAESIAESIAESIAESIAEfECAAogPJpFDIAESIAESIAESIAESIAESIAESIAESsCZAAcSaD++SAAmQAAmQAAmQAAmQAAmQAAmQAAn4gAAFEB9MIodAAiRAAiRAAiRAAiRAAiRAAiRAAiRgTYACiDUf3iUBEiABEiABEiABEiABEiABEiABEvABAQogPphEDoEESIAESIAESIAESIAESIAESIAESMCaAAUQaz68SwIkQAIkQAIkQAIkQAIkQAIkQAIk4AMCFEB8MIkcAgmQAAmQAAmQAAmQAAmQAAmQAAmQgDUBCiDWfHiXBEiABEiABEiABEiABEiABEiABEjABwQogPhgEjkEEiABEiABEiABEiABEiABEiABEiABawIUQKz58C4JkAAJkAAJkAAJkAAJkAAJkAAJkIAPCFAA8cEkcggkQAIkQAIkQAIkQAIkQAIkQAIkQALWBCiAWPPhXRIgARIgARIgARIgARIgARIgARIgAR8QoADig0nkEEiABEiABEiABEiABEiABEiABEiABKwJUACx5sO7JEACJEACJEACJEACJEACJEACJEACPiBAAcQHk8ghkAAJkAAJkAAJkAAJkAAJkAAJkAAJWBOgAGLNh3dJgARIgARIgARIgARIgARIgARIgAR8QIACiA8mkUMgARIgARIgARIgARIgARIgARIgARKwJkABxJoP75IACZAACZAACZAACZAACZAACZAACfiAAAUQH0wih0ACJEACJEACJEACJEACJEACJEACJGBNgAKINR/eJQESIAESIAESIAESIAESIAESIAES8AEBCiA+mEQOgQRIgARIgARIgARIgARIgARIgARIwJoABRBrPrxLAiRAAiRAAiRAAiRAAiRAAiRAAiTgAwIUQHwwiRwCCZAACZAACZAACZAACZAACZAACZCANQEKINZ8eJcESIAESIAESIAESIAESIAESIAESMAHBCiA+GASOQQSIAESIAESIAESIAESIAESIAESIAFrAhRArPnwLgmQAAmQAAmQAAmQAAmQAAmQAAmQgA8IlPpgDBwCCZAACZAACZAACZBACgJdPcCWPcDGJnntBjbJ+75moK0TaJVX5L0j+q5V1VQCtVX973Ks5yPqgaljgGmj5SXvk0cBFWUpGuZtEiABcP3xh4AEvEGAAog35iFlL3r7gG75T6gvgL6+cMryLEACJEACJJCcQDAYQEkwjPLSIOT/NBLwJYENInA8v0Zea4FVW4Cd+yF/Q6Q/1O5W4KC8rCwo62fccGD+ZOCUOfKaC0wXYYRGAsVOgOuv2H8COH6vEqAA4tWZ6e9XSMSOju6wCB9GRyl+GCT4TgIkQALZElAhWT8I9oiwXCIf4KrKVRAJZFsdnyMBTxBQseLRV4Cl/aLH3kPOd0vX0fa3oq+HlkXbaxwSFUNOFTHk7GOBobXO94MtkEC+CXD95XsG2D4JpEeAAkh6nPJSSr0+2ruAcL/mUVEWQFlJAPptC/9Mz8uUsFESIAEfENBfqRHxIxQWl+SowNwmv2urK0BvEB/Mb7ENobsXeHwFcO9S4OlVKurln4AKL397Ifr66u+AM+YDF5wKnLUQ4nWV//6xByRgFwGuP7tIsh4ScI8A/xlyj3VGLannR1T8CEe+nayuCIJfTmaEkIVJgARIICEBFZDV60M9PspLA/K7VrcXRn/n1ogIQk+QhNh40WMEVm4G7noW+MdLwOE2j3XO1B0VZB4TgUZfDTXAe08ELj4dWDDFVIiHJFBgBLj+CmzC2F0SMBGgAGKC4aVD3fainh/6R3pNZZAeH16aHPaFBEjANwRUWNbfsW2d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ysQfqZx0Mr/7kPRBw0nrySFfYoKAICAICAKCgCAgCAgCgkARIBD7F3QRDE6GIAhkFYE+g7PafCqNNyxcSnWz5lHTspVkrWWvk1gpdTkVatPyVbRy6iya/+n39Mcr7/PnA2pYkAdZPyAu25G1UArclq1qoxBuCuO2+PwuWx37ONbUX6iB0+D279qDNt58B0V4dGPPj+FD1wuTH9aK1eqI/fv1p+b61dShvJw01gIZvslWVNlQT01za8maHcokk0LXpKogIAikiUBdXR09/PDD9NZbb6XZUmZ2b2xsTKmhr7/+ms4880z6/vvvU9pv7Nix9P777ye1z+eff05TpkxJqq5UKl0EVqxYQatXh/6vyzYKd999N/32228xDzN//nxCne+++y5mHe+GpUuXeotirj/wwAOET6asublZtZfoPp43bx499NBDtHZt7N8kmeqTtCMIZAoB8QDJFJLSTukhAC0QeIKsSv4/qGyA1Lh4Gc356OuIpqEoAq8OfAx4d3D2FZMzgQQbmzj9abSAZrAhtR+4EQfLxAqyw/QemImW2r2N5XVrKTjXos4dGf9kst6k2GOTSSyQH41rY2vMaJxFR5s/lyr1Vk+P8eN/YH2PAA1hbRCEZNk4511C4TALF82n+vpWTRvDZAFXlrTRehS2HkuK0Ep1QSArCLz44os0adKkqLYPOugg2nzzzaPK77vvPnrhhRf4sa3RwIEDaeONN46q4y344YcfCMRJOjZs2DDq169fRBNo84wzzqD111+frrjiCtWniAo+KwMGDFCTvJ49e9JWW23lU8O/6P7776empibac889IyqgrMLltRbklN7nn38+7bXXXnTdddeF6yKL1cSJE5PCK7yTLBQtAiDuTj31VDJYn+2ee+6h7t3591qLvf7667Rs2TJnNanvwYMH0+jRo33r/vzzz/T444/TjBkz6Pbbb1d1li9fTtXV1RQIhKZaCxcuVHWqqqpo66239m3HXfjMM88QngVXX3017bbbbuFNsUiR9957T9U5/PDDw3XdCzU1NeG+uMtjLYPQALGB55BzH1v8+3Hu3Lk0a9Ys9fnmm28IhCfK0X6sY8c6hpQLAu2FgBAg7YW8HLc4EOjDk/Y6TonrQyrkaoBGRTkZnGbWVDojoaMilanJniD4sD+Ir+Ftf4eeXal6YD+qHjzAt07OCrv05MwxLAZbJLa6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",Q0=Se(89392),X0=Object.defineProperty,ps=Object.getOwnPropertySymbols,Rd=Object.prototype.hasOwnProperty,Od=Object.prototype.propertyIsEnumerable,kd=(n,t,e)=>t in n?X0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,il=(n,t)=>{for(var e in t||(t={}))Rd.call(t,e)&&kd(n,e,t[e]);if(ps)for(var e of ps(t))Od.call(t,e)&&kd(n,e,t[e]);return n},K0=(n,t)=>{var e={};for(var r in n)Rd.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&ps)for(var r of ps(n))t.indexOf(r)<0&&Od.call(n,r)&&(e[r]=n[r]);return e},Po=(n,t,e)=>new Promise((r,i)=>{var o=l=>{try{u(e.next(l))}catch(d){i(d)}},s=l=>{try{u(e.throw(l))}catch(d){i(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);u((e=e.apply(n,t)).next())});const{Countdown:Z0}=a.default,{Step:J0}=N.default,w1=null,A1={0:"c-red-ee4",1:"c-green"},x1=null,Y0=n=>{var t=n,{globalSetting:e,loading:r,user:i,exercise:o,dispatch:s}=t,u=K0(t,["globalSetting","loading","user","exercise","dispatch"]),l;const d=(0,Ye.useParams)(),[A,O]=(0,Ae.useState)(0),[D,H]=(0,Ae.useState)(!1),[te,se]=(0,Ae.useState)(!1),[ae,ue]=(0,Ae.useState)(!1),[ye,we]=(0,Ae.useState)(0),[ve,Ee]=(0,Ae.useState)({}),Te=(0,Ae.useRef)(),Fe=(0,Ae.useRef)(!0),Le=[{title:"\u91C7\u96C6\u7167\u7247",content:"First-content"},{title:"\u5BA1\u6838\u7ED3\u679C",content:"Second-content"},{title:"\u5F00\u542F\u624B\u673A\u5F55\u5236",content:"Last-content"}].filter(qe=>ve!=null&&ve.open_phone_video_recording?!0:qe.content!=="Last-content"),Me=()=>Po(void 0,null,function*(){return new Promise(qe=>Po(void 0,null,function*(){const tt=yield(0,f.PJ)(il({},d));Ee(il({},tt)),qe(tt)}))}),Ne=()=>Po(void 0,null,function*(){var qe;const tt=yield Me();tt!=null&&tt.identity_verify||O(2),tt!=null&&tt.can_start&&tt.countdown_time===0?O(2):(tt==null?void 0:tt.identity_photo_state)==="rejected"?(Fe.current=!1,we(1)):(tt==null?void 0:tt.identity_photo_state)==="passed"&&(Fe.current=!1,(qe=Te==null?void 0:Te.current)==null||qe.handleStop(),ve!=null&&ve.open_phone_video_recording||O(2))}),Ze=()=>Po(void 0,null,function*(){var qe;const tt=yield Me();(tt==null?void 0:tt.identity_photo_state)==="submitted"||((tt==null?void 0:tt.identity_photo_state)==="rejected"?(Fe.current=!1,we(2)):(tt==null?void 0:tt.identity_photo_state)==="passed"&&(Fe.current=!1,(qe=Te==null?void 0:Te.current)==null||qe.handleStop(),we(1),ve!=null&&ve.open_phone_video_recording||O(2))),(tt==null?void 0:tt.identity_photo_state)!=="passed"&&Fe.current&&setTimeout(()=>{Ze()},30*1e3)}),Xe=()=>{var qe;H(!1),(qe=Te==null?void 0:Te.current)==null||qe.startDiscern()};return(0,Ae.useEffect)(()=>(Ne(),console.log("captureRef:",Te),()=>{we(0),ue(!1),se(!1),O(0)}),[]),Ae.createElement("div",{className:"p30 bg-white minHb100 edu-container mt20"},(ve==null?void 0:ve.identity_verify)&&Ae.createElement(Ae.Fragment,null,Ae.createElement("div",{className:"tc font16 blod"},"\u8EAB\u4EFD\u9A8C\u8BC1"),Ae.createElement("div",{className:g.steps},Ae.createElement(N.default,{current:A},Le.map(qe=>Ae.createElement(J0,{key:qe.title,title:qe.title}))))),Ae.createElement("div",{className:A===0?"":"hide"},Ae.createElement("div",{className:"tc mt50"},"\u8BF7\u4FDD\u8BC1\u5468\u56F4\u5149\u7EBF\u5145\u8DB3\uFF0C\u4E94\u5B98\u6E05\u6670\u53EF\u89C1\uFF01"),!te&&Ae.createElement("div",{className:"tc"},Ae.createElement("img",{width:536,src:G0,className:"mt30"})),Ae.createElement("div",{className:te?"":"hide"},Ae.createElement(V0,{ref:Te,onCameraReady:qe=>{H(qe)},defaultOpen:ve==null?void 0:ve.identity_verify,identity_url:(0,w.Tv)((l=i==null?void 0:i.userInfo)==null?void 0:l.identity_url),outputResult:qe=>{qe.success?(j.ZP.success({content:"\u4EBA\u8138\u8BC6\u522B\u6210\u529F",key:"checkapi"}),O(2)):ue(!0),H(!1)}})),te&&Ae.createElement(Ae.Fragment,null,ae?Ae.createElement("div",{className:"tc mb30 mt15"},Ae.createElement(p.ZP,{type:"primary",onClick:()=>{var qe;(qe=Te==null?void 0:Te.current)==null||qe.handlePlay(),Ee(il({},{})),ue(!1)}},"\u91CD\u65B0\u8BC6\u522B"),Ae.createElement(p.ZP,{type:"primary",className:"ml90",onClick:()=>Po(void 0,null,function*(){var qe;yield(qe=Te==null?void 0:Te.current)==null?void 0:qe.handleUploadImage(0),Fe.current=!0,O(1),we(0),ue(!1),Ze()})},"\u4EBA\u5DE5\u5BA1\u6838")):D&&Ae.createElement("div",{className:"tc mb30 mt15"},Ae.createElement(p.ZP,{type:"primary",onClick:(0,Q0.throttle)(Xe,2e3)},"\u5F00\u59CB\u8BC6\u522B"))),!te&&Ae.createElement("div",{className:"tc mb30 mt15"},Ae.createElement(p.ZP,{type:"primary",onClick:()=>{se(!0)}},"\u5F00\u59CB\u91C7\u96C6"))),A===1&&Ae.createElement("div",{className:"tc"},ye===0&&Ae.createElement(Ae.Fragment,null,Ae.createElement("div",{className:"tc mt50"},Ae.createElement("span",{className:"c-blue font50 iconfont icon-dengdaishenhe"}),Ae.createElement("br",null),"\u4EBA\u5DE5\u5BA1\u6838\u4E2D...",Ae.createElement("br",null),"\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u76D1\u63A7\u8001\u5E08\u5BA1\u6838\u4E2D\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF01"),Ae.createElement(p.ZP,{type:"primary",className:"mt50",onClick:()=>Po(void 0,null,function*(){const qe=yield Me();(qe==null?void 0:qe.identity_photo_state)==="submitted"?j.ZP.warning({content:"\u6B63\u5728\u7B49\u5F85\u8001\u5E08\u5BA1\u6838\u4E2D\uFF0C\u8BF7\u7A0D\u540E...",key:"sh1"}):(qe==null?void 0:qe.identity_photo_state)==="rejected"?(we(2),Fe.current=!1):(qe==null?void 0:qe.identity_photo_state)==="passed"&&(Fe.current=!1,we(1),ve!=null&&ve.open_phone_video_recording||O(2))})},"\u67E5\u770B\u5BA1\u6838\u7ED3\u679C")),ye===1&&Ae.createElement(Ae.Fragment,null,Ae.createElement("div",{className:"tc mt50"},Ae.createElement("span",{className:"c-green font50 iconfont icon-tongguo"}),Ae.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u901A\u8FC7\u3002"),(ve==null?void 0:ve.open_phone_video_recording)&&Ae.createElement(p.ZP,{type:"primary",className:"mt50",onClick:()=>O(2)},"\u4E0B\u4E00\u6B65")),ye===2&&Ae.createElement(Ae.Fragment,null,Ae.createElement("div",{className:"tc mt50"},Ae.createElement("span",{className:"c-red font50 iconfont icon-hongsejingshi"}),Ae.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u4E0D\u901A\u8FC7\u3002\u8BF7\u91CD\u65B0\u62CD\u7167\u9A8C\u8BC1\u3002"),Ae.createElement("div",{className:"mt20"},Ae.createElement(c.Z,null,Ae.createElement(h.Z,{className:"tr",flex:"430px"},"\u5931\u8D25\u539F\u56E0\uFF1A"),Ae.createElement(h.Z,null,ve==null?void 0:ve.identity_photo_comment)),Ae.createElement(c.Z,{className:"mt30"},Ae.createElement(h.Z,{className:"tr",flex:"430px"},"\u91C7\u96C6\u7167\u7247\uFF1A"),Ae.createElement(h.Z,null,Ae.createElement("img",{src:(0,w.Tv)(ve==null?void 0:ve.identity_photo_url),width:200}))),Ae.createElement(c.Z,null,Ae.createElement(h.Z,{className:"tr",flex:"430px"}),Ae.createElement(h.Z,null,Ae.createElement(p.ZP,{type:"primary",className:"mt50",onClick:()=>{var qe;O(0),H(!1),ue(!1),se(!1),(qe=Te==null?void 0:Te.current)==null||qe.handlePlay()}},"\u91CD\u65B0\u8BA4\u8BC1")))))),A===2&&Ae.createElement(Ae.Fragment,null,Ae.createElement("div",{className:"tc mt50"},!(ve!=null&&ve.open_phone_video_recording)&&Ae.createElement(Ae.Fragment,null,(ve==null?void 0:ve.countdown_time)<=0?Ae.createElement(Ae.Fragment,null,Ae.createElement("div",{className:"tc mt50"},Ae.createElement("span",{className:"c-green font50 iconfont icon-tongguo"}),Ae.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u901A\u8FC7\u3002")):"\u8003\u8BD5\u5373\u5C06\u5F00\u59CB\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..."),(ve==null?void 0:ve.open_phone_video_recording)&&Ae.createElement(Ae.Fragment,null,(ve==null?void 0:ve.countdown_time)<=0?Ae.createElement("div",{className:"tc"},"\u6839\u636E\u8003\u8BD5\u89C4\u5B9A\uFF0C\u8BF7\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B\uFF0C\u626B\u7801\u4E0B\u9762\u7684\u4E8C\u7EF4\u7801\u5F00\u542F\u624B\u673A\u5F55\u5236\u89C6\u9891",Ae.createElement("br",null),Ae.createElement("span",{className:"c-blue",style:{cursor:"default"},onClick:()=>{y.default.info({icon:null,title:"\u67E5\u770B\u64CD\u4F5C\u6307\u5F15",className:"custom-modal-divider",width:540,content:Ae.createElement(c.Z,null,Ae.createElement(h.Z,{flex:"178px"},Ae.createElement("img",{width:148,src:"/images/operation_guidance.png"})),Ae.createElement(h.Z,{flex:"1"},"\u8BF7\u70B9\u51FB\u53F3\u4E0A\u89D2\u201C\u2026\u201D\uFF0C\u9009\u62E9",Ae.createElement("span",{className:"c-orange"},"Safari\u4E2D\u6253\u5F00"),"\u6216\u8005",Ae.createElement("span",{className:"c-orange"},"\u201C\u5728\u9ED8\u8BA4\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u201D"),"\u540E\uFF0C\u6D4F\u89C8\u5668\u6253\u5F00\u540E\u8BF7\u70B9\u51FB\u5F00\u59CB\u5F55\u5236\u6309\u94AE\uFF0C\u53EF\u4EE5\u5F00\u542F\u624B\u673A\u5F55\u5236\u89C6\u9891\u3002"))})}},"\u5982\u82F9\u679C\u624B\u673A\u5FAE\u4FE1\u626B\u63CF\u4E8C\u7EF4\u7801\u540E\uFF0C\u51FA\u73B0\u70B9\u51FB\u5F00\u59CB\u5F55\u5236\u65E0\u54CD\u5E94\uFF0C\u8BF7\u67E5\u770B\u64CD\u4F5C\u6307\u5F15\u3002")):"\u8003\u8BD5\u5373\u5C06\u5F00\u59CB\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85...")),(ve==null?void 0:ve.open_phone_video_recording)&&Ae.createElement("div",{className:g.qrcode},Ae.createElement(m(),{value:`https://${document.domain}/live-push.html?id=${d.categoryId}&login=${d.login}&cookie=${(0,w.ej)("_educoder_session")}`})),(ve==null?void 0:ve.countdown_time)>0&&Ae.createElement("div",{className:"tc mt20"},Ae.createElement(Z0,{value:Date.now()+(ve==null?void 0:ve.countdown_time)*1e3,valueStyle:{color:"#cf1322",fontSize:40},onFinish:()=>{Me()}})),Ae.createElement("div",{className:"tc mb30 mt50"},Ae.createElement(p.ZP,{type:"primary",onClick:()=>Po(void 0,null,function*(){var qe;const tt=yield Me();tt!=null&&tt.can_start&&(tt==null?void 0:tt.countdown_time)<=0?((qe=Te==null?void 0:Te.current)==null||qe.handleRemove(),ve!=null&&ve.open_phone_video_recording?tt!=null&&tt.video_url&&setTimeout(()=>{location.href=`/classrooms/${d.coursesId}/exercise/${d.categoryId}/users/${d.login}`},300):setTimeout(()=>{location.href=`/classrooms/${d.coursesId}/exercise/${d.categoryId}/users/${d.login}`},300)):(tt==null?void 0:tt.countdown_time)>0?j.ZP.warning({content:"\u8003\u8BD5\u6682\u672A\u5F00\u59CB\uFF0C\u8BF7\u7A0D\u540E..."}):j.ZP.warning({content:"\u8BF7\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B\uFF0C\u5F00\u542F\u624B\u673A\u89C6\u9891\u5F55\u5236"})})},"\u5F00\u59CB\u8003\u8BD5"))))};var $0=(0,Ye.connect)(({loading:n,user:t,exercise:e,globalSetting:r})=>({globalSetting:r,user:t,exercise:e,loading:n.effects}))(Y0)},47257:function(Zt){(function(ut){(function(Se){if(1)Zt.exports=Se();else var Ae})(function(){var Se,Ae,Ye;return function(){function a(N,j,p){function c(g,w){if(!j[g]){if(!N[g]){var f=void 0;if(!w&&f)return require(g,!0);if(h)return h(g,!0);var v=new Error("Cannot find module '"+g+"'");throw v.code="MODULE_NOT_FOUND",v}var m=j[g]={exports:{}};N[g][0].call(m.exports,function(b){var x=N[g][1][b];return c(x||b)},m,m.exports,a,N,j,p)}return j[g].exports}for(var h=void 0,y=0;y<p.length;y++)c(p[y]);return c}return a}()({1:[function(a,N,j){"use strict";var p=a("./browser/client");p.Buffer=a("buffer").Buffer,p.urllib=a("../shims/xhr"),p.version=a("./browser/version").version,N.exports=p},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator"));a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js"),a("core-js/modules/es.array.slice.js");var y=a("assert"),g=a("../common/utils/checkBucketName"),w=g.checkBucketName,f=j;function v(b){return Array.isArray?Array.isArray(b):Object.prototype.toString.call(b)==="[object Array]"}function m(b){return b?v(b)?b:[b]:[]}f.useBucket=function(x){return w(x),this.options.bucket=x,this},f.setBucket=function(x){return w(x),this.options.bucket=x,this},f.getBucket=function(){return this.options.bucket},f.deleteBucket=function(){var b=(0,h.default)(c.default.mark(function R(I,E){var C,P;return c.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return C=this._bucketRequestParams("DELETE",I,"",E),M.next=3,this.request(C);case 3:if(P=M.sent,!(P.status===200||P.status===204)){M.next=6;break}return M.abrupt("return",{res:P.res});case 6:return M.next=8,this.requestError(P);case 8:throw M.sent;case 9:case"end":return M.stop()}},R,this)}));function x(R,I){return b.apply(this,arguments)}return x}(),f.putBucketACL=function(){var b=(0,h.default)(c.default.mark(function R(I,E,C){var P,Z;return c.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return P=this._bucketRequestParams("PUT",I,"acl",C),P.headers={"x-oss-acl":E},P.successStatuses=[200],J.next=5,this.request(P);case 5:return Z=J.sent,J.abrupt("return",{bucket:Z.headers.location&&Z.headers.location.substring(1)||null,res:Z.res});case 7:case"end":return J.stop()}},R,this)}));function x(R,I,E){return b.apply(this,arguments)}return x}(),f.getBucketACL=function(){var b=(0,h.default)(c.default.mark(function R(I,E){var C,P;return c.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return C=this._bucketRequestParams("GET",I,"acl",E),C.successStatuses=[200],C.xmlResponse=!0,M.next=5,this.request(C);case 5:return P=M.sent,M.abrupt("return",{acl:P.data.AccessControlList.Grant,owner:{id:P.data.Owner.ID,displayName:P.data.Owner.DisplayName},res:P.res});case 7:case"end":return M.stop()}},R,this)}));function x(R,I){return b.apply(this,arguments)}return x}(),f.putBucketLogging=function(){var b=(0,h.default)(c.default.mark(function R(I,E,C){var P,Z,M;return c.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return P=this._bucketRequestParams("PUT",I,"logging",C),Z=`<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>`.concat(I,`</TargetBucket>
`),E&&(Z+="<TargetPrefix>".concat(E,`</TargetPrefix>
`)),Z+=`</LoggingEnabled>
</BucketLoggingStatus>`,P.content=Z,P.mime="xml",P.successStatuses=[200],_.next=9,this.request(P);case 9:return M=_.sent,_.abrupt("return",{res:M.res});case 11:case"end":return _.stop()}},R,this)}));function x(R,I,E){return b.apply(this,arguments)}return x}(),f.getBucketLogging=function(){var b=(0,h.default)(c.default.mark(function R(I,E){var C,P,Z;return c.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return C=this._bucketRequestParams("GET",I,"logging",E),C.successStatuses=[200],C.xmlResponse=!0,J.next=5,this.request(C);case 5:return P=J.sent,Z=P.data.LoggingEnabled,J.abrupt("return",{enable:!!Z,prefix:Z&&Z.TargetPrefix||null,res:P.res});case 8:case"end":return J.stop()}},R,this)}));function x(R,I){return b.apply(this,arguments)}return x}(),f.deleteBucketLogging=function(){var b=(0,h.default)(c.default.mark(function R(I,E){var C,P;return c.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return C=this._bucketRequestParams("DELETE",I,"logging",E),C.successStatuses=[204,200],M.next=4,this.request(C);case 4:return P=M.sent,M.abrupt("return",{res:P.res});case 6:case"end":return M.stop()}},R,this)}));function x(R,I){return b.apply(this,arguments)}return x}(),f.putBucketCORS=function(){var b=(0,h.default)(c.default.mark(function R(I,E,C){var P,Z,M,J,_,k,B,U,K,G;return c.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:for(E=E||[],y(E.length,"rules is required"),E.forEach(function(X){y(X.allowedOrigin,"allowedOrigin is required"),y(X.allowedMethod,"allowedMethod is required")}),P=this._bucketRequestParams("PUT",I,"cors",C),Z=`<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>`,M=function(re){Z+="<AllowedOrigin>".concat(re,"</AllowedOrigin>")},J=function(re){Z+="<AllowedMethod>".concat(re,"</AllowedMethod>")},_=function(re){Z+="<AllowedHeader>".concat(re,"</AllowedHeader>")},k=function(re){Z+="<ExposeHeader>".concat(re,"</ExposeHeader>")},B=0,U=E.length;B<U;B++)K=E[B],Z+="<CORSRule>",m(K.allowedOrigin).forEach(M),m(K.allowedMethod).forEach(J),m(K.allowedHeader).forEach(_),m(K.exposeHeader).forEach(k),K.maxAgeSeconds&&(Z+="<MaxAgeSeconds>".concat(K.maxAgeSeconds,"</MaxAgeSeconds>")),Z+="</CORSRule>";return Z+="</CORSConfiguration>",P.content=Z,P.mime="xml",P.successStatuses=[200],W.next=16,this.request(P);case 16:return G=W.sent,W.abrupt("return",{res:G.res});case 18:case"end":return W.stop()}},R,this)}));function x(R,I,E){return b.apply(this,arguments)}return x}(),f.getBucketCORS=function(){var b=(0,h.default)(c.default.mark(function R(I,E){var C,P,Z,M;return c.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return C=this._bucketRequestParams("GET",I,"cors",E),C.successStatuses=[200],C.xmlResponse=!0,_.next=5,this.request(C);case 5:return P=_.sent,Z=[],P.data&&P.data.CORSRule&&(M=P.data.CORSRule,v(M)||(M=[M]),M.forEach(function(k){var B={};Object.keys(k).forEach(function(U){B[U.slice(0,1).toLowerCase()+U.slice(1,U.length)]=k[U]}),Z.push(B)})),_.abrupt("return",{rules:Z,res:P.res});case 9:case"end":return _.stop()}},R,this)}));function x(R,I){return b.apply(this,arguments)}return x}(),f.deleteBucketCORS=function(){var b=(0,h.default)(c.default.mark(function R(I,E){var C,P;return c.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return C=this._bucketRequestParams("DELETE",I,"cors",E),C.successStatuses=[204],M.next=4,this.request(C);case 4:return P=M.sent,M.abrupt("return",{res:P.res});case 6:case"end":return M.stop()}},R,this)}));function x(R,I){return b.apply(this,arguments)}return x}(),f.putBucketReferer=function(){var b=(0,h.default)(c.default.mark(function R(I,E,C,P){var Z,M,J,_;return c.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(Z=this._bucketRequestParams("PUT",I,"referer",P),M=`<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
`,M+=" <AllowEmptyReferer>".concat(E?"true":"false",`</AllowEmptyReferer>
`),C&&C.length>0){for(M+=` <RefererList>
`,J=0;J<C.length;J++)M+=" <Referer>".concat(C[J],`</Referer>
`);M+=` </RefererList>
`}else M+=` <RefererList />
`;return M+="</RefererConfiguration>",Z.content=M,Z.mime="xml",Z.successStatuses=[200],B.next=10,this.request(Z);case 10:return _=B.sent,B.abrupt("return",{res:_.res});case 12:case"end":return B.stop()}},R,this)}));function x(R,I,E,C){return b.apply(this,arguments)}return x}(),f.getBucketReferer=function(){var b=(0,h.default)(c.default.mark(function R(I,E){var C,P,Z;return c.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return C=this._bucketRequestParams("GET",I,"referer",E),C.successStatuses=[200],C.xmlResponse=!0,J.next=5,this.request(C);case 5:return P=J.sent,Z=P.data.RefererList.Referer||null,Z&&(v(Z)||(Z=[Z])),J.abrupt("return",{allowEmpty:P.data.AllowEmptyReferer==="true",referers:Z,res:P.res});case 9:case"end":return J.stop()}},R,this)}));function x(R,I){return b.apply(this,arguments)}return x}(),f.deleteBucketReferer=function(){var b=(0,h.default)(c.default.mark(function R(I,E){return c.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,this.putBucketReferer(I,!0,null,E);case 2:return P.abrupt("return",P.sent);case 3:case"end":return P.stop()}},R,this)}));function x(R,I){return b.apply(this,arguments)}return x}(),f._bucketRequestParams=function(x,R,I,E){return{method:x,bucket:R,subres:I,timeout:E&&E.timeout,ctx:E&&E.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(a,N,j){(function(p,c){(function(){"use strict";var h=a("@babel/runtime/helpers/interopRequireDefault"),y=h(a("@babel/runtime/regenerator")),g=h(a("@babel/runtime/helpers/asyncToGenerator"));a("core-js/modules/es.function.name.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.split.js"),a("core-js/modules/es.object.assign.js"),a("core-js/modules/es.array.includes.js"),a("core-js/modules/es.string.replace.js"),a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.symbol.js"),a("core-js/modules/es.symbol.description.js"),a("core-js/modules/es.array.slice.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.promise.js"),a("core-js/modules/es.regexp.to-string.js");var w=a("debug")("ali-oss"),f=a("xml2js"),v=a("agentkeepalive"),m=a("merge-descriptors"),b=a("platform"),x=a("utility"),R=a("urllib"),I=a("./version"),E=a("bowser"),C=a("../common/signUtils"),P=a("../common/client/initOptions"),Z=a("../common/utils/createRequest"),M=Z.createRequest,J=a("../common/utils/encoder"),_=J.encoder,k=a("../common/client/getReqUrl"),B=k.getReqUrl,U=a("../common/utils/setSTSToken"),K=U.setSTSToken,G=a("../common/utils/retry"),F=G.retry,W=a("../common/utils/isFunction"),X=W.isFunction,re=new v;function oe(){var me=b.name,xe=b.version;me&&me.toLowerCase&&me.toLowerCase()==="ie"&&xe.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function pe(){return location&&location.protocol==="https:"}function ie(me,xe){if(oe(),!(this instanceof ie))return new ie(me,xe);me&&me.inited?this.options=me:this.options=ie.initOptions(me),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=R,this.agent=this.options.agent||re),this.ctx=xe,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}N.exports=ie,ie.initOptions=function(xe){xe.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var ce=Object.assign({secure:pe(),useFetch:!1},xe);return P(ce)};var Ie=ie.prototype;Ie.debug=w,m(Ie,a("./object")),m(Ie,a("./bucket")),m(Ie,a("../common/bucket/getBucketWebsite")),m(Ie,a("../common/bucket/putBucketWebsite")),m(Ie,a("../common/bucket/deleteBucketWebsite")),m(Ie,a("../common/bucket/getBucketLifecycle")),m(Ie,a("../common/bucket/putBucketLifecycle")),m(Ie,a("../common/bucket/deleteBucketLifecycle")),m(Ie,a("../common/bucket/putBucketVersioning")),m(Ie,a("../common/bucket/getBucketVersioning")),m(Ie,a("../common/bucket/getBucketInventory")),m(Ie,a("../common/bucket/deleteBucketInventory")),m(Ie,a("../common/bucket/listBucketInventory")),m(Ie,a("../common/bucket/putBucketInventory")),m(Ie,a("../common/bucket/abortBucketWorm")),m(Ie,a("../common/bucket/completeBucketWorm")),m(Ie,a("../common/bucket/extendBucketWorm")),m(Ie,a("../common/bucket/getBucketWorm")),m(Ie,a("../common/bucket/initiateBucketWorm")),m(Ie,a("./managed-upload")),m(Ie,a("../common/multipart-copy")),m(Ie,a("../common/multipart")),m(Ie,a("../common/parallel")),Ie.signature=function(xe){return this.debug("authorization stringToSign: %s",xe,"info"),C.computeSignature(this.options.accessKeySecret,xe,this.options.headerEncoding)},Ie._getReqUrl=B,Ie.authorization=function(xe,ce,le,ge){var Ce=C.buildCanonicalString(xe.toUpperCase(),ce,{headers:ge,parameters:le});return C.authorization(this.options.accessKeyId,this.options.accessKeySecret,Ce,this.options.headerEncoding)},Ie.request=function(){var me=(0,g.default)(y.default.mark(function xe(ce){var le=this;return y.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(!this.options.retryMax){Ce.next=6;break}return Ce.next=3,F(ee.bind(this),this.options.retryMax,{errorHandler:function(je){var fe=function(be){if(ce.stream)return!1;var q=[-1,-2].includes(be.status),V=le.options.requestErrorRetryHandle||function(){return!0};return q&&V(be)};return!!fe(je)}})(ce);case 3:return Ce.abrupt("return",Ce.sent);case 6:return Ce.abrupt("return",ee.call(this,ce));case 7:case"end":return Ce.stop()}},xe,this)}));return function(xe){return me.apply(this,arguments)}}();function ee(me){return de.apply(this,arguments)}function de(){return de=(0,g.default)(y.default.mark(function me(xe){var ce,le,ge,Ce,De,je;return y.default.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(!(this.options.stsToken&&X(this.options.refreshSTSToken))){Y.next=3;break}return Y.next=3,K.call(this);case 3:return ce=M.call(this,xe),this.options.useFetch||(ce.params.mode="disable-fetch"),Ce=!!xe.stream,Y.prev=6,Y.next=9,this.urllib.request(ce.url,ce.params);case 9:le=Y.sent,this.debug("response %s %s, got %s, headers: %j",xe.method,ce.url,le.status,le.headers,"info"),Y.next=16;break;case 13:Y.prev=13,Y.t0=Y.catch(6),ge=Y.t0;case 16:if(!(le&&xe.successStatuses&&xe.successStatuses.indexOf(le.status)===-1)){Y.next=28;break}return Y.next=19,this.requestError(le);case 19:if(De=Y.sent,!(De.code==="RequestTimeTooSkewed"&&!Ce)){Y.next=25;break}return this.options.amendTimeSkewed=+new Date(De.serverTime)-new Date,Y.next=24,this.request(xe);case 24:return Y.abrupt("return",Y.sent);case 25:De.params=xe,Y.next=32;break;case 28:if(!ge){Y.next=32;break}return Y.next=31,this.requestError(ge);case 31:De=Y.sent;case 32:if(!De){Y.next=34;break}throw De;case 34:if(!xe.xmlResponse){Y.next=39;break}return Y.next=37,this.parseXML(le.data);case 37:je=Y.sent,le.data=je;case 39:return Y.abrupt("return",le);case 40:case"end":return Y.stop()}},me,this,[[6,13]])})),de.apply(this,arguments)}Ie._getResource=function(xe){var ce="/";return xe.bucket&&(ce+="".concat(xe.bucket,"/")),xe.object&&(ce+=_(xe.object,this.options.headerEncoding)),ce},Ie._escape=function(xe){return x.encodeURIComponent(xe).replace(/%2F/g,"/")},Ie._getUserAgent=function(){var xe=c&&c.browser?"js":"nodejs",ce="aliyun-sdk-".concat(xe,"/").concat(I.version),le=b.description;return!le&&c&&(le="Node.js ".concat(c.version.slice(1)," on ").concat(c.platform," ").concat(c.arch)),this._checkUserAgent("".concat(ce," ").concat(le))},Ie._checkUserAgent=function(xe){var ce=xe.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return ce},Ie.checkBrowserAndVersion=function(xe,ce){return E.name===xe&&E.version.split(".")[0]===ce},Ie.parseXML=function(xe){return new Promise(function(ce,le){p.isBuffer(xe)&&(xe=xe.toString()),f.parseString(xe,{explicitRoot:!1,explicitArray:!1},function(ge,Ce){ge?le(ge):ce(Ce)})})},Ie.requestError=function(){var me=(0,g.default)(y.default.mark(function ce(le){var ge,Ce,De,je;return y.default.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(ge=null,!(!le.data||!le.data.length)){Y.next=5;break}le.status===-1||le.status===-2?(ge=new Error(le.message),ge.name=le.name,ge.status=le.status,ge.code=le.name):(le.status===404?(ge=new Error("Object not exists"),ge.name="NoSuchKeyError",ge.status=404,ge.code="NoSuchKey"):le.status===412?(ge=new Error("Pre condition failed"),ge.name="PreconditionFailedError",ge.status=412,ge.code="PreconditionFailed"):(ge=new Error("Unknow error, status: ".concat(le.status)),ge.name="UnknownError",ge.status=le.status),ge.requestId=le.headers["x-oss-request-id"],ge.host=""),Y.next=32;break;case 5:return Ce=String(le.data),this.debug("request response error data: %s",Ce,"error"),Y.prev=7,Y.next=10,this.parseXML(Ce);case 10:if(Y.t0=Y.sent,Y.t0){Y.next=13;break}Y.t0={};case 13:De=Y.t0,Y.next=23;break;case 16:return Y.prev=16,Y.t1=Y.catch(7),this.debug(Ce,"error"),Y.t1.message+=`
raw xml: `.concat(Ce),Y.t1.status=le.status,Y.t1.requestId=le.headers["x-oss-request-id"],Y.abrupt("return",Y.t1);case 23:je=De.Message||"unknow request error, status: ".concat(le.status),De.Condition&&(je+=" (condition: ".concat(De.Condition,")")),ge=new Error(je),ge.name=De.Code?"".concat(De.Code,"Error"):"UnknownError",ge.status=le.status,ge.code=De.Code,ge.requestId=De.RequestId,ge.hostId=De.HostId,ge.serverTime=De.ServerTime;case 32:return this.debug("generate error %j",ge,"error"),Y.abrupt("return",ge);case 34:case"end":return Y.stop()}},ce,this,[[7,16]])}));function xe(ce){return me.apply(this,arguments)}return xe}()}).call(this)}).call(this,{isBuffer:a("../../node_modules/is-buffer/index.js")},a("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(a,N,j){(function(p){(function(){"use strict";var c=a("@babel/runtime/helpers/interopRequireDefault"),h=c(a("@babel/runtime/regenerator"));a("core-js/modules/es.function.name.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.promise.js"),a("core-js/modules/es.array.from.js"),a("core-js/modules/es.string.iterator.js"),a("core-js/modules/es.array.map.js"),a("core-js/modules/es.array.filter.js"),a("core-js/modules/es.array.find.js"),a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.regexp.to-string.js"),a("core-js/modules/es.array.slice.js"),a("core-js/modules/es.array.iterator.js"),a("core-js/modules/es.array-buffer.slice.js"),a("core-js/modules/es.typed-array.uint8-array.js"),a("core-js/modules/es.typed-array.copy-within.js"),a("core-js/modules/es.typed-array.every.js"),a("core-js/modules/es.typed-array.fill.js"),a("core-js/modules/es.typed-array.filter.js"),a("core-js/modules/es.typed-array.find.js"),a("core-js/modules/es.typed-array.find-index.js"),a("core-js/modules/es.typed-array.for-each.js"),a("core-js/modules/es.typed-array.includes.js"),a("core-js/modules/es.typed-array.index-of.js"),a("core-js/modules/es.typed-array.iterator.js"),a("core-js/modules/es.typed-array.join.js"),a("core-js/modules/es.typed-array.last-index-of.js"),a("core-js/modules/es.typed-array.map.js"),a("core-js/modules/es.typed-array.reduce.js"),a("core-js/modules/es.typed-array.reduce-right.js"),a("core-js/modules/es.typed-array.reverse.js"),a("core-js/modules/es.typed-array.set.js"),a("core-js/modules/es.typed-array.slice.js"),a("core-js/modules/es.typed-array.some.js"),a("core-js/modules/es.typed-array.sort.js"),a("core-js/modules/es.typed-array.subarray.js"),a("core-js/modules/es.typed-array.to-locale-string.js"),a("core-js/modules/es.typed-array.to-string.js");var y=c(a("@babel/runtime/helpers/asyncToGenerator")),g=a("util"),w=a("path"),f=a("mime"),v=a("copy-to"),m=a("../common/utils/isBlob"),b=m.isBlob,x=a("../common/utils/isFile"),R=x.isFile,I=a("../common/utils/isBuffer"),E=I.isBuffer,C=j;C.multipartUpload=function(){var _=(0,y.default)(h.default.mark(function B(U,K){var G,F,W,X,re,oe,pe,ie,Ie,ee=arguments;return h.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(G=ee.length>2&&ee[2]!==void 0?ee[2]:{},this.resetCancelFlag(),G.disabledMD5=G.disabledMD5===void 0?!0:!!G.disabledMD5,!(G.checkpoint&&G.checkpoint.uploadId)){me.next=8;break}return K&&R(K)&&(G.checkpoint.file=K),me.next=7,this._resumeMultipart(G.checkpoint,G);case 7:return me.abrupt("return",me.sent);case 8:return F=102400,G.mime||(R(K)?G.mime=f.getType(w.extname(K.name)):b(K)?G.mime=K.type:E(K)?G.mime="":G.mime=f.getType(w.extname(K))),G.headers=G.headers||{},this._convertMetaToHeaders(G.meta,G.headers),me.next=14,this._getFileSize(K);case 14:if(W=me.sent,!(W<F)){me.next=26;break}return G.contentLength=W,me.next=19,this.put(U,K,G);case 19:if(X=me.sent,!(G&&G.progress)){me.next=23;break}return me.next=23,G.progress(1);case 23:return re={res:X.res,bucket:this.options.bucket,name:U,etag:X.res.headers.etag},(G.headers&&G.headers["x-oss-callback"]||G.callback)&&(re.data=X.data),me.abrupt("return",re);case 26:if(!(G.partSize&&parseInt(G.partSize,10)!==G.partSize)){me.next=28;break}throw new Error("partSize must be int number");case 28:if(!(G.partSize&&G.partSize<F)){me.next=30;break}throw new Error("partSize must not be smaller than ".concat(F));case 30:return me.next=32,this.initMultipartUpload(U,G);case 32:if(oe=me.sent,pe=oe.uploadId,ie=this._getPartSize(W,G.partSize),Ie={file:K,name:U,fileSize:W,partSize:ie,uploadId:pe,doneParts:[]},!(G&&G.progress)){me.next=39;break}return me.next=39,G.progress(0,Ie,oe.res);case 39:return me.next=41,this._resumeMultipart(Ie,G);case 41:return me.abrupt("return",me.sent);case 42:case"end":return me.stop()}},B,this)}));function k(B,U){return _.apply(this,arguments)}return k}(),C._resumeMultipart=function(){var _=(0,y.default)(h.default.mark(function B(U,K){var G,F,W,X,re,oe,pe,ie,Ie,ee,de,me,xe,ce,le,ge,Ce,De,je;return h.default.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(G=this,!this.isCancel()){Y.next=3;break}throw this._makeCancelEvent();case 3:return F=U.file,W=U.fileSize,X=U.partSize,re=U.uploadId,oe=U.doneParts,pe=U.name,ie=[],oe.length>0&&v(oe).to(ie),Ie=this._divideParts(W,X),ee=Ie.length,de=!1,me=function(q,V){return new Promise(function(){var Q=(0,y.default)(h.default.mark(function L($,S){var T,z,ne,he,Pe;return h.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(Ue.prev=0,q.isCancel()){Ue.next=29;break}return T=Ie[V-1],Ue.next=5,q._createBuffer(F,T.start,T.end);case 5:return z=Ue.sent,ne={content:z,size:T.end-T.start},Ue.prev=7,Ue.next=10,q._uploadPart(pe,re,V,ne,K);case 10:he=Ue.sent,Ue.next=18;break;case 13:if(Ue.prev=13,Ue.t0=Ue.catch(7),Ue.t0.status!==404){Ue.next=17;break}throw q._makeAbortEvent();case 17:throw Ue.t0;case 18:if(!(!q.isCancel()&&!de)){Ue.next=26;break}if(U.doneParts.push({number:V,etag:he.res.headers.etag}),!K.progress){Ue.next=23;break}return Ue.next=23,K.progress(oe.length/(ee+1),U,he.res);case 23:$({number:V,etag:he.res.headers.etag}),Ue.next=27;break;case 26:$();case 27:Ue.next=30;break;case 29:$();case 30:Ue.next=41;break;case 32:Ue.prev=32,Ue.t1=Ue.catch(0),Pe=new Error,Pe.name=Ue.t1.name,Pe.message=Ue.t1.message,Pe.stack=Ue.t1.stack,Pe.partNum=V,v(Ue.t1).to(Pe),S(Pe);case 41:case"end":return Ue.stop()}},L,null,[[0,32],[7,13]])}));return function(L,$){return Q.apply(this,arguments)}}())},xe=Array.from(new Array(ee),function(be,q){return q+1}),ce=ie.map(function(be){return be.number}),le=xe.filter(function(be){return ce.indexOf(be)<0}),ge=5,Ce=K.parallel||ge,Y.next=17,this._parallel(le,Ce,function(be){return new Promise(function(q,V){me(G,be).then(function(Q){Q&&ie.push(Q),q()}).catch(function(Q){V(Q)})})});case 17:if(De=Y.sent,de=!0,je=De.find(function(be){return be.name==="abort"}),!je){Y.next=22;break}throw je;case 22:if(!this.isCancel()){Y.next=25;break}throw me=null,this._makeCancelEvent();case 25:if(!(De&&De.length>0)){Y.next=28;break}throw De[0].message="Failed to upload some parts with error: ".concat(De[0].toString()," part_num: ").concat(De[0].partNum),De[0];case 28:return Y.next=30,this.completeMultipartUpload(pe,re,ie,K);case 30:return Y.abrupt("return",Y.sent);case 31:case"end":return Y.stop()}},B,this)}));function k(B,U){return _.apply(this,arguments)}return k}(),C._getFileSize=function(){var _=(0,y.default)(h.default.mark(function B(U){return h.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(!E(U)){G.next=4;break}return G.abrupt("return",U.length);case 4:if(!(b(U)||R(U))){G.next=6;break}return G.abrupt("return",U.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return G.stop()}},B)}));function k(B){return _.apply(this,arguments)}return k}();var P=a("stream"),Z=P.Readable;function M(_,k){if(!(this instanceof M))return new M(_,k);Z.call(this,k),this.file=_,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}g.inherits(M,Z),M.prototype.readFileAndPush=function(k){if(this.fileBuffer)for(var B=!0;B&&this.fileBuffer&&this.start<this.fileBuffer.length;){var U=this.start,K=U+k;K=K>this.fileBuffer.length?this.fileBuffer.length:K,this.start=K,B=this.push(this.fileBuffer.slice(U,K))}},M.prototype._read=function(k){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var B=16*1024;k=k||B;var U=this;this.reader.onload=function(G){U.fileBuffer=p.from(new Uint8Array(G.target.result)),U.file=null,U.readFileAndPush(k)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(k)};function J(_){return _.arrayBuffer?_.arrayBuffer():new Promise(function(k,B){var U=new FileReader;U.onload=function(K){k(K.target.result)},U.onerror=function(K){B(K)},U.readAsArrayBuffer(_)})}C._createBuffer=function(){var _=(0,y.default)(h.default.mark(function B(U,K,G){var F,W;return h.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(!(b(U)||R(U))){re.next=8;break}return F=U.slice(K,G),re.next=4,J(F);case 4:return W=re.sent,re.abrupt("return",p.from(W));case 8:if(!E(U)){re.next=12;break}return re.abrupt("return",U.subarray(K,G));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return re.stop()}},B)}));function k(B,U,K){return _.apply(this,arguments)}return k}(),C._getPartSize=function(k,B){var U=1e4,K=1*1024*1024;B||(B=K);var G=Math.ceil(k/U);return B<G&&(B=G,console.warn("partSize has been set to ".concat(B,", because the partSize you provided causes partNumber to be greater than 10,000"))),B},C._divideParts=function(k,B){for(var U=Math.ceil(k/B),K=[],G=0;G<U;G++){var F=B*G,W=Math.min(F+B,k);K.push({start:F,end:W})}return K}}).call(this)}).call(this,a("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault");a("core-js/modules/es.function.name.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.regexp.to-string.js"),a("core-js/modules/es.array.map.js"),a("core-js/modules/es.number.constructor.js"),a("core-js/modules/es.object.assign.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.replace.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js"),a("core-js/modules/es.promise.js");var c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("fs"),g=a("copy-to"),w=a("path"),f=a("mime"),v=a("../common/callback"),m=a("merge-descriptors"),b=a("../common/utils/isBlob"),x=b.isBlob,R=a("../common/utils/isFile"),I=R.isFile,E=a("../common/utils/isBuffer"),C=E.isBuffer,P=a("../common/utils/obj2xml"),Z=P.obj2xml,M=j;M.append=function(){var J=(0,h.default)(c.default.mark(function k(B,U,K){var G;return c.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return K=K||{},K.position===void 0&&(K.position="0"),K.subres={append:"",position:K.position},K.method="POST",W.next=6,this.put(B,U,K);case 6:return G=W.sent,G.nextAppendPosition=G.res.headers["x-oss-next-append-position"],W.abrupt("return",G);case 9:case"end":return W.stop()}},k,this)}));function _(k,B,U){return J.apply(this,arguments)}return _}(),M.put=function(){var J=(0,h.default)(c.default.mark(function k(B,U,K){var G,F,W,X,re;return c.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(K=K||{},K.disabledMD5=K.disabledMD5===void 0?!0:!!K.disabledMD5,K.headers=K.headers||{},B=this._objectName(B),!C(U)){pe.next=8;break}G=U,pe.next=19;break;case 8:if(!(x(U)||I(U))){pe.next=18;break}return K.mime||(I(U)?K.mime=f.getType(w.extname(U.name)):K.mime=U.type),pe.next=12,this._createBuffer(U,0,U.size);case 12:return G=pe.sent,pe.next=15,this._getFileSize(U);case 15:K.contentLength=pe.sent,pe.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(K.meta,K.headers),F=K.method||"PUT",W=this._objectRequestParams(F,B,K),v.encodeCallback(W,K),W.mime=K.mime,W.disabledMD5=K.disabledMD5,W.content=G,W.successStatuses=[200],pe.next=29,this.request(W);case 29:return X=pe.sent,re={name:B,url:this._objectUrl(B),res:X.res},W.headers&&W.headers["x-oss-callback"]&&(re.data=JSON.parse(X.data.toString())),pe.abrupt("return",re);case 33:case"end":return pe.stop()}},k,this)}));function _(k,B,U){return J.apply(this,arguments)}return _}(),M.putStream=function(){var J=(0,h.default)(c.default.mark(function k(B,U,K){var G,F,W,X;return c.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return K=K||{},K.headers=K.headers||{},B=this._objectName(B),K.contentLength?K.headers["Content-Length"]=K.contentLength:K.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(K.meta,K.headers),G=K.method||"PUT",F=this._objectRequestParams(G,B,K),v.encodeCallback(F,K),F.mime=K.mime,F.stream=U,F.successStatuses=[200],oe.next=13,this.request(F);case 13:return W=oe.sent,X={name:B,url:this._objectUrl(B),res:W.res},F.headers&&F.headers["x-oss-callback"]&&(X.data=JSON.parse(W.data.toString())),oe.abrupt("return",X);case 17:case"end":return oe.stop()}},k,this)}));function _(k,B,U){return J.apply(this,arguments)}return _}(),m(M,a("../common/object/copyObject")),m(M,a("../common/object/getObjectTagging")),m(M,a("../common/object/putObjectTagging")),m(M,a("../common/object/deleteObjectTagging")),m(M,a("../common/image")),m(M,a("../common/object/getBucketVersions")),m(M,a("../common/object/getACL")),m(M,a("../common/object/putACL")),m(M,a("../common/object/head")),m(M,a("../common/object/delete")),m(M,a("../common/object/get")),m(M,a("../common/object/putSymlink")),m(M,a("../common/object/getSymlink")),m(M,a("../common/object/deleteMulti")),m(M,a("../common/object/getObjectMeta")),m(M,a("../common/object/getObjectUrl")),m(M,a("../common/object/generateObjectUrl")),m(M,a("../common/object/signatureUrl")),m(M,a("../common/object/asyncSignatureUrl")),M.putMeta=function(){var J=(0,h.default)(c.default.mark(function k(B,U,K){var G;return c.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return W.next=2,this.copy(B,B,{meta:U||{},timeout:K&&K.timeout,ctx:K&&K.ctx});case 2:return G=W.sent,W.abrupt("return",G);case 4:case"end":return W.stop()}},k,this)}));function _(k,B,U){return J.apply(this,arguments)}return _}(),M.list=function(){var J=(0,h.default)(c.default.mark(function k(B,U){var K,G,F,W,X;return c.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return K=this._objectRequestParams("GET","",U),K.query=B,K.xmlResponse=!0,K.successStatuses=[200],oe.next=6,this.request(K);case 6:return G=oe.sent,F=G.data.Contents||[],W=this,F&&(Array.isArray(F)||(F=[F]),F=F.map(function(pe){return{name:pe.Key,url:W._objectUrl(pe.Key),lastModified:pe.LastModified,etag:pe.ETag,type:pe.Type,size:Number(pe.Size),storageClass:pe.StorageClass,owner:{id:pe.Owner.ID,displayName:pe.Owner.DisplayName}}})),X=G.data.CommonPrefixes||null,X&&(Array.isArray(X)||(X=[X]),X=X.map(function(pe){return pe.Prefix})),oe.abrupt("return",{res:G.res,objects:F,prefixes:X,nextMarker:G.data.NextMarker||null,isTruncated:G.data.IsTruncated==="true"});case 13:case"end":return oe.stop()}},k,this)}));function _(k,B){return J.apply(this,arguments)}return _}(),M.listV2=function(){var J=(0,h.default)(c.default.mark(function k(B){var U,K,G,F,W,X,re,oe=arguments;return c.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return U=oe.length>1&&oe[1]!==void 0?oe[1]:{},K=B["continuation-token"]||B.continuationToken,K&&(U.subres=Object.assign({"continuation-token":K},U.subres)),G=this._objectRequestParams("GET","",U),G.query=Object.assign({"list-type":2},B),delete G.query["continuation-token"],delete G.query.continuationToken,G.xmlResponse=!0,G.successStatuses=[200],ie.next=11,this.request(G);case 11:return F=ie.sent,W=F.data.Contents||[],X=this,W&&(Array.isArray(W)||(W=[W]),W=W.map(function(Ie){var ee=null;return Ie.Owner&&(ee={id:Ie.Owner.ID,displayName:Ie.Owner.DisplayName}),{name:Ie.Key,url:X._objectUrl(Ie.Key),lastModified:Ie.LastModified,etag:Ie.ETag,type:Ie.Type,size:Number(Ie.Size),storageClass:Ie.StorageClass,owner:ee}})),re=F.data.CommonPrefixes||null,re&&(Array.isArray(re)||(re=[re]),re=re.map(function(Ie){return Ie.Prefix})),ie.abrupt("return",{res:F.res,objects:W,prefixes:re,isTruncated:F.data.IsTruncated==="true",keyCount:+F.data.KeyCount,continuationToken:F.data.ContinuationToken||null,nextContinuationToken:F.data.NextContinuationToken||null});case 18:case"end":return ie.stop()}},k,this)}));function _(k){return J.apply(this,arguments)}return _}(),M.restore=function(){var J=(0,h.default)(c.default.mark(function k(B){var U,K,G,F,W=arguments;return c.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return U=W.length>1&&W[1]!==void 0?W[1]:{type:"Archive"},U=U||{},U.subres=Object.assign({restore:""},U.subres),U.versionId&&(U.subres.versionId=U.versionId),K=this._objectRequestParams("POST",B,U),U.type==="ColdArchive"&&(G={RestoreRequest:{Days:U.Days?U.Days:2,JobParameters:{Tier:U.JobParameters?U.JobParameters:"Standard"}}},K.content=Z(G,{headers:!0}),K.mime="xml"),K.successStatuses=[202],re.next=9,this.request(K);case 9:return F=re.sent,re.abrupt("return",{res:F.res});case 11:case"end":return re.stop()}},k,this)}));function _(k){return J.apply(this,arguments)}return _}(),M._objectUrl=function(_){return this._getReqUrl({bucket:this.options.bucket,object:_})},M._objectRequestParams=function(_,k,B){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");B=B||{},k=this._objectName(k);var U={object:k,bucket:this.options.bucket,method:_,subres:B&&B.subres,timeout:B&&B.timeout,ctx:B&&B.ctx};return B.headers&&(U.headers={},g(B.headers).to(U.headers)),U},M._objectName=function(_){return _.replace(/^\/+/,"")},M._convertMetaToHeaders=function(_,k){_&&Object.keys(_).forEach(function(B){k["x-oss-meta-".concat(B)]=_[B]})},M._deleteFileSafe=function(_){var k=this;return new Promise(function(B){y.exists(_,function(U){U?y.unlink(_,function(K){K&&k.debug("unlink %j error: %s",_,K,"error"),B()}):B()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(a,N,j){"use strict";j.version="6.18.1"},{}],7:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.abortBucketWorm=void 0;var y=a("../utils/checkBucketName");function g(f,v){return w.apply(this,arguments)}function w(){return w=(0,h.default)(c.default.mark(function f(v,m){var b,x;return c.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return y.checkBucketName(v),b=this._bucketRequestParams("DELETE",v,"worm",m),I.next=4,this.request(b);case 4:return x=I.sent,I.abrupt("return",{res:x.res,status:x.status});case 6:case"end":return I.stop()}},f,this)})),w.apply(this,arguments)}j.abortBucketWorm=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.completeBucketWorm=void 0;var y=a("../utils/checkBucketName");function g(f,v,m){return w.apply(this,arguments)}function w(){return w=(0,h.default)(c.default.mark(function f(v,m,b){var x,R;return c.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return y.checkBucketName(v),x=this._bucketRequestParams("POST",v,{wormId:m},b),E.next=4,this.request(x);case 4:return R=E.sent,E.abrupt("return",{res:R.res,status:R.status});case 6:case"end":return E.stop()}},f,this)})),w.apply(this,arguments)}j.completeBucketWorm=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.deleteBucketInventory=void 0;var y=a("../utils/checkBucketName");function g(f,v){return w.apply(this,arguments)}function w(){return w=(0,h.default)(c.default.mark(function f(v,m){var b,x,R,I,E=arguments;return c.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return b=E.length>2&&E[2]!==void 0?E[2]:{},x=Object.assign({inventory:"",inventoryId:m},b.subres),y.checkBucketName(v),R=this._bucketRequestParams("DELETE",v,x,b),R.successStatuses=[204],P.next=7,this.request(R);case 7:return I=P.sent,P.abrupt("return",{status:I.status,res:I.res});case 9:case"end":return P.stop()}},f,this)})),w.apply(this,arguments)}j.deleteBucketInventory=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/checkBucketName"),g=y.checkBucketName,w=j;w.deleteBucketLifecycle=function(){var f=(0,h.default)(c.default.mark(function m(b,x){var R,I;return c.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return g(b),R=this._bucketRequestParams("DELETE",b,"lifecycle",x),R.successStatuses=[204],C.next=5,this.request(R);case 5:return I=C.sent,C.abrupt("return",{res:I.res});case 7:case"end":return C.stop()}},m,this)}));function v(m,b){return f.apply(this,arguments)}return v}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/checkBucketName"),g=y.checkBucketName,w=j;w.deleteBucketWebsite=function(){var f=(0,h.default)(c.default.mark(function m(b,x){var R,I;return c.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return g(b),R=this._bucketRequestParams("DELETE",b,"website",x),R.successStatuses=[204],C.next=5,this.request(R);case 5:return I=C.sent,C.abrupt("return",{res:I.res});case 7:case"end":return C.stop()}},m,this)}));function v(m,b){return f.apply(this,arguments)}return v}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.extendBucketWorm=void 0;var y=a("../utils/checkBucketName"),g=a("../utils/obj2xml");function w(v,m,b,x){return f.apply(this,arguments)}function f(){return f=(0,h.default)(c.default.mark(function v(m,b,x,R){var I,E,C;return c.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return y.checkBucketName(m),I=this._bucketRequestParams("POST",m,{wormExtend:"",wormId:b},R),E={ExtendWormConfiguration:{RetentionPeriodInDays:x}},I.mime="xml",I.content=g.obj2xml(E,{headers:!0}),I.successStatuses=[200],Z.next=8,this.request(I);case 8:return C=Z.sent,Z.abrupt("return",{res:C.res,status:C.status});case 10:case"end":return Z.stop()}},v,this)})),f.apply(this,arguments)}j.extendBucketWorm=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.getBucketInventory=void 0;var y=a("../utils/checkBucketName"),g=a("../utils/formatInventoryConfig");function w(v,m){return f.apply(this,arguments)}function f(){return f=(0,h.default)(c.default.mark(function v(m,b){var x,R,I,E,C=arguments;return c.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return x=C.length>2&&C[2]!==void 0?C[2]:{},R=Object.assign({inventory:"",inventoryId:b},x.subres),y.checkBucketName(m),I=this._bucketRequestParams("GET",m,R,x),I.successStatuses=[200],I.xmlResponse=!0,Z.next=8,this.request(I);case 8:return E=Z.sent,Z.abrupt("return",{status:E.status,res:E.res,inventory:g.formatInventoryConfig(E.data)});case 10:case"end":return Z.stop()}},v,this)})),f.apply(this,arguments)}j.getBucketInventory=w},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.array.map.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/checkBucketName"),g=y.checkBucketName,w=a("../utils/isArray"),f=w.isArray,v=a("../utils/formatObjKey"),m=v.formatObjKey,b=j;b.getBucketLifecycle=function(){var x=(0,h.default)(c.default.mark(function I(E,C){var P,Z,M;return c.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return g(E),P=this._bucketRequestParams("GET",E,"lifecycle",C),P.successStatuses=[200],P.xmlResponse=!0,_.next=6,this.request(P);case 6:return Z=_.sent,M=Z.data.Rule||null,M&&(f(M)||(M=[M]),M=M.map(function(k){return k.ID&&(k.id=k.ID,delete k.ID),k.Tag&&!f(k.Tag)&&(k.Tag=[k.Tag]),m(k,"firstLowerCase")})),_.abrupt("return",{rules:M,res:Z.res});case 10:case"end":return _.stop()}},I,this)}));function R(I,E){return x.apply(this,arguments)}return R}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/checkBucketName"),g=y.checkBucketName,w=j;w.getBucketVersioning=function(){var f=(0,h.default)(c.default.mark(function m(b,x){var R,I,E;return c.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return g(b),R=this._bucketRequestParams("GET",b,"versioning",x),R.xmlResponse=!0,R.successStatuses=[200],P.next=6,this.request(R);case 6:return I=P.sent,E=I.data.Status,P.abrupt("return",{status:I.status,versionStatus:E,res:I.res});case 9:case"end":return P.stop()}},m,this)}));function v(m,b){return f.apply(this,arguments)}return v}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/checkBucketName"),g=y.checkBucketName,w=a("../utils/isObject"),f=w.isObject,v=j;v.getBucketWebsite=function(){var m=(0,h.default)(c.default.mark(function x(R,I){var E,C,P;return c.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return g(R),E=this._bucketRequestParams("GET",R,"website",I),E.successStatuses=[200],E.xmlResponse=!0,M.next=6,this.request(E);case 6:return C=M.sent,P=[],C.data.RoutingRules&&C.data.RoutingRules.RoutingRule&&(f(C.data.RoutingRules.RoutingRule)?P=[C.data.RoutingRules.RoutingRule]:P=C.data.RoutingRules.RoutingRule),M.abrupt("return",{index:C.data.IndexDocument&&C.data.IndexDocument.Suffix||"",supportSubDir:C.data.IndexDocument&&C.data.IndexDocument.SupportSubDir||"false",type:C.data.IndexDocument&&C.data.IndexDocument.Type,routingRules:P,error:C.data.ErrorDocument&&C.data.ErrorDocument.Key||null,res:C.res});case 10:case"end":return M.stop()}},x,this)}));function b(x,R){return m.apply(this,arguments)}return b}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.getBucketWorm=void 0;var y=a("../utils/checkBucketName"),g=a("../utils/dataFix");function w(v,m){return f.apply(this,arguments)}function f(){return f=(0,h.default)(c.default.mark(function v(m,b){var x,R;return c.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return y.checkBucketName(m),x=this._bucketRequestParams("GET",m,"worm",b),x.successStatuses=[200],x.xmlResponse=!0,E.next=6,this.request(x);case 6:return R=E.sent,g.dataFix(R.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),E.abrupt("return",Object.assign(Object.assign({},R.data),{res:R.res,status:R.status}));case 9:case"end":return E.stop()}},v,this)})),f.apply(this,arguments)}j.getBucketWorm=w},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.initiateBucketWorm=void 0;var y=a("../utils/obj2xml"),g=a("../utils/checkBucketName");function w(v,m,b){return f.apply(this,arguments)}function f(){return f=(0,h.default)(c.default.mark(function v(m,b,x){var R,I,E;return c.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return g.checkBucketName(m),R=this._bucketRequestParams("POST",m,"worm",x),I={InitiateWormConfiguration:{RetentionPeriodInDays:b}},R.mime="xml",R.content=y.obj2xml(I,{headers:!0}),R.successStatuses=[200],P.next=8,this.request(R);case 8:return E=P.sent,P.abrupt("return",{res:E.res,wormId:E.res.headers["x-oss-worm-id"],status:E.status});case 10:case"end":return P.stop()}},v,this)})),f.apply(this,arguments)}j.initiateBucketWorm=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.listBucketInventory=void 0;var y=a("../utils/checkBucketName"),g=a("../utils/formatInventoryConfig");function w(v){return f.apply(this,arguments)}function f(){return f=(0,h.default)(c.default.mark(function v(m){var b,x,R,I,E,C,P,Z,M=arguments;return c.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return b=M.length>1&&M[1]!==void 0?M[1]:{},x=b.continuationToken,R=Object.assign({inventory:""},x&&{"continuation-token":x},b.subres),y.checkBucketName(m),I=this._bucketRequestParams("GET",m,R,b),I.successStatuses=[200],I.xmlResponse=!0,_.next=9,this.request(I);case 9:return E=_.sent,C=E.data,P=E.res,Z=E.status,_.abrupt("return",{isTruncated:C.IsTruncated==="true",nextContinuationToken:C.NextContinuationToken,inventoryList:g.formatInventoryConfig(C.InventoryConfiguration,!0),status:Z,res:P});case 12:case"end":return _.stop()}},v,this)})),f.apply(this,arguments)}j.listBucketInventory=w},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js"),a("core-js/modules/es.array.concat.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.putBucketInventory=void 0;var y=a("../utils/checkBucketName"),g=a("../utils/obj2xml");function w(v,m){return f.apply(this,arguments)}function f(){return f=(0,h.default)(c.default.mark(function v(m,b){var x,R,I,E,C,P,Z,M,J,_,k,B=arguments;return c.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return x=B.length>2&&B[2]!==void 0?B[2]:{},R=Object.assign({inventory:"",inventoryId:b.id},x.subres),y.checkBucketName(m),I=b.OSSBucketDestination,E=b.optionalFields,C=b.includedObjectVersions,P="acs:oss:::",Z="acs:ram::".concat(I.accountId,":role/"),M={InventoryConfiguration:{Id:b.id,IsEnabled:b.isEnabled,Filter:{Prefix:b.prefix||""},Destination:{OSSBucketDestination:{Format:I.format,AccountId:I.accountId,RoleArn:"".concat(Z).concat(I.rolename),Bucket:"".concat(P).concat(I.bucket),Prefix:I.prefix||"",Encryption:I.encryption||""}},Schedule:{Frequency:b.frequency},IncludedObjectVersions:C,OptionalFields:{Field:(E==null?void 0:E.field)||[]}}},J=g.obj2xml(M,{headers:!0,firstUpperCase:!0}),_=this._bucketRequestParams("PUT",m,R,x),_.successStatuses=[200],_.mime="xml",_.content=J,K.next=14,this.request(_);case 14:return k=K.sent,K.abrupt("return",{status:k.status,res:k.res});case 16:case"end":return K.stop()}},v,this)})),f.apply(this,arguments)}j.putBucketInventory=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.array.includes.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/checkBucketName"),g=y.checkBucketName,w=a("../utils/isArray"),f=w.isArray,v=a("../utils/deepCopy"),m=v.deepCopy,b=a("../utils/isObject"),x=b.isObject,R=a("../utils/obj2xml"),I=R.obj2xml,E=a("../utils/checkObjectTag"),C=E.checkObjectTag,P=a("../utils/getStrBytesCount"),Z=P.getStrBytesCount,M=j;M.putBucketLifecycle=function(){var U=(0,h.default)(c.default.mark(function G(F,W,X){var re,oe,pe,ie,Ie;return c.default.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:if(g(F),f(W)){de.next=3;break}throw new Error("rules must be Array");case 3:return re=this._bucketRequestParams("PUT",F,"lifecycle",X),oe=[],pe={LifecycleConfiguration:{Rule:oe}},W.forEach(function(me){J(me),B(me),me.id&&(me.ID=me.id,delete me.id),oe.push(me)}),ie=I(pe,{headers:!0,firstUpperCase:!0}),re.content=ie,re.mime="xml",re.successStatuses=[200],de.next=13,this.request(re);case 13:return Ie=de.sent,de.abrupt("return",{res:Ie.res});case 15:case"end":return de.stop()}},G,this)}));function K(G,F,W){return U.apply(this,arguments)}return K}();function J(U){U.days&&(U.expiration={days:U.days}),U.date&&(U.expiration={createdBeforeDate:U.date})}function _(U,K){var G=U.days,F=U.createdBeforeDate;if(!G&&!F)throw new Error("".concat(K," must includes days or createdBeforeDate"));if(G&&!/^[1-9][0-9]*$/.test(G))throw new Error("days must be a positive integer");if(F&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(F))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function k(U){if(!f(U)&&!x(U))throw new Error("tag must be Object or Array");U=x(U)?[U]:U;var K={},G=m(U);G.forEach(function(F){K[F.key]=F.value}),C(K)}function B(U){if(U.id&&Z(U.id)>255)throw new Error("ID is composed of 255 bytes at most");if(U.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(U.status))throw new Error("Status must be Enabled or Disabled");if(U.transition){if(!["IA","Archive"].includes(U.transition.storageClass))throw new Error("StorageClass must be IA or Archive");_(U.transition,"Transition")}if(U.expiration){if(!U.expiration.expiredObjectDeleteMarker)_(U.expiration,"Expiration");else if(U.expiration.days||U.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(U.abortMultipartUpload&&_(U.abortMultipartUpload,"AbortMultipartUpload"),!U.expiration&&!U.abortMultipartUpload&&!U.transition&&!U.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(U.tag){if(U.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");k(U.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.array.includes.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/checkBucketName"),g=y.checkBucketName,w=a("../utils/obj2xml"),f=w.obj2xml,v=j;v.putBucketVersioning=function(){var m=(0,h.default)(c.default.mark(function x(R,I){var E,C,P,Z,M=arguments;return c.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(E=M.length>2&&M[2]!==void 0?M[2]:{},g(R),["Enabled","Suspended"].includes(I)){_.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return C=this._bucketRequestParams("PUT",R,"versioning",E),P={VersioningConfiguration:{Status:I}},C.mime="xml",C.content=f(P,{headers:!0}),_.next=10,this.request(C);case 10:return Z=_.sent,_.abrupt("return",{res:Z.res,status:Z.status});case 12:case"end":return _.stop()}},x,this)}));function b(x,R){return m.apply(this,arguments)}return b}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/checkBucketName"),g=y.checkBucketName,w=a("../utils/obj2xml"),f=w.obj2xml,v=a("../utils/isArray"),m=v.isArray,b=j;b.putBucketWebsite=function(){var x=(0,h.default)(c.default.mark(function I(E){var C,P,Z,M,J,_,k,B=arguments;return c.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(C=B.length>1&&B[1]!==void 0?B[1]:{},P=B.length>2?B[2]:void 0,g(E),Z=this._bucketRequestParams("PUT",E,"website",P),M={Suffix:C.index||"index.html"},J={IndexDocument:M},_={WebsiteConfiguration:J},C.supportSubDir&&(M.SupportSubDir=C.supportSubDir),C.type&&(M.Type=C.type),C.error&&(J.ErrorDocument={Key:C.error}),C.routingRules===void 0){K.next=14;break}if(m(C.routingRules)){K.next=13;break}throw new Error("RoutingRules must be Array");case 13:J.RoutingRules={RoutingRule:C.routingRules};case 14:return _=f(_),Z.content=_,Z.mime="xml",Z.successStatuses=[200],K.next=20,this.request(Z);case 20:return k=K.sent,K.abrupt("return",{res:k.res});case 22:case"end":return K.stop()}},I,this)}));function R(I){return x.apply(this,arguments)}return R}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(a,N,j){(function(p){(function(){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.regexp.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js"),j.encodeCallback=function(h,y){if(h.headers=h.headers||{},!Object.prototype.hasOwnProperty.call(h.headers,"x-oss-callback")&&y.callback){var g={callbackUrl:encodeURI(y.callback.url),callbackBody:y.callback.body};y.callback.host&&(g.callbackHost=y.callback.host),y.callback.contentType&&(g.callbackBodyType=y.callback.contentType);var w=p.from(JSON.stringify(g)).toString("base64");if(h.headers["x-oss-callback"]=w,y.callback.customValue){var f={};Object.keys(y.callback.customValue).forEach(function(v){f["x:".concat(v)]=y.callback.customValue[v].toString()}),h.headers["x-oss-callback-var"]=p.from(JSON.stringify(f)).toString("base64")}}}}).call(this)}).call(this,a("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(a,N,j){"use strict";a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.replace.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js");var p=function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(j,"__esModule",{value:!0}),j.getReqUrl=void 0;var c=p(a("copy-to")),h=p(a("url")),y=p(a("merge-descriptors")),g=p(a("is-type-of")),w=a("../utils/isIP"),f=a("../utils/checkConfigValid");function v(m){var b={},x=this.options.cname;f.checkConfigValid(this.options.endpoint,"endpoint"),c.default(this.options.endpoint,!1).to(b),m.bucket&&!x&&!w.isIP(b.hostname)&&!this.options.sldEnable&&(b.host="".concat(m.bucket,".").concat(b.host));var R="/";m.bucket&&this.options.sldEnable&&(R+="".concat(m.bucket,"/")),m.object&&(R+=this._escape(m.object).replace(/\+/g,"%2B")),b.pathname=R;var I={};if(m.query&&y.default(I,m.query),m.subres){var E={};g.default.string(m.subres)?E[m.subres]="":g.default.array(m.subres)?m.subres.forEach(function(C){E[C]=""}):E=m.subres,y.default(I,E)}return b.query=I,h.default.format(b)}j.getReqUrl=v},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(a,N,j){"use strict";a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.object.assign.js"),a("core-js/modules/es.string.trim.js");var p=a("humanize-ms"),c=a("url"),h=a("../utils/checkBucketName"),y=h.checkBucketName,g=a("../utils/setRegion"),w=g.setRegion,f=a("../utils/checkConfigValid"),v=f.checkConfigValid;function m(b,x){v(b,"endpoint");var R=c.parse(b);if(R.protocol||(R=c.parse("http".concat(x?"s":"","://").concat(b))),R.protocol!=="http:"&&R.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return R}N.exports=function(b){if(!b||!b.accessKeyId||!b.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");b.stsToken&&!b.refreshSTSToken&&!b.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),b.bucket&&y(b.bucket);var x=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},b);if(x.accessKeyId=x.accessKeyId.trim(),x.accessKeySecret=x.accessKeySecret.trim(),x.timeout&&(x.timeout=p(x.timeout)),x.endpoint)x.endpoint=m(x.endpoint,x.secure);else if(x.region)x.endpoint=w(x.region,x.internal,x.secure);else throw new Error("require options.endpoint or options.region");return x.inited=!0,x}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(a,N,j){"use strict";var p=a("merge-descriptors"),c=j;p(c,a("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.array.concat.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/checkBucketName"),g=y.checkBucketName,w=a("querystring"),f=a("js-base64"),v=f.Base64.encode,m=j;m.processObjectSave=function(){var x=(0,h.default)(c.default.mark(function I(E,C,P,Z){var M,J,_,k;return c.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return b(E,"sourceObject"),b(C,"targetObject"),b(P,"process"),C=this._objectName(C),Z&&g(Z),M=this._objectRequestParams("POST",E,{subres:"x-oss-process"}),J=Z?",b_".concat(v(Z)):"",C=v(C),_={"x-oss-process":"".concat(P,"|sys/saveas,o_").concat(C).concat(J)},M.content=w.stringify(_),U.next=12,this.request(M);case 12:return k=U.sent,U.abrupt("return",{res:k.res,status:k.res.status});case 14:case"end":return U.stop()}},I,this)}));function R(I,E,C,P){return x.apply(this,arguments)}return R}();function b(x,R){if(!x)throw new Error("".concat(R," is required"));if(typeof x!="string")throw new Error("".concat(R," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.function.name.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.promise.js"),a("core-js/modules/es.array.from.js"),a("core-js/modules/es.string.iterator.js"),a("core-js/modules/es.array.map.js"),a("core-js/modules/es.array.filter.js"),a("core-js/modules/es.array.find.js"),a("core-js/modules/es.regexp.to-string.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("debug")("ali-oss:multipart-copy"),g=a("copy-to"),w=j;w.uploadPartCopy=function(){var f=(0,h.default)(c.default.mark(function m(b,x,R,I,E){var C,P,Z,M,J,_=arguments;return c.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return C=_.length>5&&_[5]!==void 0?_[5]:{},C.headers=C.headers||{},P=C.versionId||C.subres&&C.subres.versionId||null,P?Z="/".concat(E.sourceBucketName,"/").concat(encodeURIComponent(E.sourceKey),"?versionId=").concat(P):Z="/".concat(E.sourceBucketName,"/").concat(encodeURIComponent(E.sourceKey)),C.headers["x-oss-copy-source"]=Z,I&&(C.headers["x-oss-copy-source-range"]="bytes=".concat(I)),C.subres={partNumber:R,uploadId:x},M=this._objectRequestParams("PUT",b,C),M.mime=C.mime,M.successStatuses=[200],B.next=12,this.request(M);case 12:return J=B.sent,B.abrupt("return",{name:b,etag:J.res.headers.etag,res:J.res});case 14:case"end":return B.stop()}},m,this)}));function v(m,b,x,R,I){return f.apply(this,arguments)}return v}(),w.multipartUploadCopy=function(){var f=(0,h.default)(c.default.mark(function m(b,x){var R,I,E,C,P,Z,M,J,_,k,B,U,K=arguments;return c.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return R=K.length>2&&K[2]!==void 0?K[2]:{},this.resetCancelFlag(),I=R.versionId,E=I===void 0?null:I,C={versionId:E},F.next=6,this._getObjectMeta(x.sourceBucketName,x.sourceKey,C);case 6:if(P=F.sent,Z=P.res.headers["content-length"],x.startOffset=x.startOffset||0,x.endOffset=x.endOffset||Z,!(R.checkpoint&&R.checkpoint.uploadId)){F.next=14;break}return F.next=13,this._resumeMultipartCopy(R.checkpoint,x,R);case 13:return F.abrupt("return",F.sent);case 14:if(M=102400,J=x.endOffset-x.startOffset,!(J<M)){F.next=18;break}throw new Error("copySize must not be smaller than ".concat(M));case 18:if(!(R.partSize&&R.partSize<M)){F.next=20;break}throw new Error("partSize must not be smaller than ".concat(M));case 20:return F.next=22,this.initMultipartUpload(b,R);case 22:if(_=F.sent,k=_.uploadId,B=this._getPartSize(J,R.partSize),U={name:b,copySize:J,partSize:B,uploadId:k,doneParts:[]},!(R&&R.progress)){F.next=29;break}return F.next=29,R.progress(0,U,_.res);case 29:return F.next=31,this._resumeMultipartCopy(U,x,R);case 31:return F.abrupt("return",F.sent);case 32:case"end":return F.stop()}},m,this)}));function v(m,b){return f.apply(this,arguments)}return v}(),w._resumeMultipartCopy=function(){var f=(0,h.default)(c.default.mark(function m(b,x,R){var I,E,C,P,Z,M,J,_,k,B,U,K,G,F,W,X,re,oe,pe,ie,Ie;return c.default.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:if(!this.isCancel()){de.next=2;break}throw this._makeCancelEvent();case 2:if(I=R.versionId,E=I===void 0?null:I,C={versionId:E},P=b.copySize,Z=b.partSize,M=b.uploadId,J=b.doneParts,_=b.name,k=this._divideMultipartCopyParts(P,Z,x.startOffset),B=k.length,U={headers:{}},R.copyheaders&&g(R.copyheaders).to(U.headers),E&&g(C).to(U),K=function(xe,ce,le){return new Promise(function(){var ge=(0,h.default)(c.default.mark(function Ce(De,je){var fe,Y,be;return c.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(V.prev=0,xe.isCancel()){V.next=22;break}return fe=k[ce-1],Y="".concat(fe.start,"-").concat(fe.end-1),V.prev=4,V.next=7,xe.uploadPartCopy(_,M,ce,Y,le,U);case 7:be=V.sent,V.next=15;break;case 10:if(V.prev=10,V.t0=V.catch(4),V.t0.status!==404){V.next=14;break}throw xe._makeAbortEvent();case 14:throw V.t0;case 15:if(xe.isCancel()){V.next=22;break}if(y("content-range ".concat(be.res.headers["content-range"])),J.push({number:ce,etag:be.res.headers.etag}),b.doneParts=J,!(R&&R.progress)){V.next=22;break}return V.next=22,R.progress(J.length/B,b,be.res);case 22:De(),V.next=29;break;case 25:V.prev=25,V.t1=V.catch(0),V.t1.partNum=ce,je(V.t1);case 29:case"end":return V.stop()}},Ce,null,[[0,25],[4,10]])}));return function(Ce,De){return ge.apply(this,arguments)}}())},G=Array.from(new Array(B),function(me,xe){return xe+1}),F=J.map(function(me){return me.number}),W=G.filter(function(me){return F.indexOf(me)<0}),X=5,re=R.parallel||X,!(this.checkBrowserAndVersion("Internet Explorer","10")||re===1)){de.next=28;break}oe=0;case 18:if(!(oe<W.length)){de.next=26;break}if(!this.isCancel()){de.next=21;break}throw this._makeCancelEvent();case 21:return de.next=23,K(this,W[oe],x);case 23:oe++,de.next=18;break;case 26:de.next=40;break;case 28:return de.next=30,this._parallelNode(W,re,K,x);case 30:if(pe=de.sent,ie=pe.find(function(me){return me.name==="abort"}),!ie){de.next=34;break}throw ie;case 34:if(!this.isCancel()){de.next=36;break}throw this._makeCancelEvent();case 36:if(!(pe&&pe.length>0)){de.next=40;break}throw Ie=pe[0],Ie.message="Failed to copy some parts with error: ".concat(Ie.toString()," part_num: ").concat(Ie.partNum),Ie;case 40:return de.next=42,this.completeMultipartUpload(_,M,J,R);case 42:return de.abrupt("return",de.sent);case 43:case"end":return de.stop()}},m,this)}));function v(m,b,x){return f.apply(this,arguments)}return v}(),w._divideMultipartCopyParts=function(v,m,b){for(var x=Math.ceil(v/m),R=[],I=0;I<x;I++){var E=m*I+b,C=Math.min(E+m,v+b);R.push({start:E,end:C})}return R},w._getObjectMeta=function(){var f=(0,h.default)(c.default.mark(function m(b,x,R){var I,E;return c.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return I=this.getBucket(),this.setBucket(b),P.next=4,this.head(x,R);case 4:return E=P.sent,this.setBucket(I),P.abrupt("return",E);case 7:case"end":return P.stop()}},m,this)}));function v(m,b,x){return f.apply(this,arguments)}return v}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(a,N,j){(function(p){(function(){"use strict";var c=a("@babel/runtime/helpers/interopRequireDefault"),h=c(a("@babel/runtime/regenerator"));a("core-js/modules/es.array.map.js"),a("core-js/modules/es.array.filter.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.array.sort.js"),a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.regexp.to-string.js");var y=c(a("@babel/runtime/helpers/asyncToGenerator")),g=a("copy-to"),w=a("./callback"),f=a("./utils/deepCopy"),v=f.deepCopyWith,m=a("./utils/isBuffer"),b=m.isBuffer,x=a("./utils/omit"),R=x.omit,I=j;I.listUploads=function(){var E=(0,y.default)(h.default.mark(function P(Z,M){var J,_,k,B;return h.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return M=M||{},J={},g(M).to(J),J.subres="uploads",_=this._objectRequestParams("GET","",J),_.query=Z,_.xmlResponse=!0,_.successStatuses=[200],K.next=10,this.request(_);case 10:return k=K.sent,B=k.data.Upload||[],Array.isArray(B)||(B=[B]),B=B.map(function(G){return{name:G.Key,uploadId:G.UploadId,initiated:G.Initiated}}),K.abrupt("return",{res:k.res,uploads:B,bucket:k.data.Bucket,nextKeyMarker:k.data.NextKeyMarker,nextUploadIdMarker:k.data.NextUploadIdMarker,isTruncated:k.data.IsTruncated==="true"});case 15:case"end":return K.stop()}},P,this)}));function C(P,Z){return E.apply(this,arguments)}return C}(),I.listParts=function(){var E=(0,y.default)(h.default.mark(function P(Z,M,J,_){var k,B,U;return h.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return _=_||{},k={},g(_).to(k),k.subres={uploadId:M},B=this._objectRequestParams("GET",Z,k),B.query=J,B.xmlResponse=!0,B.successStatuses=[200],G.next=10,this.request(B);case 10:return U=G.sent,G.abrupt("return",{res:U.res,uploadId:U.data.UploadId,bucket:U.data.Bucket,name:U.data.Key,partNumberMarker:U.data.PartNumberMarker,nextPartNumberMarker:U.data.NextPartNumberMarker,maxParts:U.data.MaxParts,isTruncated:U.data.IsTruncated,parts:U.data.Part||[]});case 12:case"end":return G.stop()}},P,this)}));function C(P,Z,M,J){return E.apply(this,arguments)}return C}(),I.abortMultipartUpload=function(){var E=(0,y.default)(h.default.mark(function P(Z,M,J){var _,k,B;return h.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return this._stop(),J=J||{},_={},g(J).to(_),_.subres={uploadId:M},k=this._objectRequestParams("DELETE",Z,_),k.successStatuses=[204],K.next=9,this.request(k);case 9:return B=K.sent,K.abrupt("return",{res:B.res});case 11:case"end":return K.stop()}},P,this)}));function C(P,Z,M){return E.apply(this,arguments)}return C}(),I.initMultipartUpload=function(){var E=(0,y.default)(h.default.mark(function P(Z,M){var J,_,k;return h.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return M=M||{},J={},g(M).to(J),J.headers=J.headers||{},this._convertMetaToHeaders(M.meta,J.headers),J.subres="uploads",_=this._objectRequestParams("POST",Z,J),_.mime=M.mime,_.xmlResponse=!0,_.successStatuses=[200],U.next=12,this.request(_);case 12:return k=U.sent,U.abrupt("return",{res:k.res,bucket:k.data.Bucket,name:k.data.Key,uploadId:k.data.UploadId});case 14:case"end":return U.stop()}},P,this)}));function C(P,Z){return E.apply(this,arguments)}return C}(),I.uploadPart=function(){var E=(0,y.default)(h.default.mark(function P(Z,M,J,_,k,B,U){var K,G;return h.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(K={size:B-k},G=p&&p.browser,!G){W.next=8;break}return W.next=5,this._createBuffer(_,k,B);case 5:K.content=W.sent,W.next=11;break;case 8:return W.next=10,this._createStream(_,k,B);case 10:K.stream=W.sent;case 11:return W.next=13,this._uploadPart(Z,M,J,K,U);case 13:return W.abrupt("return",W.sent);case 14:case"end":return W.stop()}},P,this)}));function C(P,Z,M,J,_,k,B){return E.apply(this,arguments)}return C}(),I.completeMultipartUpload=function(){var E=(0,y.default)(h.default.mark(function P(Z,M,J,_){var k,B,U,K,G,F,W,X;return h.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:for(k=J.concat().sort(function(pe,ie){return pe.number-ie.number}).filter(function(pe,ie,Ie){return!ie||pe.number!==Ie[ie-1].number}),B=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,U=0;U<k.length;U++)K=k[U],B+=`<Part>
`,B+="<PartNumber>".concat(K.number,`</PartNumber>
`),B+="<ETag>".concat(K.etag,`</ETag>
`),B+=`</Part>
`;return B+="</CompleteMultipartUpload>",_=_||{},G={},G=v(_,function(pe){if(b(pe))return null}),G.subres={uploadId:M},G.headers=R(G.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),F=this._objectRequestParams("POST",Z,G),w.encodeCallback(F,G),F.mime="xml",F.content=B,F.headers&&F.headers["x-oss-callback"]||(F.xmlResponse=!0),F.successStatuses=[200],oe.next=17,this.request(F);case 17:if(W=oe.sent,!_.progress){oe.next=21;break}return oe.next=21,_.progress(1,null,W.res);case 21:return X={res:W.res,bucket:F.bucket,name:Z,etag:W.res.headers.etag},F.headers&&F.headers["x-oss-callback"]&&(X.data=JSON.parse(W.data.toString())),oe.abrupt("return",X);case 24:case"end":return oe.stop()}},P,this)}));function C(P,Z,M,J){return E.apply(this,arguments)}return C}(),I._uploadPart=function(){var E=(0,y.default)(h.default.mark(function P(Z,M,J,_,k){var B,U,K,G;return h.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return k=k||{},B={},g(k).to(B),B.headers=B.headers||{},B.headers["Content-Length"]=_.size,B.headers=R(B.headers,["x-oss-server-side-encryption"]),B.subres={partNumber:J,uploadId:M},U=this._objectRequestParams("PUT",Z,B),U.mime=B.mime,K=p&&p.browser,K?U.content=_.content:U.stream=_.stream,U.successStatuses=[200],U.disabledMD5=k.disabledMD5,W.next=15,this.request(U);case 15:if(G=W.sent,G.res.headers.etag){W.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 18:return _.stream&&(_.stream=null,U.stream=null),W.abrupt("return",{name:Z,etag:G.res.headers.etag,res:G.res});case 20:case"end":return W.stop()}},P,this)}));function C(P,Z,M,J,_){return E.apply(this,arguments)}return C}()}).call(this)}).call(this,a("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator")),h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("url"),g=a("utility"),w=a("copy-to"),f=a("../../common/signUtils"),v=a("../utils/isIP"),m=v.isIP,b=a("../utils/setSTSToken"),x=b.setSTSToken,R=a("../utils/isFunction"),I=R.isFunction,E=j;E.asyncSignatureUrl=function(){var C=(0,h.default)(c.default.mark(function Z(M,J){var _,k,B,U,K;return c.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(!m(this.options.endpoint.hostname)){F.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(J=J||{},M=this._objectName(M),J.method=J.method||"GET",_=g.timestamp()+(J.expires||1800),k={bucket:this.options.bucket,object:M},B=this._getResource(k),!(this.options.stsToken&&I(this.options.refreshSTSToken))){F.next=11;break}return F.next=11,x.call(this);case 11:return this.options.stsToken&&(J["security-token"]=this.options.stsToken),U=f._signatureForURL(this.options.accessKeySecret,J,B,_),K=y.parse(this._getReqUrl(k)),K.query={OSSAccessKeyId:this.options.accessKeyId,Expires:_,Signature:U.Signature},w(U.subResource).to(K.query),F.abrupt("return",K.format());case 17:case"end":return F.stop()}},Z,this)}));function P(Z,M){return C.apply(this,arguments)}return P}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js"),a("core-js/modules/es.array.find.js"),a("core-js/modules/es.array.includes.js"),a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.replace.js");var h=p(a("@babel/runtime/helpers/typeof")),y=p(a("@babel/runtime/helpers/asyncToGenerator")),g=a("../utils/checkBucketName"),w=g.checkBucketName,f=j,v=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];f.copy=function(){var m=(0,y.default)(c.default.mark(function x(R,I,E,C){var P,Z,M;return c.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return(0,h.default)(E)==="object"&&(C=E),C=C||{},C.headers=C.headers||{},Object.keys(C.headers).forEach(function(k){C.headers["x-oss-copy-source-".concat(k.toLowerCase())]=C.headers[k]}),(C.meta||Object.keys(C.headers).find(function(k){return v.includes(k.toLowerCase())}))&&(C.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(C.meta,C.headers),I=this._getSourceName(I,E),C.versionId&&(I="".concat(I,"?versionId=").concat(C.versionId)),C.headers["x-oss-copy-source"]=I,P=this._objectRequestParams("PUT",R,C),P.xmlResponse=!0,P.successStatuses=[200,304],_.next=14,this.request(P);case 14:return Z=_.sent,M=Z.data,M&&(M={etag:M.ETag,lastModified:M.LastModified}),_.abrupt("return",{data:M,res:Z.res});case 18:case"end":return _.stop()}},x,this)}));function b(x,R,I,E){return m.apply(this,arguments)}return b}(),f._getSourceName=function(b,x){return typeof x=="string"?b=this._objectName(b):b[0]!=="/"?x=this.options.bucket:(x=b.replace(/\/(.+?)(\/.*)/,"$1"),b=b.replace(/(\/.+?\/)(.*)/,"$2")),w(x),b=encodeURIComponent(b),b="/".concat(x,"/").concat(b),b}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=j;y.delete=function(){var g=(0,h.default)(c.default.mark(function f(v){var m,b,x,R=arguments;return c.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return m=R.length>1&&R[1]!==void 0?R[1]:{},m.subres=Object.assign({},m.subres),m.versionId&&(m.subres.versionId=m.versionId),b=this._objectRequestParams("DELETE",v,m),b.successStatuses=[204],E.next=7,this.request(b);case 7:return x=E.sent,E.abrupt("return",{res:x.res});case 9:case"end":return E.stop()}},f,this)}));function w(f){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("utility"),g=a("../utils/obj2xml"),w=g.obj2xml,f=j;f.deleteMulti=function(){var v=(0,h.default)(c.default.mark(function b(x){var R,I,E,C,P,Z,M,J,_,k,B,U,K,G=arguments;return c.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(R=G.length>1&&G[1]!==void 0?G[1]:{},I=[],!(!x||!x.length)){W.next=4;break}throw new Error("names is required");case 4:for(E=0;E<x.length;E++)C={},typeof x[E]=="string"?C.Key=y.escape(this._objectName(x[E])):(P=x[E],Z=P.key,M=P.versionId,C.Key=y.escape(this._objectName(Z)),C.VersionId=M),I.push(C);return J={Delete:{Quiet:!!R.quiet,Object:I}},_=w(J,{headers:!0}),R.subres=Object.assign({delete:""},R.subres),R.versionId&&(R.subres.versionId=R.versionId),k=this._objectRequestParams("POST","",R),k.mime="xml",k.content=_,k.xmlResponse=!0,k.successStatuses=[200],W.next=16,this.request(k);case 16:return B=W.sent,U=B.data,K=U&&U.Deleted||null,K&&(Array.isArray(K)||(K=[K])),W.abrupt("return",{res:B.res,deleted:K||[]});case 21:case"end":return W.stop()}},b,this)}));function m(b){return v.apply(this,arguments)}return m}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=j;y.deleteObjectTagging=function(){var g=(0,h.default)(c.default.mark(function f(v){var m,b,x,R=arguments;return c.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return m=R.length>1&&R[1]!==void 0?R[1]:{},m.subres=Object.assign({tagging:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),v=this._objectName(v),b=this._objectRequestParams("DELETE",v,m),b.successStatuses=[204],E.next=8,this.request(b);case 8:return x=E.sent,E.abrupt("return",{status:x.status,res:x.res});case 10:case"end":return E.stop()}},f,this)}));function w(f){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(a,N,j){"use strict";a("core-js/modules/es.array.concat.js");var p=a("url"),c=a("../utils/isIP"),h=c.isIP,y=j;y.generateObjectUrl=function(w,f){if(h(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(f)f[f.length-1]!=="/"&&(f+="/");else{f=this.options.endpoint.format();var v=p.parse(f),m=this.options.bucket;v.hostname="".concat(m,".").concat(v.hostname),v.host="".concat(m,".").concat(v.host),f=v.format()}return f+this._escape(this._objectName(w))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(a,N,j){(function(p){(function(){"use strict";var c=a("@babel/runtime/helpers/interopRequireDefault"),h=c(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var y=c(a("@babel/runtime/helpers/asyncToGenerator")),g=a("fs"),w=a("is-type-of"),f=j;f.get=function(){var v=(0,y.default)(h.default.mark(function b(x,R){var I,E,C,P,Z,M,J,_,k=arguments;return h.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return I=k.length>2&&k[2]!==void 0?k[2]:{},E=null,C=!1,w.writableStream(R)?E=R:w.string(R)?(E=g.createWriteStream(R),C=!0):I=R,I=I||{},P=p&&p.browser,Z=I.responseCacheControl===null?"":"no-cache",M=P&&Z?{"response-cache-control":Z}:{},I.subres=Object.assign(M,I.subres),I.versionId&&(I.subres.versionId=I.versionId),I.process&&(I.subres["x-oss-process"]=I.process),U.prev=11,_=this._objectRequestParams("GET",x,I),_.writeStream=E,_.successStatuses=[200,206,304],U.next=17,this.request(_);case 17:J=U.sent,C&&E.destroy(),U.next=28;break;case 21:if(U.prev=21,U.t0=U.catch(11),!C){U.next=27;break}return E.destroy(),U.next=27,this._deleteFileSafe(R);case 27:throw U.t0;case 28:return U.abrupt("return",{res:J.res,content:J.data});case 29:case"end":return U.stop()}},b,this,[[11,21]])}));function m(b,x){return v.apply(this,arguments)}return m}()}).call(this)}).call(this,a("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=j;y.getACL=function(){var g=(0,h.default)(c.default.mark(function f(v){var m,b,x,R=arguments;return c.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return m=R.length>1&&R[1]!==void 0?R[1]:{},m.subres=Object.assign({acl:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),v=this._objectName(v),b=this._objectRequestParams("GET",v,m),b.successStatuses=[200],b.xmlResponse=!0,E.next=9,this.request(b);case 9:return x=E.sent,E.abrupt("return",{acl:x.data.AccessControlList.Grant,owner:{id:x.data.Owner.ID,displayName:x.data.Owner.DisplayName},res:x.res});case 11:case"end":return E.stop()}},f,this)}));function w(f){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.replace.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js"),a("core-js/modules/es.object.assign.js"),a("core-js/modules/es.array.map.js"),a("core-js/modules/es.number.constructor.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=j,g=a("../utils/isObject"),w=g.isObject,f=a("../utils/isArray"),v=f.isArray;y.getBucketVersions=m,y.listObjectVersions=m;function m(){return b.apply(this,arguments)}function b(){return b=(0,h.default)(c.default.mark(function I(){var E,C,P,Z,M,J,_,k,B=arguments;return c.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(E=B.length>0&&B[0]!==void 0?B[0]:{},C=B.length>1&&B[1]!==void 0?B[1]:{},!(E.versionIdMarker&&E.keyMarker===void 0)){K.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return C.subres=Object.assign({versions:""},C.subres),C.versionId&&(C.subres.versionId=C.versionId),P=this._objectRequestParams("GET","",C),P.xmlResponse=!0,P.successStatuses=[200],P.query=R(E),K.next=12,this.request(P);case 12:return Z=K.sent,M=Z.data.Version||[],J=Z.data.DeleteMarker||[],_=this,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(G){return{name:G.Key,url:_._objectUrl(G.Key),lastModified:G.LastModified,isLatest:G.IsLatest==="true",versionId:G.VersionId,etag:G.ETag,type:G.Type,size:Number(G.Size),storageClass:G.StorageClass,owner:{id:G.Owner.ID,displayName:G.Owner.DisplayName}}})),J&&(v(J)||(J=[J]),J=J.map(function(G){return{name:G.Key,lastModified:G.LastModified,versionId:G.VersionId,owner:{id:G.Owner.ID,displayName:G.Owner.DisplayName}}})),k=Z.data.CommonPrefixes||null,k&&(v(k)||(k=[k]),k=k.map(function(G){return G.Prefix})),K.abrupt("return",{res:Z.res,objects:M,deleteMarker:J,prefixes:k,nextMarker:Z.data.NextKeyMarker||null,NextVersionIdMarker:Z.data.NextVersionIdMarker||null,nextKeyMarker:Z.data.NextKeyMarker||null,nextVersionIdMarker:Z.data.NextVersionIdMarker||null,isTruncated:Z.data.IsTruncated==="true"});case 21:case"end":return K.stop()}},I,this)})),b.apply(this,arguments)}function x(I){return I.replace(/([A-Z])/g,"-$1").toLowerCase()}function R(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E={};return w(I)&&Object.keys(I).forEach(function(C){E[x(C)]=I[C]}),E}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=j;y.getObjectMeta=function(){var g=(0,h.default)(c.default.mark(function f(v,m){var b,x;return c.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return m=m||{},v=this._objectName(v),m.subres=Object.assign({objectMeta:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),b=this._objectRequestParams("HEAD",v,m),b.successStatuses=[200],I.next=8,this.request(b);case 8:return x=I.sent,I.abrupt("return",{status:x.status,res:x.res});case 10:case"end":return I.stop()}},f,this)}));function w(f,v){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=j,g=a("../utils/isObject"),w=g.isObject;y.getObjectTagging=function(){var f=(0,h.default)(c.default.mark(function m(b){var x,R,I,E,C,P,Z=arguments;return c.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return x=Z.length>1&&Z[1]!==void 0?Z[1]:{},x.subres=Object.assign({tagging:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),b=this._objectName(b),R=this._objectRequestParams("GET",b,x),R.successStatuses=[200],J.next=8,this.request(R);case 8:return I=J.sent,J.next=11,this.parseXML(I.data);case 11:return E=J.sent,C=E.TagSet.Tag,C=C&&w(C)?[C]:C||[],P={},C.forEach(function(_){P[_.Key]=_.Value}),J.abrupt("return",{status:I.status,res:I.res,tag:P});case 17:case"end":return J.stop()}},m,this)}));function v(m){return f.apply(this,arguments)}return v}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(a,N,j){"use strict";var p=a("../utils/isIP"),c=p.isIP,h=j;h.getObjectUrl=function(g,w){if(c(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return w?w[w.length-1]!=="/"&&(w+="/"):w=this.options.endpoint.format(),w+this._escape(this._objectName(g))}},{"../utils/isIP":69}],43:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=j;y.getSymlink=function(){var g=(0,h.default)(c.default.mark(function f(v){var m,b,x,R,I=arguments;return c.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return m=I.length>1&&I[1]!==void 0?I[1]:{},m.subres=Object.assign({symlink:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),v=this._objectName(v),b=this._objectRequestParams("GET",v,m),b.successStatuses=[200],C.next=8,this.request(b);case 8:return x=C.sent,R=x.res.headers["x-oss-symlink-target"],C.abrupt("return",{targetName:decodeURIComponent(R),res:x.res});case 11:case"end":return C.stop()}},f,this)}));function w(f){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/checkEnv"),g=y.checkEnv,w=j;w.head=function(){var f=(0,h.default)(c.default.mark(function m(b){var x,R,I,E,C=arguments;return c.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return x=C.length>1&&C[1]!==void 0?C[1]:{},g("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),x.subres=Object.assign({},x.subres),x.versionId&&(x.subres.versionId=x.versionId),R=this._objectRequestParams("HEAD",b,x),R.successStatuses=[200,304],Z.next=8,this.request(R);case 8:return I=Z.sent,E={meta:null,res:I.res,status:I.status},I.status===200&&Object.keys(I.headers).forEach(function(M){M.indexOf("x-oss-meta-")===0&&(E.meta||(E.meta={}),E.meta[M.substring(11)]=I.headers[M])}),Z.abrupt("return",E);case 12:case"end":return Z.stop()}},m,this)}));function v(m){return f.apply(this,arguments)}return v}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=j;y.putACL=function(){var g=(0,h.default)(c.default.mark(function f(v,m,b){var x,R;return c.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return b=b||{},b.subres=Object.assign({acl:""},b.subres),b.versionId&&(b.subres.versionId=b.versionId),b.headers=b.headers||{},b.headers["x-oss-object-acl"]=m,v=this._objectName(v),x=this._objectRequestParams("PUT",v,b),x.successStatuses=[200],E.next=10,this.request(x);case 10:return R=E.sent,E.abrupt("return",{res:R.res});case 12:case"end":return E.stop()}},f,this)}));function w(f,v,m){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js"),a("core-js/modules/es.array.map.js"),a("core-js/modules/es.object.keys.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("../utils/obj2xml"),g=y.obj2xml,w=a("../utils/checkObjectTag"),f=w.checkObjectTag,v=j;v.putObjectTagging=function(){var m=(0,h.default)(c.default.mark(function x(R,I){var E,C,P,Z,M=arguments;return c.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return E=M.length>2&&M[2]!==void 0?M[2]:{},f(I),E.subres=Object.assign({tagging:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),R=this._objectName(R),C=this._objectRequestParams("PUT",R,E),C.successStatuses=[200],I=Object.keys(I).map(function(k){return{Key:k,Value:I[k]}}),P={Tagging:{TagSet:{Tag:I}}},C.mime="xml",C.content=g(P),_.next=13,this.request(C);case 13:return Z=_.sent,_.abrupt("return",{res:Z.res,status:Z.status});case 15:case"end":return _.stop()}},x,this)}));function b(x,R){return m.apply(this,arguments)}return b}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=j;y.putSymlink=function(){var g=(0,h.default)(c.default.mark(function f(v,m,b){var x,R;return c.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return b=b||{},b.headers=b.headers||{},m=this._escape(this._objectName(m)),this._convertMetaToHeaders(b.meta,b.headers),b.headers["x-oss-symlink-target"]=m,b.subres=Object.assign({symlink:""},b.subres),b.versionId&&(b.subres.versionId=b.versionId),b.storageClass&&(b.headers["x-oss-storage-class"]=b.storageClass),v=this._objectName(v),x=this._objectRequestParams("PUT",v,b),x.successStatuses=[200],E.next=13,this.request(x);case 13:return R=E.sent,E.abrupt("return",{res:R.res});case 15:case"end":return E.stop()}},f,this)}));function w(f,v,m){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(a,N,j){"use strict";var p=a("url"),c=a("utility"),h=a("copy-to"),y=a("../../common/signUtils"),g=a("../utils/isIP"),w=g.isIP,f=j;f.signatureUrl=function(m,b){if(w(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");b=b||{},m=this._objectName(m),b.method=b.method||"GET";var x=c.timestamp()+(b.expires||1800),R={bucket:this.options.bucket,object:m},I=this._getResource(R);this.options.stsToken&&(b["security-token"]=this.options.stsToken);var E=y._signatureForURL(this.options.accessKeySecret,b,I,x),C=p.parse(this._getReqUrl(R));return C.query={OSSAccessKeyId:this.options.accessKeyId,Expires:x,Signature:E.Signature},h(E.subResource).to(C.query),C.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.array.iterator.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.promise.js"),a("core-js/modules/es.string.iterator.js"),a("core-js/modules/web.dom-collections.iterator.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.function.name.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator")),y=a("./utils/isArray"),g=y.isArray,w=j;w._parallelNode=function(){var f=(0,h.default)(c.default.mark(function m(b,x,R,I){var E,C,P,Z,M,J,_,k;return c.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:E=this,C=[],P=[],Z=b.length/x,M=b.length%x,J=M===0?Z:(b.length-M)/x+1,_=1,k=0;case 8:if(!(k<b.length)){U.next=26;break}if(!E.isCancel()){U.next=11;break}return U.abrupt("break",26);case 11:if(I?P.push(R(E,b[k],I)):P.push(R(E,b[k])),!(P.length===x||_===J&&k===b.length-1)){U.next=23;break}return U.prev=13,_+=1,U.next=17,Promise.all(P);case 17:U.next=22;break;case 19:U.prev=19,U.t0=U.catch(13),C.push(U.t0);case 22:P=[];case 23:k++,U.next=8;break;case 26:return U.abrupt("return",C);case 27:case"end":return U.stop()}},m,this,[[13,19]])}));function v(m,b,x,R){return f.apply(this,arguments)}return v}(),w._parallel=function(v,m,b){var x=this;return new Promise(function(R){var I=[];if(m<=0||!v){R(I);return}function E(U){return function(){if(U===null)throw new Error("Callback was already called.");var K=U;U=null;for(var G=arguments.length,F=new Array(G),W=0;W<G;W++)F[W]=arguments[W];K.apply(this,F)}}function C(U){var K=-1,G=U.length;return function(){return++K<G&&!x.isCancel()?{value:U[K],key:K}:null}}var P=C(v),Z=!1,M=0,J=!1;function _(U){M-=1,U?(Z=!0,I.push(U),R(I)):Z&&M<=0?(Z=!0,R(I)):J||(x.isCancel()?R(I):B())}function k(U,K){b(U).then(function(G){K(null,G)}).catch(function(G){K(G)})}function B(){for(J=!0;M<m&&!Z&&!x.isCancel();){var U=P();if(U===null||I.length>0){Z=!0,M<=0&&R(I);return}M+=1,k(U.value,E(_))}J=!1}B()})},w.cancel=function(v){this.options.cancelFlag=!0,g(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(m){if(m.destroyed===!1){var b={name:"cancel",message:"cancel"};m.destroy(b)}}),this.multipartUploadStreams=[],v&&this.abortMultipartUpload(v.name,v.uploadId,v.options)},w.isCancel=function(){return this.options.cancelFlag},w.resetCancelFlag=function(){this.options.cancelFlag=!1},w._stop=function(){this.options.cancelFlag=!0},w._makeCancelEvent=function(){var v={status:0,name:"cancel"};return v},w._makeAbortEvent=function(){var v={status:0,name:"abort",message:"upload task has been abort"};return v}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(a,N,j){(function(p){(function(){"use strict";a("core-js/modules/es.string.trim.js"),a("core-js/modules/es.array.sort.js"),a("core-js/modules/es.array.join.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js"),a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.regexp.to-string.js");var c=a("./../../shims/crypto/crypto.js"),h=a("is-type-of"),y=a("./utils/lowercaseKeyHeader"),g=y.lowercaseKeyHeader;j.buildCanonicalizedResource=function(f,v){var m="".concat(f),b="?";if(h.string(v)&&v.trim()!=="")m+=b+v;else if(h.array(v))v.sort(),m+=b+v.join("&");else if(v){var x=function(E,C){return E[0]>C[0]?1:E[0]<C[0]?-1:0},R=function(E){m+=b+E,(v[E]||v[E]===0)&&(m+="=".concat(v[E])),b="&"};Object.keys(v).sort(x).forEach(R)}return m},j.buildCanonicalString=function(f,v,m,b){m=m||{};var x=g(m.headers),R="x-oss-",I=[],E={},C=[f.toUpperCase(),x["content-md5"]||"",x["content-type"],b||x["x-oss-date"]];return Object.keys(x).forEach(function(P){var Z=P.toLowerCase();Z.indexOf(R)===0&&(E[Z]=String(x[P]).trim())}),Object.keys(E).sort().forEach(function(P){I.push("".concat(P,":").concat(E[P]))}),C=C.concat(I),C.push(this.buildCanonicalizedResource(v,m.parameters)),C.join(`
`)},j.computeSignature=function(f,v){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",b=c.createHmac("sha1",f);return b.update(p.from(v,m)).digest("base64")},j.authorization=function(f,v,m,b){return"OSS ".concat(f,":").concat(this.computeSignature(v,m,b))},j._signatureForURL=function(f){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments.length>2?arguments[2]:void 0,b=arguments.length>3?arguments[3]:void 0,x=arguments.length>4?arguments[4]:void 0,R={},I=v.subResource,E=I===void 0?{}:I;if(v.process){var C="x-oss-process";E[C]=v.process}if(v.trafficLimit){var P="x-oss-traffic-limit";E[P]=v.trafficLimit}if(v.response&&Object.keys(v.response).forEach(function(_){var k="response-".concat(_.toLowerCase());E[k]=v.response[_]}),Object.keys(v).forEach(function(_){var k=_.toLowerCase(),B=v[_];k.indexOf("x-oss-")===0?R[k]=B:(k.indexOf("content-md5")===0||k.indexOf("content-type")===0)&&(R[_]=B)}),Object.prototype.hasOwnProperty.call(v,"security-token")&&(E["security-token"]=v["security-token"]),Object.prototype.hasOwnProperty.call(v,"callback")){var Z={callbackUrl:encodeURI(v.callback.url),callbackBody:v.callback.body};if(v.callback.host&&(Z.callbackHost=v.callback.host),v.callback.contentType&&(Z.callbackBodyType=v.callback.contentType),E.callback=p.from(JSON.stringify(Z)).toString("base64"),v.callback.customValue){var M={};Object.keys(v.callback.customValue).forEach(function(_){M["x:".concat(_)]=v.callback.customValue[_]}),E["callback-var"]=p.from(JSON.stringify(M)).toString("base64")}}var J=this.buildCanonicalString(v.method,m,{headers:R,parameters:E},b.toString());return{Signature:this.computeSignature(f,J,x),subResource:E}}}).call(this)}).call(this,a("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(a,N,j){"use strict";a("core-js/modules/es.regexp.exec.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.checkBucketName=void 0,j.checkBucketName=function(p){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,h=c?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!h.test(p))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(a,N,j){"use strict";a("core-js/modules/es.regexp.exec.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.checkConfigValid=void 0;var p={endpoint:c,region:/^[a-zA-Z0-9\-_]+$/};function c(h){return typeof h=="string"?/^[a-zA-Z0-9._:/-]+$/.test(h):h.host?/^[a-zA-Z0-9._:/-]+$/.test(h.host):!1}j.checkConfigValid=function(h,y){if(p[y]){var g=!0;if(p[y]instanceof Function?g=p[y](h):g=p[y].test(h),!g)throw new Error("The ".concat(y," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(a,N,j){(function(p){(function(){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.checkEnv=void 0;function c(h){p.browser&&console.warn(h)}j.checkEnv=c}).call(this)}).call(this,a("_process"))},{_process:467}],54:[function(a,N,j){"use strict";a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.object.entries.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.checkObjectTag=void 0;var p=a("./checkValid"),c=p.checkValid,h=a("./isObject"),y=h.isObject,g=[{validator:function(m){if(typeof m!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],w={key:[].concat(g,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(g,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function f(v){if(!y(v))throw new Error("tag must be Object");var m=Object.entries(v);if(m.length>10)throw new Error("maximum of 10 tags for a object");var b=["key","value"];m.forEach(function(x){x.forEach(function(R,I){c(R,w[b[I]])})})}j.checkObjectTag=f},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(a,N,j){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.regexp.exec.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.checkValid=void 0;function p(c,h){h.forEach(function(y){if(y.validator)y.validator(c);else if(y.pattern&&!y.pattern.test(c))throw new Error(y.msg)})}j.checkValid=p},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(a,N,j){(function(p){(function(){"use strict";a("core-js/modules/es.array.includes.js"),a("core-js/modules/es.string.includes.js"),a("core-js/modules/es.object.assign.js"),a("core-js/modules/es.array.concat.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.createRequest=void 0;var c=a("./../../../shims/crypto/crypto.js"),h=a("debug")("ali-oss"),y=a("mime"),g=a("dateformat"),w=a("copy-to"),f=a("path"),v=a("./encoder"),m=v.encoder,b=a("./isIP"),x=b.isIP,R=a("./setRegion"),I=R.setRegion,E=a("../client/getReqUrl"),C=E.getReqUrl,P=a("./isDingTalk"),Z=P.isDingTalk;function M(k,B){return k[B]||k[B.toLowerCase()]}function J(k,B){delete k[B],delete k[B.toLowerCase()]}function _(k){var B=new Date;this.options.amendTimeSkewed&&(B=+new Date+this.options.amendTimeSkewed);var U={"x-oss-date":g(B,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(U["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(U["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(U,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(U["x-oss-security-token"]=this.options.stsToken),w(k.headers).to(U),M(U,"Content-Type")||(k.mime&&k.mime.indexOf("/")>0?U["Content-Type"]=k.mime:Z()?U["Content-Type"]="application/octet-stream":U["Content-Type"]=y.getType(k.mime||f.extname(k.object||""))),M(U,"Content-Type")||J(U,"Content-Type"),k.content&&(k.disabledMD5||(!k.headers||!k.headers["Content-MD5"]?U["Content-MD5"]=c.createHash("md5").update(p.from(k.content,"utf8")).digest("base64"):U["Content-MD5"]=k.headers["Content-MD5"]),U["Content-Length"]||(U["Content-Length"]=k.content.length));var K=Object.prototype.hasOwnProperty;for(var G in U)U[G]&&K.call(U,G)&&(U[G]=m(String(U[G]),this.options.headerEncoding));var F=this._getResource(k);if(U.authorization=this.authorization(k.method,F,k.subres,U,this.options.headerEncoding),x(this.options.endpoint.hostname)){var W=this.options,X=W.region,re=W.internal,oe=W.secure,pe=I(X,re,oe);U.host="".concat(k.bucket,".").concat(pe.host)}var ie=C.bind(this)(k);h("request %s %s, with headers %j, !!stream: %s",k.method,ie,U,!!k.stream);var Ie=k.timeout||this.options.timeout,ee={method:k.method,content:k.content,stream:k.stream,headers:U,timeout:Ie,writeStream:k.writeStream,customResponse:k.customResponse,ctx:k.ctx||this.ctx};return this.agent&&(ee.agent=this.agent),this.httpsAgent&&(ee.httpsAgent=this.httpsAgent),ee.enableProxy=!!this.options.enableProxy,ee.proxy=this.options.proxy?this.options.proxy:null,{url:ie,params:ee}}j.createRequest=_}).call(this)}).call(this,a("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(a,N,j){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.entries.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.replace.js"),a("core-js/modules/es.array.includes.js"),a("core-js/modules/es.object.keys.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.dataFix=void 0;var p=a("./isObject"),c=["true","TRUE","1",1],h=["false","FALSE","0",0];function y(f,v,m){if(p.isObject(f)){var b=v.remove,x=b===void 0?[]:b,R=v.rename,I=R===void 0?{}:R,E=v.camel,C=E===void 0?[]:E,P=v.bool,Z=P===void 0?[]:P,M=v.lowerFirst,J=M===void 0?!1:M;return x.forEach(function(_){return delete f[_]}),Object.entries(I).forEach(function(_){f[_[0]]&&(f[_[1]]||(f[_[1]]=f[_[0]],delete f[_[0]]))}),C.forEach(function(_){if(f[_]){var k=_.replace(/^(.)/,function(B){return B.toLowerCase()}).replace(/-(\w)/g,function(B,U){return U.toUpperCase()});f[k]||(f[k]=f[_])}}),Z.forEach(function(_){f[_]=g(f[_])}),typeof m=="function"&&m(f),w(f,J),y}}j.dataFix=y;function g(f){return f?c.includes(f)?!0:h.includes(f)?!1:f:!1}function w(f,v){v&&Object.keys(f).forEach(function(m){var b=m.replace(/^\w/,function(x){return x.toLowerCase()});typeof f[b]=="undefined"&&(f[b]=f[m],delete f[m])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault");a("core-js/modules/es.array.slice.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js");var c=p(a("@babel/runtime/helpers/typeof"));Object.defineProperty(j,"__esModule",{value:!0}),j.deepCopyWith=j.deepCopy=void 0;var h=a("./isBuffer");j.deepCopy=function(y){if(y===null||(0,c.default)(y)!=="object")return y;if(h.isBuffer(y))return y.slice();var g=Array.isArray(y)?[]:{};return Object.keys(y).forEach(function(w){g[w]=j.deepCopy(y[w])}),g},j.deepCopyWith=function(y,g){function w(f,v,m){var b=g(f,v,m);if(b!==void 0)return b;if(f===null||(0,c.default)(f)!=="object")return f;if(h.isBuffer(f))return f.slice();var x=Array.isArray(f)?[]:{};return Object.keys(f).forEach(function(R){x[R]=w(f[R],R,f)}),x}return g?w(y,"",null):j.deepCopy(y)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(a,N,j){(function(p){(function(){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.encoder=void 0;function c(h){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return y==="utf-8"?h:p.from(h).toString("latin1")}j.encoder=c}).call(this)}).call(this,a("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(a,N,j){"use strict";a("core-js/modules/es.array.map.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.replace.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.formatInventoryConfig=void 0;var p=a("../utils/dataFix"),c=a("../utils/isObject"),h=a("../utils/isArray"),y=a("../utils/formatObjKey");function g(f){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return v&&c.isObject(f)&&(f=[f]),h.isArray(f)?f=f.map(w):f=w(f),f}j.formatInventoryConfig=g;function w(f){return p.dataFix(f,{bool:["IsEnabled"]},function(v){var m,b;v.prefix=v.Filter.Prefix,delete v.Filter,v.OSSBucketDestination=v.Destination.OSSBucketDestination,v.OSSBucketDestination.rolename=v.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete v.OSSBucketDestination.RoleArn,v.OSSBucketDestination.bucket=v.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete v.OSSBucketDestination.Bucket,delete v.Destination,v.frequency=v.Schedule.Frequency,delete v.Schedule.Frequency,!((m=v==null?void 0:v.OptionalFields)===null||m===void 0)&&m.Field&&!h.isArray((b=v.OptionalFields)===null||b===void 0?void 0:b.Field)&&(v.OptionalFields.Field=[v.OptionalFields.Field])}),f=y.formatObjKey(f,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),f}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault");a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js"),a("core-js/modules/es.array.includes.js"),a("core-js/modules/es.string.includes.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.replace.js");var c=p(a("@babel/runtime/helpers/typeof"));Object.defineProperty(j,"__esModule",{value:!0}),j.formatObjKey=void 0;function h(g,w,f){if(g===null||(0,c.default)(g)!=="object")return g;var v;if(Array.isArray(g)){v=[];for(var m=0;m<g.length;m++)v.push(h(g[m],w,f))}else v={},Object.keys(g).forEach(function(b){v[y(b,w,f)]=h(g[b],w,f)});return v}j.formatObjKey=h;function y(g,w,f){return f&&f.exclude&&f.exclude.includes(g)||(w==="firstUpperCase"?g=g.replace(/^./,function(v){return v.toUpperCase()}):w==="firstLowerCase"&&(g=g.replace(/^./,function(v){return v.toLowerCase()}))),g}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(a,N,j){"use strict";a("core-js/modules/es.regexp.exec.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.getStrBytesCount=void 0;function p(c){for(var h=0,y=0;y<c.length;y++){var g=c.charAt(y);/^[\u00-\uff]$/.test(g)?h+=1:h+=2}return h}j.getStrBytesCount=p},{"core-js/modules/es.regexp.exec.js":300}],63:[function(a,N,j){"use strict";a("core-js/modules/es.object.to-string.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.isArray=void 0,j.isArray=function(p){return Object.prototype.toString.call(p)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(a,N,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isBlob=void 0;function p(c){return typeof Blob!="undefined"&&c instanceof Blob}j.isBlob=p},{}],65:[function(a,N,j){(function(p){(function(){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isBuffer=void 0;function c(h){return p.isBuffer(h)}j.isBuffer=c}).call(this)}).call(this,{isBuffer:a("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(a,N,j){(function(p){(function(){"use strict";a("core-js/modules/es.array.includes.js"),a("core-js/modules/es.string.includes.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.isDingTalk=void 0;function c(){return!!(p.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}j.isDingTalk=c}).call(this)}).call(this,a("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(a,N,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isFile=void 0,j.isFile=function(p){return typeof File!="undefined"&&p instanceof File}},{}],68:[function(a,N,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isFunction=void 0,j.isFunction=function(p){return typeof p=="function"}},{}],69:[function(a,N,j){"use strict";a("core-js/modules/es.regexp.exec.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.isIP=void 0,j.isIP=function(p){var c=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,h=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return c.test(p)||h.test(p)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(a,N,j){"use strict";a("core-js/modules/es.object.to-string.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.isObject=void 0,j.isObject=function(p){return Object.prototype.toString.call(p)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(a,N,j){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.lowercaseKeyHeader=void 0;var p=a("./isObject");function c(h){var y={};return p.isObject(h)&&Object.keys(h).forEach(function(g){y[g.toLowerCase()]=h[g]}),y}j.lowercaseKeyHeader=c},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(a,N,j){"use strict";a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.replace.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js"),a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.array.join.js"),a("core-js/modules/es.array.map.js"),a("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.obj2xml=void 0;var p=a("./formatObjKey");function c(y){return Object.prototype.toString.call(y).replace(/(.*? |])/g,"").toLowerCase()}function h(y,g){var w="";return g&&g.headers&&(w=`<?xml version="1.0" encoding="UTF-8"?>
`),g&&g.firstUpperCase&&(y=p.formatObjKey(y,"firstUpperCase")),c(y)==="object"?Object.keys(y).forEach(function(f){c(y[f])!=="undefined"&&c(y[f])!=="null"&&(c(y[f])==="string"||c(y[f])==="number"?w+="<".concat(f,">").concat(y[f],"</").concat(f,">"):c(y[f])==="object"?w+="<".concat(f,">").concat(h(y[f]),"</").concat(f,">"):c(y[f])==="array"?w+=y[f].map(function(v){return"<".concat(f,">").concat(h(v),"</").concat(f,">")}).join(""):w+="<".concat(f,">").concat(y[f].toString(),"</").concat(f,">"))}):w+=y.toString(),w}j.obj2xml=h},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(a,N,j){"use strict";a("core-js/modules/es.array.slice.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.function.name.js"),a("core-js/modules/es.array.from.js"),a("core-js/modules/es.string.iterator.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.symbol.js"),a("core-js/modules/es.symbol.description.js"),a("core-js/modules/es.symbol.iterator.js"),a("core-js/modules/es.array.iterator.js"),a("core-js/modules/web.dom-collections.iterator.js"),a("core-js/modules/es.object.assign.js");function p(g,w){var f=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(!f){if(Array.isArray(g)||(f=c(g))||w&&g&&typeof g.length=="number"){f&&(g=f);var v=0,m=function(){};return{s:m,n:function(){return v>=g.length?{done:!0}:{done:!1,value:g[v++]}},e:function(E){throw E},f:m}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b=!0,x=!1,R;return{s:function(){f=f.call(g)},n:function(){var E=f.next();return b=E.done,E},e:function(E){x=!0,R=E},f:function(){try{!b&&f.return!=null&&f.return()}finally{if(x)throw R}}}}function c(g,w){if(g){if(typeof g=="string")return h(g,w);var f=Object.prototype.toString.call(g).slice(8,-1);if(f==="Object"&&g.constructor&&(f=g.constructor.name),f==="Map"||f==="Set")return Array.from(g);if(f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return h(g,w)}}function h(g,w){(w==null||w>g.length)&&(w=g.length);for(var f=0,v=new Array(w);f<w;f++)v[f]=g[f];return v}Object.defineProperty(j,"__esModule",{value:!0}),j.omit=void 0;function y(g,w){var f=Object.assign({},g),v=p(w),m;try{for(v.s();!(m=v.n()).done;){var b=m.value;delete f[b]}}catch(x){v.e(x)}finally{v.f()}return f}j.omit=y},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(a,N,j){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.promise.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.retry=void 0;function p(c,h){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=0,w=y.retryDelay,f=w===void 0?500:w,v=y.errorHandler,m=v===void 0?function(){return!0}:v,b=function x(){for(var R=arguments.length,I=new Array(R),E=0;E<R;E++)I[E]=arguments[E];return new Promise(function(C,P){c.apply(void 0,I).then(function(Z){g=0,C(Z)}).catch(function(Z){g<h&&m(Z)?(g++,setTimeout(function(){C(x.apply(void 0,I))},f)):(g=0,P(Z))})})};return b}j.retry=p},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(a,N,j){"use strict";var p=function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(j,"__esModule",{value:!0}),j.setRegion=void 0;var c=p(a("url")),h=a("./checkConfigValid");function y(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;h.checkConfigValid(g,"region");var v=f?"https://":"http://",m=w?"-internal.aliyuncs.com":".aliyuncs.com",b="vpc100-oss-cn-";return g.substr(0,b.length)===b&&(m=".aliyuncs.com"),c.default.parse(v+g+m)}j.setRegion=y},{"./checkConfigValid":52,url:472}],76:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/regenerator"));a("core-js/modules/es.object.keys.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.array.find.js"),a("core-js/modules/es.object.assign.js");var h=p(a("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.checkCredentials=j.setSTSToken=void 0;var y=a("./formatObjKey");function g(){return w.apply(this,arguments)}function w(){return w=(0,h.default)(c.default.mark(function v(){var m,b;return c.default.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(this.options||(this.options={}),m=new Date,!this.stsTokenFreshTime){R.next=14;break}if(!(+m-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){R.next=12;break}return this.stsTokenFreshTime=m,R.next=7,this.options.refreshSTSToken();case 7:b=R.sent,b=y.formatObjKey(b,"firstLowerCase"),b.securityToken&&(b.stsToken=b.securityToken),f(b),Object.assign(this.options,b);case 12:R.next=15;break;case 14:this.stsTokenFreshTime=m;case 15:return R.abrupt("return",null);case 16:case"end":return R.stop()}},v,this)})),w.apply(this,arguments)}j.setSTSToken=g;function f(v){var m=["accessKeySecret","accessKeyId","stsToken"],b=Object.keys(v);m.forEach(function(x){if(!b.find(function(R){return R===x}))throw Error("refreshSTSToken must return contains ".concat(x))})}j.checkCredentials=f},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(a,N,j){function p(h,y,g,w,f,v,m){try{var b=h[v](m),x=b.value}catch(R){g(R);return}b.done?y(x):Promise.resolve(x).then(w,f)}function c(h){return function(){var y=this,g=arguments;return new Promise(function(w,f){var v=h.apply(y,g);function m(x){p(v,w,f,m,b,"next",x)}function b(x){p(v,w,f,m,b,"throw",x)}m(void 0)})}}N.exports=c,N.exports.__esModule=!0,N.exports.default=N.exports},{}],78:[function(a,N,j){function p(c){return c&&c.__esModule?c:{default:c}}N.exports=p,N.exports.__esModule=!0,N.exports.default=N.exports},{}],79:[function(a,N,j){function p(c){"@babel/helpers - typeof";return N.exports=p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},N.exports.__esModule=!0,N.exports.default=N.exports,p(c)}N.exports=p,N.exports.__esModule=!0,N.exports.default=N.exports},{}],80:[function(a,N,j){N.exports=a("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(a,N,j){N.exports=p,N.exports.HttpsAgent=p;function p(){}},{}],82:[function(a,N,j){(function(p){(function(){"use strict";var c=a("object-assign");function h(X,re){if(X===re)return 0;for(var oe=X.length,pe=re.length,ie=0,Ie=Math.min(oe,pe);ie<Ie;++ie)if(X[ie]!==re[ie]){oe=X[ie],pe=re[ie];break}return oe<pe?-1:pe<oe?1:0}function y(X){return p.Buffer&&typeof p.Buffer.isBuffer=="function"?p.Buffer.isBuffer(X):!!(X!=null&&X._isBuffer)}var g=a("util/"),w=Object.prototype.hasOwnProperty,f=Array.prototype.slice,v=function(){return function(){}.name==="foo"}();function m(X){return Object.prototype.toString.call(X)}function b(X){return y(X)||typeof p.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(X):X?!!(X instanceof DataView||X.buffer&&X.buffer instanceof ArrayBuffer):!1}var x=N.exports=M,R=/\s*function\s+([^\(\s]*)\s*/;function I(X){if(g.isFunction(X)){if(v)return X.name;var re=X.toString(),oe=re.match(R);return oe&&oe[1]}}x.AssertionError=function(re){this.name="AssertionError",this.actual=re.actual,this.expected=re.expected,this.operator=re.operator,re.message?(this.message=re.message,this.generatedMessage=!1):(this.message=P(this),this.generatedMessage=!0);var oe=re.stackStartFunction||Z;if(Error.captureStackTrace)Error.captureStackTrace(this,oe);else{var pe=new Error;if(pe.stack){var ie=pe.stack,Ie=I(oe),ee=ie.indexOf(`
`+Ie);if(ee>=0){var de=ie.indexOf(`
`,ee+1);ie=ie.substring(de+1)}this.stack=ie}}},g.inherits(x.AssertionError,Error);function E(X,re){return typeof X=="string"?X.length<re?X:X.slice(0,re):X}function C(X){if(v||!g.isFunction(X))return g.inspect(X);var re=I(X),oe=re?": "+re:"";return"[Function"+oe+"]"}function P(X){return E(C(X.actual),128)+" "+X.operator+" "+E(C(X.expected),128)}function Z(X,re,oe,pe,ie){throw new x.AssertionError({message:oe,actual:X,expected:re,operator:pe,stackStartFunction:ie})}x.fail=Z;function M(X,re){X||Z(X,!0,re,"==",x.ok)}x.ok=M,x.equal=function(re,oe,pe){re!=oe&&Z(re,oe,pe,"==",x.equal)},x.notEqual=function(re,oe,pe){re==oe&&Z(re,oe,pe,"!=",x.notEqual)},x.deepEqual=function(re,oe,pe){J(re,oe,!1)||Z(re,oe,pe,"deepEqual",x.deepEqual)},x.deepStrictEqual=function(re,oe,pe){J(re,oe,!0)||Z(re,oe,pe,"deepStrictEqual",x.deepStrictEqual)};function J(X,re,oe,pe){if(X===re)return!0;if(y(X)&&y(re))return h(X,re)===0;if(g.isDate(X)&&g.isDate(re))return X.getTime()===re.getTime();if(g.isRegExp(X)&&g.isRegExp(re))return X.source===re.source&&X.global===re.global&&X.multiline===re.multiline&&X.lastIndex===re.lastIndex&&X.ignoreCase===re.ignoreCase;if((X===null||typeof X!="object")&&(re===null||typeof re!="object"))return oe?X===re:X==re;if(b(X)&&b(re)&&m(X)===m(re)&&!(X instanceof Float32Array||X instanceof Float64Array))return h(new Uint8Array(X.buffer),new Uint8Array(re.buffer))===0;if(y(X)!==y(re))return!1;pe=pe||{actual:[],expected:[]};var ie=pe.actual.indexOf(X);return ie!==-1&&ie===pe.expected.indexOf(re)?!0:(pe.actual.push(X),pe.expected.push(re),k(X,re,oe,pe))}function _(X){return Object.prototype.toString.call(X)=="[object Arguments]"}function k(X,re,oe,pe){if(X==null||re===null||re===void 0)return!1;if(g.isPrimitive(X)||g.isPrimitive(re))return X===re;if(oe&&Object.getPrototypeOf(X)!==Object.getPrototypeOf(re))return!1;var ie=_(X),Ie=_(re);if(ie&&!Ie||!ie&&Ie)return!1;if(ie)return X=f.call(X),re=f.call(re),J(X,re,oe);var ee=W(X),de=W(re),me,xe;if(ee.length!==de.length)return!1;for(ee.sort(),de.sort(),xe=ee.length-1;xe>=0;xe--)if(ee[xe]!==de[xe])return!1;for(xe=ee.length-1;xe>=0;xe--)if(me=ee[xe],!J(X[me],re[me],oe,pe))return!1;return!0}x.notDeepEqual=function(re,oe,pe){J(re,oe,!1)&&Z(re,oe,pe,"notDeepEqual",x.notDeepEqual)},x.notDeepStrictEqual=B;function B(X,re,oe){J(X,re,!0)&&Z(X,re,oe,"notDeepStrictEqual",B)}x.strictEqual=function(re,oe,pe){re!==oe&&Z(re,oe,pe,"===",x.strictEqual)},x.notStrictEqual=function(re,oe,pe){re===oe&&Z(re,oe,pe,"!==",x.notStrictEqual)};function U(X,re){if(!X||!re)return!1;if(Object.prototype.toString.call(re)=="[object RegExp]")return re.test(X);try{if(X instanceof re)return!0}catch(oe){}return Error.isPrototypeOf(re)?!1:re.call({},X)===!0}function K(X){var re;try{X()}catch(oe){re=oe}return re}function G(X,re,oe,pe){var ie;if(typeof re!="function")throw new TypeError('"block" argument must be a function');typeof oe=="string"&&(pe=oe,oe=null),ie=K(re),pe=(oe&&oe.name?" ("+oe.name+").":".")+(pe?" "+pe:"."),X&&!ie&&Z(ie,oe,"Missing expected exception"+pe);var Ie=typeof pe=="string",ee=!X&&g.isError(ie),de=!X&&ie&&!oe;if((ee&&Ie&&U(ie,oe)||de)&&Z(ie,oe,"Got unwanted exception"+pe),X&&ie&&oe&&!U(ie,oe)||!X&&ie)throw ie}x.throws=function(X,re,oe){G(!0,X,re,oe)},x.doesNotThrow=function(X,re,oe){G(!1,X,re,oe)},x.ifError=function(X){if(X)throw X};function F(X,re){X||Z(X,!0,re,"==",F)}x.strict=c(F,x,{equal:x.strictEqual,deepEqual:x.deepStrictEqual,notEqual:x.notStrictEqual,notDeepEqual:x.notDeepStrictEqual}),x.strict.strict=x.strict;var W=Object.keys||function(X){var re=[];for(var oe in X)w.call(X,oe)&&re.push(oe);return re}}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(a,N,j){typeof Object.create=="function"?N.exports=function(c,h){c.super_=h,c.prototype=Object.create(h.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}})}:N.exports=function(c,h){c.super_=h;var y=function(){};y.prototype=h.prototype,c.prototype=new y,c.prototype.constructor=c}},{}],84:[function(a,N,j){N.exports=function(c){return c&&typeof c=="object"&&typeof c.copy=="function"&&typeof c.fill=="function"&&typeof c.readUInt8=="function"}},{}],85:[function(a,N,j){(function(p,c){(function(){var h=/%[sdj%]/g;j.format=function(de){if(!k(de)){for(var me=[],xe=0;xe<arguments.length;xe++)me.push(w(arguments[xe]));return me.join(" ")}for(var xe=1,ce=arguments,le=ce.length,ge=String(de).replace(h,function(De){if(De==="%%")return"%";if(xe>=le)return De;switch(De){case"%s":return String(ce[xe++]);case"%d":return Number(ce[xe++]);case"%j":try{return JSON.stringify(ce[xe++])}catch(je){return"[Circular]"}default:return De}}),Ce=ce[xe];xe<le;Ce=ce[++xe])M(Ce)||!G(Ce)?ge+=" "+Ce:ge+=" "+w(Ce);return ge},j.deprecate=function(de,me){if(U(c.process))return function(){return j.deprecate(de,me).apply(this,arguments)};if(p.noDeprecation===!0)return de;var xe=!1;function ce(){if(!xe){if(p.throwDeprecation)throw new Error(me);p.traceDeprecation?console.trace(me):console.error(me),xe=!0}return de.apply(this,arguments)}return ce};var y={},g;j.debuglog=function(de){if(U(g)&&(g=p.env.NODE_DEBUG||""),de=de.toUpperCase(),!y[de])if(new RegExp("\\b"+de+"\\b","i").test(g)){var me=p.pid;y[de]=function(){var xe=j.format.apply(j,arguments);console.error("%s %d: %s",de,me,xe)}}else y[de]=function(){};return y[de]};function w(de,me){var xe={seen:[],stylize:v};return arguments.length>=3&&(xe.depth=arguments[2]),arguments.length>=4&&(xe.colors=arguments[3]),Z(me)?xe.showHidden=me:me&&j._extend(xe,me),U(xe.showHidden)&&(xe.showHidden=!1),U(xe.depth)&&(xe.depth=2),U(xe.colors)&&(xe.colors=!1),U(xe.customInspect)&&(xe.customInspect=!0),xe.colors&&(xe.stylize=f),b(xe,de,xe.depth)}j.inspect=w,w.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},w.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function f(de,me){var xe=w.styles[me];return xe?"\x1B["+w.colors[xe][0]+"m"+de+"\x1B["+w.colors[xe][1]+"m":de}function v(de,me){return de}function m(de){var me={};return de.forEach(function(xe,ce){me[xe]=!0}),me}function b(de,me,xe){if(de.customInspect&&me&&X(me.inspect)&&me.inspect!==j.inspect&&!(me.constructor&&me.constructor.prototype===me)){var ce=me.inspect(xe,de);return k(ce)||(ce=b(de,ce,xe)),ce}var le=x(de,me);if(le)return le;var ge=Object.keys(me),Ce=m(ge);if(de.showHidden&&(ge=Object.getOwnPropertyNames(me)),W(me)&&(ge.indexOf("message")>=0||ge.indexOf("description")>=0))return R(me);if(ge.length===0){if(X(me)){var De=me.name?": "+me.name:"";return de.stylize("[Function"+De+"]","special")}if(K(me))return de.stylize(RegExp.prototype.toString.call(me),"regexp");if(F(me))return de.stylize(Date.prototype.toString.call(me),"date");if(W(me))return R(me)}var je="",fe=!1,Y=["{","}"];if(P(me)&&(fe=!0,Y=["[","]"]),X(me)){var be=me.name?": "+me.name:"";je=" [Function"+be+"]"}if(K(me)&&(je=" "+RegExp.prototype.toString.call(me)),F(me)&&(je=" "+Date.prototype.toUTCString.call(me)),W(me)&&(je=" "+R(me)),ge.length===0&&(!fe||me.length==0))return Y[0]+je+Y[1];if(xe<0)return K(me)?de.stylize(RegExp.prototype.toString.call(me),"regexp"):de.stylize("[Object]","special");de.seen.push(me);var q;return fe?q=I(de,me,xe,Ce,ge):q=ge.map(function(V){return E(de,me,xe,Ce,V,fe)}),de.seen.pop(),C(q,je,Y)}function x(de,me){if(U(me))return de.stylize("undefined","undefined");if(k(me)){var xe="'"+JSON.stringify(me).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return de.stylize(xe,"string")}if(_(me))return de.stylize(""+me,"number");if(Z(me))return de.stylize(""+me,"boolean");if(M(me))return de.stylize("null","null")}function R(de){return"["+Error.prototype.toString.call(de)+"]"}function I(de,me,xe,ce,le){for(var ge=[],Ce=0,De=me.length;Ce<De;++Ce)ee(me,String(Ce))?ge.push(E(de,me,xe,ce,String(Ce),!0)):ge.push("");return le.forEach(function(je){je.match(/^\d+$/)||ge.push(E(de,me,xe,ce,je,!0))}),ge}function E(de,me,xe,ce,le,ge){var Ce,De,je;if(je=Object.getOwnPropertyDescriptor(me,le)||{value:me[le]},je.get?je.set?De=de.stylize("[Getter/Setter]","special"):De=de.stylize("[Getter]","special"):je.set&&(De=de.stylize("[Setter]","special")),ee(ce,le)||(Ce="["+le+"]"),De||(de.seen.indexOf(je.value)<0?(M(xe)?De=b(de,je.value,null):De=b(de,je.value,xe-1),De.indexOf(`
`)>-1&&(ge?De=De.split(`
`).map(function(fe){return" "+fe}).join(`
`).substr(2):De=`
`+De.split(`
`).map(function(fe){return" "+fe}).join(`
`))):De=de.stylize("[Circular]","special")),U(Ce)){if(ge&&le.match(/^\d+$/))return De;Ce=JSON.stringify(""+le),Ce.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ce=Ce.substr(1,Ce.length-2),Ce=de.stylize(Ce,"name")):(Ce=Ce.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ce=de.stylize(Ce,"string"))}return Ce+": "+De}function C(de,me,xe){var ce=0,le=de.reduce(function(ge,Ce){return ce++,Ce.indexOf(`
`)>=0&&ce++,ge+Ce.replace(/\u001b\[\d\d?m/g,"").length+1},0);return le>60?xe[0]+(me===""?"":me+`
`)+" "+de.join(`,
`)+" "+xe[1]:xe[0]+me+" "+de.join(", ")+" "+xe[1]}function P(de){return Array.isArray(de)}j.isArray=P;function Z(de){return typeof de=="boolean"}j.isBoolean=Z;function M(de){return de===null}j.isNull=M;function J(de){return de==null}j.isNullOrUndefined=J;function _(de){return typeof de=="number"}j.isNumber=_;function k(de){return typeof de=="string"}j.isString=k;function B(de){return typeof de=="symbol"}j.isSymbol=B;function U(de){return de===void 0}j.isUndefined=U;function K(de){return G(de)&&oe(de)==="[object RegExp]"}j.isRegExp=K;function G(de){return typeof de=="object"&&de!==null}j.isObject=G;function F(de){return G(de)&&oe(de)==="[object Date]"}j.isDate=F;function W(de){return G(de)&&(oe(de)==="[object Error]"||de instanceof Error)}j.isError=W;function X(de){return typeof de=="function"}j.isFunction=X;function re(de){return de===null||typeof de=="boolean"||typeof de=="number"||typeof de=="string"||typeof de=="symbol"||typeof de=="undefined"}j.isPrimitive=re,j.isBuffer=a("./support/isBuffer");function oe(de){return Object.prototype.toString.call(de)}function pe(de){return de<10?"0"+de.toString(10):de.toString(10)}var ie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ie(){var de=new Date,me=[pe(de.getHours()),pe(de.getMinutes()),pe(de.getSeconds())].join(":");return[de.getDate(),ie[de.getMonth()],me].join(" ")}j.log=function(){console.log("%s - %s",Ie(),j.format.apply(j,arguments))},j.inherits=a("inherits"),j._extend=function(de,me){if(!me||!G(me))return de;for(var xe=Object.keys(me),ce=xe.length;ce--;)de[xe[ce]]=me[xe[ce]];return de};function ee(de,me){return Object.prototype.hasOwnProperty.call(de,me)}}).call(this)}).call(this,a("_process"),typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(a,N,j){(function(p){(function(){"use strict";var c=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],h=typeof globalThis=="undefined"?p:globalThis;N.exports=function(){for(var g=[],w=0;w<c.length;w++)typeof h[c[w]]=="function"&&(g[g.length]=c[w]);return g}}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(a,N,j){"use strict";j.byteLength=v,j.toByteArray=b,j.fromByteArray=I;for(var p=[],c=[],h=typeof Uint8Array!="undefined"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,w=y.length;g<w;++g)p[g]=y[g],c[y.charCodeAt(g)]=g;c[45]=62,c[95]=63;function f(E){var C=E.length;if(C%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var P=E.indexOf("=");P===-1&&(P=C);var Z=P===C?0:4-P%4;return[P,Z]}function v(E){var C=f(E),P=C[0],Z=C[1];return(P+Z)*3/4-Z}function m(E,C,P){return(C+P)*3/4-P}function b(E){var C,P=f(E),Z=P[0],M=P[1],J=new h(m(E,Z,M)),_=0,k=M>0?Z-4:Z,B;for(B=0;B<k;B+=4)C=c[E.charCodeAt(B)]<<18|c[E.charCodeAt(B+1)]<<12|c[E.charCodeAt(B+2)]<<6|c[E.charCodeAt(B+3)],J[_++]=C>>16&255,J[_++]=C>>8&255,J[_++]=C&255;return M===2&&(C=c[E.charCodeAt(B)]<<2|c[E.charCodeAt(B+1)]>>4,J[_++]=C&255),M===1&&(C=c[E.charCodeAt(B)]<<10|c[E.charCodeAt(B+1)]<<4|c[E.charCodeAt(B+2)]>>2,J[_++]=C>>8&255,J[_++]=C&255),J}function x(E){return p[E>>18&63]+p[E>>12&63]+p[E>>6&63]+p[E&63]}function R(E,C,P){for(var Z,M=[],J=C;J<P;J+=3)Z=(E[J]<<16&16711680)+(E[J+1]<<8&65280)+(E[J+2]&255),M.push(x(Z));return M.join("")}function I(E){for(var C,P=E.length,Z=P%3,M=[],J=16383,_=0,k=P-Z;_<k;_+=J)M.push(R(E,_,_+J>k?k:_+J));return Z===1?(C=E[P-1],M.push(p[C>>2]+p[C<<4&63]+"==")):Z===2&&(C=(E[P-2]<<8)+E[P-1],M.push(p[C>>10]+p[C>>4&63]+p[C<<2&63]+"=")),M.join("")}},{}],88:[function(a,N,j){(function(p,c,h){typeof N!="undefined"&&N.exports?N.exports=h():typeof Se=="function"&&Se.amd?Se(c,h):p[c]=h()})(this,"bowser",function(){var p=!0;function c(m){function b(me){var xe=m.match(me);return xe&&xe.length>1&&xe[1]||""}function x(me){var xe=m.match(me);return xe&&xe.length>1&&xe[2]||""}var R=b(/(ipod|iphone|ipad)/i).toLowerCase(),I=/like android/i.test(m),E=!I&&/android/i.test(m),C=/nexus\s*[0-6]\s*/i.test(m),P=!C&&/nexus\s*[0-9]+/i.test(m),Z=/CrOS/.test(m),M=/silk/i.test(m),J=/sailfish/i.test(m),_=/tizen/i.test(m),k=/(web|hpw)(o|0)s/i.test(m),B=/windows phone/i.test(m),U=/SamsungBrowser/i.test(m),K=!B&&/windows/i.test(m),G=!R&&!M&&/macintosh/i.test(m),F=!E&&!J&&!_&&!k&&/linux/i.test(m),W=x(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),X=b(/version\/(\d+(\.\d+)?)/i),re=/tablet/i.test(m)&&!/tablet pc/i.test(m),oe=!re&&/[^-]mobi/i.test(m),pe=/xbox/i.test(m),ie;/opera/i.test(m)?ie={name:"Opera",opera:p,version:X||b(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(m)?ie={name:"Opera",opera:p,version:b(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||X}:/SamsungBrowser/i.test(m)?ie={name:"Samsung Internet for Android",samsungBrowser:p,version:X||b(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(m)?ie={name:"NAVER Whale browser",whale:p,version:b(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(m)?ie={name:"MZ Browser",mzbrowser:p,version:b(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(m)?ie={name:"Opera Coast",coast:p,version:X||b(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(m)?ie={name:"Focus",focus:p,version:b(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(m)?ie={name:"Yandex Browser",yandexbrowser:p,version:X||b(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(m)?ie={name:"UC Browser",ucbrowser:p,version:b(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(m)?ie={name:"Maxthon",maxthon:p,version:b(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(m)?ie={name:"Epiphany",epiphany:p,version:b(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(m)?ie={name:"Puffin",puffin:p,version:b(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(m)?ie={name:"Sleipnir",sleipnir:p,version:b(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(m)?ie={name:"K-Meleon",kMeleon:p,version:b(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:B?(ie={name:"Windows Phone",osname:"Windows Phone",windowsphone:p},W?(ie.msedge=p,ie.version=W):(ie.msie=p,ie.version=b(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(m)?ie={name:"Internet Explorer",msie:p,version:b(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:Z?ie={name:"Chrome",osname:"Chrome OS",chromeos:p,chromeBook:p,chrome:p,version:b(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(m)?ie={name:"Microsoft Edge",msedge:p,version:W}:/vivaldi/i.test(m)?ie={name:"Vivaldi",vivaldi:p,version:b(/vivaldi\/(\d+(\.\d+)?)/i)||X}:J?ie={name:"Sailfish",osname:"Sailfish OS",sailfish:p,version:b(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(m)?ie={name:"SeaMonkey",seamonkey:p,version:b(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(m)?(ie={name:"Firefox",firefox:p,version:b(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(m)&&(ie.firefoxos=p,ie.osname="Firefox OS")):M?ie={name:"Amazon Silk",silk:p,version:b(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(m)?ie={name:"PhantomJS",phantom:p,version:b(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(m)?ie={name:"SlimerJS",slimer:p,version:b(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(m)||/rim\stablet/i.test(m)?ie={name:"BlackBerry",osname:"BlackBerry OS",blackberry:p,version:X||b(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:k?(ie={name:"WebOS",osname:"WebOS",webos:p,version:X||b(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(m)&&(ie.touchpad=p)):/bada/i.test(m)?ie={name:"Bada",osname:"Bada",bada:p,version:b(/dolfin\/(\d+(\.\d+)?)/i)}:_?ie={name:"Tizen",osname:"Tizen",tizen:p,version:b(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||X}:/qupzilla/i.test(m)?ie={name:"QupZilla",qupzilla:p,version:b(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||X}:/chromium/i.test(m)?ie={name:"Chromium",chromium:p,version:b(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||X}:/chrome|crios|crmo/i.test(m)?ie={name:"Chrome",chrome:p,version:b(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:E?ie={name:"Android",version:X}:/safari|applewebkit/i.test(m)?(ie={name:"Safari",safari:p},X&&(ie.version=X)):R?(ie={name:R=="iphone"?"iPhone":R=="ipad"?"iPad":"iPod"},X&&(ie.version=X)):/googlebot/i.test(m)?ie={name:"Googlebot",googlebot:p,version:b(/googlebot\/(\d+(\.\d+))/i)||X}:ie={name:b(/^(.*)\/(.*) /),version:x(/^(.*)\/(.*) /)},!ie.msedge&&/(apple)?webkit/i.test(m)?(/(apple)?webkit\/537\.36/i.test(m)?(ie.name=ie.name||"Blink",ie.blink=p):(ie.name=ie.name||"Webkit",ie.webkit=p),!ie.version&&X&&(ie.version=X)):!ie.opera&&/gecko\//i.test(m)&&(ie.name=ie.name||"Gecko",ie.gecko=p,ie.version=ie.version||b(/gecko\/(\d+(\.\d+)?)/i)),!ie.windowsphone&&(E||ie.silk)?(ie.android=p,ie.osname="Android"):!ie.windowsphone&&R?(ie[R]=p,ie.ios=p,ie.osname="iOS"):G?(ie.mac=p,ie.osname="macOS"):pe?(ie.xbox=p,ie.osname="Xbox"):K?(ie.windows=p,ie.osname="Windows"):F&&(ie.linux=p,ie.osname="Linux");function Ie(me){switch(me){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var ee="";ie.windows?ee=Ie(b(/Windows ((NT|XP)( \d\d?.\d)?)/i)):ie.windowsphone?ee=b(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):ie.mac?(ee=b(/Mac OS X (\d+([_\.\s]\d+)*)/i),ee=ee.replace(/[_\s]/g,".")):R?(ee=b(/os (\d+([_\s]\d+)*) like mac os x/i),ee=ee.replace(/[_\s]/g,".")):E?ee=b(/android[ \/-](\d+(\.\d+)*)/i):ie.webos?ee=b(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):ie.blackberry?ee=b(/rim\stablet\sos\s(\d+(\.\d+)*)/i):ie.bada?ee=b(/bada\/(\d+(\.\d+)*)/i):ie.tizen&&(ee=b(/tizen[\/\s](\d+(\.\d+)*)/i)),ee&&(ie.osversion=ee);var de=!ie.windows&&ee.split(".")[0];return re||P||R=="ipad"||E&&(de==3||de>=4&&!oe)||ie.silk?ie.tablet=p:(oe||R=="iphone"||R=="ipod"||E||C||ie.blackberry||ie.webos||ie.bada)&&(ie.mobile=p),ie.msedge||ie.msie&&ie.version>=10||ie.yandexbrowser&&ie.version>=15||ie.vivaldi&&ie.version>=1||ie.chrome&&ie.version>=20||ie.samsungBrowser&&ie.version>=4||ie.whale&&w([ie.version,"1.0"])===1||ie.mzbrowser&&w([ie.version,"6.0"])===1||ie.focus&&w([ie.version,"1.0"])===1||ie.firefox&&ie.version>=20||ie.safari&&ie.version>=6||ie.opera&&ie.version>=10||ie.ios&&ie.osversion&&ie.osversion.split(".")[0]>=6||ie.blackberry&&ie.version>=10.1||ie.chromium&&ie.version>=20?ie.a=p:ie.msie&&ie.version<10||ie.chrome&&ie.version<20||ie.firefox&&ie.version<20||ie.safari&&ie.version<6||ie.opera&&ie.version<10||ie.ios&&ie.osversion&&ie.osversion.split(".")[0]<6||ie.chromium&&ie.version<20?ie.c=p:ie.x=p,ie}var h=c(typeof navigator!="undefined"&&navigator.userAgent||"");h.test=function(m){for(var b=0;b<m.length;++b){var x=m[b];if(typeof x=="string"&&x in h)return!0}return!1};function y(m){return m.split(".").length}function g(m,b){var x=[],R;if(Array.prototype.map)return Array.prototype.map.call(m,b);for(R=0;R<m.length;R++)x.push(b(m[R]));return x}function w(m){for(var b=Math.max(y(m[0]),y(m[1])),x=g(m,function(R){var I=b-y(R);return R=R+new Array(I+1).join(".0"),g(R.split("."),function(E){return new Array(20-E.length).join("0")+E}).reverse()});--b>=0;){if(x[0][b]>x[1][b])return 1;if(x[0][b]===x[1][b]){if(b===0)return 0}else return-1}}function f(m,b,x){var R=h;typeof b=="string"&&(x=b,b=void 0),b===void 0&&(b=!1),x&&(R=c(x));var I=""+R.version;for(var E in m)if(m.hasOwnProperty(E)&&R[E]){if(typeof m[E]!="string")throw new Error("Browser version in the minVersion map should be a string: "+E+": "+String(m));return w([I,m[E]])<0}return b}function v(m,b,x){return!f(m,b,x)}return h.isUnsupportedBrowser=f,h.compareVersions=w,h.check=v,h._detect=c,h.detect=c,h})},{}],89:[function(a,N,j){},{}],90:[function(a,N,j){(function(p){(function(){"use strict";var c=a("base64-js"),h=a("ieee754");j.Buffer=f,j.SlowBuffer=Z,j.INSPECT_MAX_BYTES=50;var y=2147483647;j.kMaxLength=y,f.TYPED_ARRAY_SUPPORT=g(),!f.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{var S=new Uint8Array(1);return S.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},S.foo()===42}catch(T){return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function w(S){if(S>y)throw new RangeError('The value "'+S+'" is invalid for option "size"');var T=new Uint8Array(S);return T.__proto__=f.prototype,T}function f(S,T,z){if(typeof S=="number"){if(typeof T=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return x(S)}return v(S,T,z)}typeof Symbol!="undefined"&&Symbol.species!=null&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192;function v(S,T,z){if(typeof S=="string")return R(S,T);if(ArrayBuffer.isView(S))return I(S);if(S==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(L(S,ArrayBuffer)||S&&L(S.buffer,ArrayBuffer))return E(S,T,z);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ne=S.valueOf&&S.valueOf();if(ne!=null&&ne!==S)return f.from(ne,T,z);var he=C(S);if(he)return he;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return f.from(S[Symbol.toPrimitive]("string"),T,z);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}f.from=function(S,T,z){return v(S,T,z)},f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array;function m(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function b(S,T,z){return m(S),S<=0?w(S):T!==void 0?typeof z=="string"?w(S).fill(T,z):w(S).fill(T):w(S)}f.alloc=function(S,T,z){return b(S,T,z)};function x(S){return m(S),w(S<0?0:P(S)|0)}f.allocUnsafe=function(S){return x(S)},f.allocUnsafeSlow=function(S){return x(S)};function R(S,T){if((typeof T!="string"||T==="")&&(T="utf8"),!f.isEncoding(T))throw new TypeError("Unknown encoding: "+T);var z=M(S,T)|0,ne=w(z),he=ne.write(S,T);return he!==z&&(ne=ne.slice(0,he)),ne}function I(S){for(var T=S.length<0?0:P(S.length)|0,z=w(T),ne=0;ne<T;ne+=1)z[ne]=S[ne]&255;return z}function E(S,T,z){if(T<0||S.byteLength<T)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<T+(z||0))throw new RangeError('"length" is outside of buffer bounds');var ne;return T===void 0&&z===void 0?ne=new Uint8Array(S):z===void 0?ne=new Uint8Array(S,T):ne=new Uint8Array(S,T,z),ne.__proto__=f.prototype,ne}function C(S){if(f.isBuffer(S)){var T=P(S.length)|0,z=w(T);return z.length===0||S.copy(z,0,0,T),z}if(S.length!==void 0)return typeof S.length!="number"||$(S.length)?w(0):I(S);if(S.type==="Buffer"&&Array.isArray(S.data))return I(S.data)}function P(S){if(S>=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return S|0}function Z(S){return+S!=S&&(S=0),f.alloc(+S)}f.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==f.prototype},f.compare=function(T,z){if(L(T,Uint8Array)&&(T=f.from(T,T.offset,T.byteLength)),L(z,Uint8Array)&&(z=f.from(z,z.offset,z.byteLength)),!f.isBuffer(T)||!f.isBuffer(z))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===z)return 0;for(var ne=T.length,he=z.length,Pe=0,Oe=Math.min(ne,he);Pe<Oe;++Pe)if(T[Pe]!==z[Pe]){ne=T[Pe],he=z[Pe];break}return ne<he?-1:he<ne?1:0},f.isEncoding=function(T){switch(String(T).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(T,z){if(!Array.isArray(T))throw new TypeError('"list" argument must be an Array of Buffers');if(T.length===0)return f.alloc(0);var ne;if(z===void 0)for(z=0,ne=0;ne<T.length;++ne)z+=T[ne].length;var he=f.allocUnsafe(z),Pe=0;for(ne=0;ne<T.length;++ne){var Oe=T[ne];if(L(Oe,Uint8Array)&&(Oe=f.from(Oe)),!f.isBuffer(Oe))throw new TypeError('"list" argument must be an Array of Buffers');Oe.copy(he,Pe),Pe+=Oe.length}return he};function M(S,T){if(f.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||L(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);var z=S.length,ne=arguments.length>2&&arguments[2]===!0;if(!ne&&z===0)return 0;for(var he=!1;;)switch(T){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return Y(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z*2;case"hex":return z>>>1;case"base64":return V(S).length;default:if(he)return ne?-1:Y(S).length;T=(""+T).toLowerCase(),he=!0}}f.byteLength=M;function J(S,T,z){var ne=!1;if((T===void 0||T<0)&&(T=0),T>this.length||((z===void 0||z>this.length)&&(z=this.length),z<=0)||(z>>>=0,T>>>=0,z<=T))return"";for(S||(S="utf8");;)switch(S){case"hex":return de(this,T,z);case"utf8":case"utf-8":return oe(this,T,z);case"ascii":return Ie(this,T,z);case"latin1":case"binary":return ee(this,T,z);case"base64":return re(this,T,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,T,z);default:if(ne)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),ne=!0}}f.prototype._isBuffer=!0;function _(S,T,z){var ne=S[T];S[T]=S[z],S[z]=ne}f.prototype.swap16=function(){var T=this.length;if(T%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var z=0;z<T;z+=2)_(this,z,z+1);return this},f.prototype.swap32=function(){var T=this.length;if(T%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var z=0;z<T;z+=4)_(this,z,z+3),_(this,z+1,z+2);return this},f.prototype.swap64=function(){var T=this.length;if(T%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var z=0;z<T;z+=8)_(this,z,z+7),_(this,z+1,z+6),_(this,z+2,z+5),_(this,z+3,z+4);return this},f.prototype.toString=function(){var T=this.length;return T===0?"":arguments.length===0?oe(this,0,T):J.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(T){if(!f.isBuffer(T))throw new TypeError("Argument must be a Buffer");return this===T?!0:f.compare(this,T)===0},f.prototype.inspect=function(){var T="",z=j.INSPECT_MAX_BYTES;return T=this.toString("hex",0,z).replace(/(.{2})/g,"$1 ").trim(),this.length>z&&(T+=" ... "),"<Buffer "+T+">"},f.prototype.compare=function(T,z,ne,he,Pe){if(L(T,Uint8Array)&&(T=f.from(T,T.offset,T.byteLength)),!f.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(z===void 0&&(z=0),ne===void 0&&(ne=T?T.length:0),he===void 0&&(he=0),Pe===void 0&&(Pe=this.length),z<0||ne>T.length||he<0||Pe>this.length)throw new RangeError("out of range index");if(he>=Pe&&z>=ne)return 0;if(he>=Pe)return-1;if(z>=ne)return 1;if(z>>>=0,ne>>>=0,he>>>=0,Pe>>>=0,this===T)return 0;for(var Oe=Pe-he,Ue=ne-z,nt=Math.min(Oe,Ue),Qe=this.slice(he,Pe),rt=T.slice(z,ne),We=0;We<nt;++We)if(Qe[We]!==rt[We]){Oe=Qe[We],Ue=rt[We];break}return Oe<Ue?-1:Ue<Oe?1:0};function k(S,T,z,ne,he){if(S.length===0)return-1;if(typeof z=="string"?(ne=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),z=+z,$(z)&&(z=he?0:S.length-1),z<0&&(z=S.length+z),z>=S.length){if(he)return-1;z=S.length-1}else if(z<0)if(he)z=0;else return-1;if(typeof T=="string"&&(T=f.from(T,ne)),f.isBuffer(T))return T.length===0?-1:B(S,T,z,ne,he);if(typeof T=="number")return T=T&255,typeof Uint8Array.prototype.indexOf=="function"?he?Uint8Array.prototype.indexOf.call(S,T,z):Uint8Array.prototype.lastIndexOf.call(S,T,z):B(S,[T],z,ne,he);throw new TypeError("val must be string, number or Buffer")}function B(S,T,z,ne,he){var Pe=1,Oe=S.length,Ue=T.length;if(ne!==void 0&&(ne=String(ne).toLowerCase(),ne==="ucs2"||ne==="ucs-2"||ne==="utf16le"||ne==="utf-16le")){if(S.length<2||T.length<2)return-1;Pe=2,Oe/=2,Ue/=2,z/=2}function nt(Re,Be){return Pe===1?Re[Be]:Re.readUInt16BE(Be*Pe)}var Qe;if(he){var rt=-1;for(Qe=z;Qe<Oe;Qe++)if(nt(S,Qe)===nt(T,rt===-1?0:Qe-rt)){if(rt===-1&&(rt=Qe),Qe-rt+1===Ue)return rt*Pe}else rt!==-1&&(Qe-=Qe-rt),rt=-1}else for(z+Ue>Oe&&(z=Oe-Ue),Qe=z;Qe>=0;Qe--){for(var We=!0,Je=0;Je<Ue;Je++)if(nt(S,Qe+Je)!==nt(T,Je)){We=!1;break}if(We)return Qe}return-1}f.prototype.includes=function(T,z,ne){return this.indexOf(T,z,ne)!==-1},f.prototype.indexOf=function(T,z,ne){return k(this,T,z,ne,!0)},f.prototype.lastIndexOf=function(T,z,ne){return k(this,T,z,ne,!1)};function U(S,T,z,ne){z=Number(z)||0;var he=S.length-z;ne?(ne=Number(ne),ne>he&&(ne=he)):ne=he;var Pe=T.length;ne>Pe/2&&(ne=Pe/2);for(var Oe=0;Oe<ne;++Oe){var Ue=parseInt(T.substr(Oe*2,2),16);if($(Ue))return Oe;S[z+Oe]=Ue}return Oe}function K(S,T,z,ne){return Q(Y(T,S.length-z),S,z,ne)}function G(S,T,z,ne){return Q(be(T),S,z,ne)}function F(S,T,z,ne){return G(S,T,z,ne)}function W(S,T,z,ne){return Q(V(T),S,z,ne)}function X(S,T,z,ne){return Q(q(T,S.length-z),S,z,ne)}f.prototype.write=function(T,z,ne,he){if(z===void 0)he="utf8",ne=this.length,z=0;else if(ne===void 0&&typeof z=="string")he=z,ne=this.length,z=0;else if(isFinite(z))z=z>>>0,isFinite(ne)?(ne=ne>>>0,he===void 0&&(he="utf8")):(he=ne,ne=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Pe=this.length-z;if((ne===void 0||ne>Pe)&&(ne=Pe),T.length>0&&(ne<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");for(var Oe=!1;;)switch(he){case"hex":return U(this,T,z,ne);case"utf8":case"utf-8":return K(this,T,z,ne);case"ascii":return G(this,T,z,ne);case"latin1":case"binary":return F(this,T,z,ne);case"base64":return W(this,T,z,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,T,z,ne);default:if(Oe)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),Oe=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(S,T,z){return T===0&&z===S.length?c.fromByteArray(S):c.fromByteArray(S.slice(T,z))}function oe(S,T,z){z=Math.min(S.length,z);for(var ne=[],he=T;he<z;){var Pe=S[he],Oe=null,Ue=Pe>239?4:Pe>223?3:Pe>191?2:1;if(he+Ue<=z){var nt,Qe,rt,We;switch(Ue){case 1:Pe<128&&(Oe=Pe);break;case 2:nt=S[he+1],(nt&192)===128&&(We=(Pe&31)<<6|nt&63,We>127&&(Oe=We));break;case 3:nt=S[he+1],Qe=S[he+2],(nt&192)===128&&(Qe&192)===128&&(We=(Pe&15)<<12|(nt&63)<<6|Qe&63,We>2047&&(We<55296||We>57343)&&(Oe=We));break;case 4:nt=S[he+1],Qe=S[he+2],rt=S[he+3],(nt&192)===128&&(Qe&192)===128&&(rt&192)===128&&(We=(Pe&15)<<18|(nt&63)<<12|(Qe&63)<<6|rt&63,We>65535&&We<1114112&&(Oe=We))}}Oe===null?(Oe=65533,Ue=1):Oe>65535&&(Oe-=65536,ne.push(Oe>>>10&1023|55296),Oe=56320|Oe&1023),ne.push(Oe),he+=Ue}return ie(ne)}var pe=4096;function ie(S){var T=S.length;if(T<=pe)return String.fromCharCode.apply(String,S);for(var z="",ne=0;ne<T;)z+=String.fromCharCode.apply(String,S.slice(ne,ne+=pe));return z}function Ie(S,T,z){var ne="";z=Math.min(S.length,z);for(var he=T;he<z;++he)ne+=String.fromCharCode(S[he]&127);return ne}function ee(S,T,z){var ne="";z=Math.min(S.length,z);for(var he=T;he<z;++he)ne+=String.fromCharCode(S[he]);return ne}function de(S,T,z){var ne=S.length;(!T||T<0)&&(T=0),(!z||z<0||z>ne)&&(z=ne);for(var he="",Pe=T;Pe<z;++Pe)he+=fe(S[Pe]);return he}function me(S,T,z){for(var ne=S.slice(T,z),he="",Pe=0;Pe<ne.length;Pe+=2)he+=String.fromCharCode(ne[Pe]+ne[Pe+1]*256);return he}f.prototype.slice=function(T,z){var ne=this.length;T=~~T,z=z===void 0?ne:~~z,T<0?(T+=ne,T<0&&(T=0)):T>ne&&(T=ne),z<0?(z+=ne,z<0&&(z=0)):z>ne&&(z=ne),z<T&&(z=T);var he=this.subarray(T,z);return he.__proto__=f.prototype,he};function xe(S,T,z){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+T>z)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function(T,z,ne){T=T>>>0,z=z>>>0,ne||xe(T,z,this.length);for(var he=this[T],Pe=1,Oe=0;++Oe<z&&(Pe*=256);)he+=this[T+Oe]*Pe;return he},f.prototype.readUIntBE=function(T,z,ne){T=T>>>0,z=z>>>0,ne||xe(T,z,this.length);for(var he=this[T+--z],Pe=1;z>0&&(Pe*=256);)he+=this[T+--z]*Pe;return he},f.prototype.readUInt8=function(T,z){return T=T>>>0,z||xe(T,1,this.length),this[T]},f.prototype.readUInt16LE=function(T,z){return T=T>>>0,z||xe(T,2,this.length),this[T]|this[T+1]<<8},f.prototype.readUInt16BE=function(T,z){return T=T>>>0,z||xe(T,2,this.length),this[T]<<8|this[T+1]},f.prototype.readUInt32LE=function(T,z){return T=T>>>0,z||xe(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},f.prototype.readUInt32BE=function(T,z){return T=T>>>0,z||xe(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},f.prototype.readIntLE=function(T,z,ne){T=T>>>0,z=z>>>0,ne||xe(T,z,this.length);for(var he=this[T],Pe=1,Oe=0;++Oe<z&&(Pe*=256);)he+=this[T+Oe]*Pe;return Pe*=128,he>=Pe&&(he-=Math.pow(2,8*z)),he},f.prototype.readIntBE=function(T,z,ne){T=T>>>0,z=z>>>0,ne||xe(T,z,this.length);for(var he=z,Pe=1,Oe=this[T+--he];he>0&&(Pe*=256);)Oe+=this[T+--he]*Pe;return Pe*=128,Oe>=Pe&&(Oe-=Math.pow(2,8*z)),Oe},f.prototype.readInt8=function(T,z){return T=T>>>0,z||xe(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},f.prototype.readInt16LE=function(T,z){T=T>>>0,z||xe(T,2,this.length);var ne=this[T]|this[T+1]<<8;return ne&32768?ne|4294901760:ne},f.prototype.readInt16BE=function(T,z){T=T>>>0,z||xe(T,2,this.length);var ne=this[T+1]|this[T]<<8;return ne&32768?ne|4294901760:ne},f.prototype.readInt32LE=function(T,z){return T=T>>>0,z||xe(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},f.prototype.readInt32BE=function(T,z){return T=T>>>0,z||xe(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},f.prototype.readFloatLE=function(T,z){return T=T>>>0,z||xe(T,4,this.length),h.read(this,T,!0,23,4)},f.prototype.readFloatBE=function(T,z){return T=T>>>0,z||xe(T,4,this.length),h.read(this,T,!1,23,4)},f.prototype.readDoubleLE=function(T,z){return T=T>>>0,z||xe(T,8,this.length),h.read(this,T,!0,52,8)},f.prototype.readDoubleBE=function(T,z){return T=T>>>0,z||xe(T,8,this.length),h.read(this,T,!1,52,8)};function ce(S,T,z,ne,he,Pe){if(!f.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(T>he||T<Pe)throw new RangeError('"value" argument is out of bounds');if(z+ne>S.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function(T,z,ne,he){if(T=+T,z=z>>>0,ne=ne>>>0,!he){var Pe=Math.pow(2,8*ne)-1;ce(this,T,z,ne,Pe,0)}var Oe=1,Ue=0;for(this[z]=T&255;++Ue<ne&&(Oe*=256);)this[z+Ue]=T/Oe&255;return z+ne},f.prototype.writeUIntBE=function(T,z,ne,he){if(T=+T,z=z>>>0,ne=ne>>>0,!he){var Pe=Math.pow(2,8*ne)-1;ce(this,T,z,ne,Pe,0)}var Oe=ne-1,Ue=1;for(this[z+Oe]=T&255;--Oe>=0&&(Ue*=256);)this[z+Oe]=T/Ue&255;return z+ne},f.prototype.writeUInt8=function(T,z,ne){return T=+T,z=z>>>0,ne||ce(this,T,z,1,255,0),this[z]=T&255,z+1},f.prototype.writeUInt16LE=function(T,z,ne){return T=+T,z=z>>>0,ne||ce(this,T,z,2,65535,0),this[z]=T&255,this[z+1]=T>>>8,z+2},f.prototype.writeUInt16BE=function(T,z,ne){return T=+T,z=z>>>0,ne||ce(this,T,z,2,65535,0),this[z]=T>>>8,this[z+1]=T&255,z+2},f.prototype.writeUInt32LE=function(T,z,ne){return T=+T,z=z>>>0,ne||ce(this,T,z,4,4294967295,0),this[z+3]=T>>>24,this[z+2]=T>>>16,this[z+1]=T>>>8,this[z]=T&255,z+4},f.prototype.writeUInt32BE=function(T,z,ne){return T=+T,z=z>>>0,ne||ce(this,T,z,4,4294967295,0),this[z]=T>>>24,this[z+1]=T>>>16,this[z+2]=T>>>8,this[z+3]=T&255,z+4},f.prototype.writeIntLE=function(T,z,ne,he){if(T=+T,z=z>>>0,!he){var Pe=Math.pow(2,8*ne-1);ce(this,T,z,ne,Pe-1,-Pe)}var Oe=0,Ue=1,nt=0;for(this[z]=T&255;++Oe<ne&&(Ue*=256);)T<0&&nt===0&&this[z+Oe-1]!==0&&(nt=1),this[z+Oe]=(T/Ue>>0)-nt&255;return z+ne},f.prototype.writeIntBE=function(T,z,ne,he){if(T=+T,z=z>>>0,!he){var Pe=Math.pow(2,8*ne-1);ce(this,T,z,ne,Pe-1,-Pe)}var Oe=ne-1,Ue=1,nt=0;for(this[z+Oe]=T&255;--Oe>=0&&(Ue*=256);)T<0&&nt===0&&this[z+Oe+1]!==0&&(nt=1),this[z+Oe]=(T/Ue>>0)-nt&255;return z+ne},f.prototype.writeInt8=function(T,z,ne){return T=+T,z=z>>>0,ne||ce(this,T,z,1,127,-128),T<0&&(T=255+T+1),this[z]=T&255,z+1},f.prototype.writeInt16LE=function(T,z,ne){return T=+T,z=z>>>0,ne||ce(this,T,z,2,32767,-32768),this[z]=T&255,this[z+1]=T>>>8,z+2},f.prototype.writeInt16BE=function(T,z,ne){return T=+T,z=z>>>0,ne||ce(this,T,z,2,32767,-32768),this[z]=T>>>8,this[z+1]=T&255,z+2},f.prototype.writeInt32LE=function(T,z,ne){return T=+T,z=z>>>0,ne||ce(this,T,z,4,2147483647,-2147483648),this[z]=T&255,this[z+1]=T>>>8,this[z+2]=T>>>16,this[z+3]=T>>>24,z+4},f.prototype.writeInt32BE=function(T,z,ne){return T=+T,z=z>>>0,ne||ce(this,T,z,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[z]=T>>>24,this[z+1]=T>>>16,this[z+2]=T>>>8,this[z+3]=T&255,z+4};function le(S,T,z,ne,he,Pe){if(z+ne>S.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function ge(S,T,z,ne,he){return T=+T,z=z>>>0,he||le(S,T,z,4,34028234663852886e22,-34028234663852886e22),h.write(S,T,z,ne,23,4),z+4}f.prototype.writeFloatLE=function(T,z,ne){return ge(this,T,z,!0,ne)},f.prototype.writeFloatBE=function(T,z,ne){return ge(this,T,z,!1,ne)};function Ce(S,T,z,ne,he){return T=+T,z=z>>>0,he||le(S,T,z,8,17976931348623157e292,-17976931348623157e292),h.write(S,T,z,ne,52,8),z+8}f.prototype.writeDoubleLE=function(T,z,ne){return Ce(this,T,z,!0,ne)},f.prototype.writeDoubleBE=function(T,z,ne){return Ce(this,T,z,!1,ne)},f.prototype.copy=function(T,z,ne,he){if(!f.isBuffer(T))throw new TypeError("argument should be a Buffer");if(ne||(ne=0),!he&&he!==0&&(he=this.length),z>=T.length&&(z=T.length),z||(z=0),he>0&&he<ne&&(he=ne),he===ne||T.length===0||this.length===0)return 0;if(z<0)throw new RangeError("targetStart out of bounds");if(ne<0||ne>=this.length)throw new RangeError("Index out of range");if(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),T.length-z<he-ne&&(he=T.length-z+ne);var Pe=he-ne;if(this===T&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(z,ne,he);else if(this===T&&ne<z&&z<he)for(var Oe=Pe-1;Oe>=0;--Oe)T[Oe+z]=this[Oe+ne];else Uint8Array.prototype.set.call(T,this.subarray(ne,he),z);return Pe},f.prototype.fill=function(T,z,ne,he){if(typeof T=="string"){if(typeof z=="string"?(he=z,z=0,ne=this.length):typeof ne=="string"&&(he=ne,ne=this.length),he!==void 0&&typeof he!="string")throw new TypeError("encoding must be a string");if(typeof he=="string"&&!f.isEncoding(he))throw new TypeError("Unknown encoding: "+he);if(T.length===1){var Pe=T.charCodeAt(0);(he==="utf8"&&Pe<128||he==="latin1")&&(T=Pe)}}else typeof T=="number"&&(T=T&255);if(z<0||this.length<z||this.length<ne)throw new RangeError("Out of range index");if(ne<=z)return this;z=z>>>0,ne=ne===void 0?this.length:ne>>>0,T||(T=0);var Oe;if(typeof T=="number")for(Oe=z;Oe<ne;++Oe)this[Oe]=T;else{var Ue=f.isBuffer(T)?T:f.from(T,he),nt=Ue.length;if(nt===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(Oe=0;Oe<ne-z;++Oe)this[Oe+z]=Ue[Oe%nt]}return this};var De=/[^+/0-9A-Za-z-_]/g;function je(S){if(S=S.split("=")[0],S=S.trim().replace(De,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function fe(S){return S<16?"0"+S.toString(16):S.toString(16)}function Y(S,T){T=T||1/0;for(var z,ne=S.length,he=null,Pe=[],Oe=0;Oe<ne;++Oe){if(z=S.charCodeAt(Oe),z>55295&&z<57344){if(!he){if(z>56319){(T-=3)>-1&&Pe.push(239,191,189);continue}else if(Oe+1===ne){(T-=3)>-1&&Pe.push(239,191,189);continue}he=z;continue}if(z<56320){(T-=3)>-1&&Pe.push(239,191,189),he=z;continue}z=(he-55296<<10|z-56320)+65536}else he&&(T-=3)>-1&&Pe.push(239,191,189);if(he=null,z<128){if((T-=1)<0)break;Pe.push(z)}else if(z<2048){if((T-=2)<0)break;Pe.push(z>>6|192,z&63|128)}else if(z<65536){if((T-=3)<0)break;Pe.push(z>>12|224,z>>6&63|128,z&63|128)}else if(z<1114112){if((T-=4)<0)break;Pe.push(z>>18|240,z>>12&63|128,z>>6&63|128,z&63|128)}else throw new Error("Invalid code point")}return Pe}function be(S){for(var T=[],z=0;z<S.length;++z)T.push(S.charCodeAt(z)&255);return T}function q(S,T){for(var z,ne,he,Pe=[],Oe=0;Oe<S.length&&!((T-=2)<0);++Oe)z=S.charCodeAt(Oe),ne=z>>8,he=z%256,Pe.push(he),Pe.push(ne);return Pe}function V(S){return c.toByteArray(je(S))}function Q(S,T,z,ne){for(var he=0;he<ne&&!(he+z>=T.length||he>=S.length);++he)T[he+z]=S[he];return he}function L(S,T){return S instanceof T||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===T.name}function $(S){return S!==S}}).call(this)}).call(this,a("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(a,N,j){N.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(a,N,j){"use strict";var p=a("get-intrinsic"),c=a("./"),h=c(p("String.prototype.indexOf"));N.exports=function(g,w){var f=p(g,!!w);return typeof f=="function"&&h(g,".prototype.")>-1?c(f):f}},{"./":93,"get-intrinsic":348}],93:[function(a,N,j){"use strict";var p=a("function-bind"),c=a("get-intrinsic"),h=c("%Function.prototype.apply%"),y=c("%Function.prototype.call%"),g=c("%Reflect.apply%",!0)||p.call(y,h),w=c("%Object.getOwnPropertyDescriptor%",!0),f=c("%Object.defineProperty%",!0),v=c("%Math.max%");if(f)try{f({},"a",{value:1})}catch(b){f=null}N.exports=function(x){var R=g(p,y,arguments);if(w&&f){var I=w(R,"length");I.configurable&&f(R,"length",{value:1+v(0,x.length-(arguments.length-1))})}return R};var m=function(){return g(p,h,arguments)};f?f(N.exports,"apply",{value:m}):N.exports.apply=m},{"function-bind":347,"get-intrinsic":348}],94:[function(a,N,j){"use strict";var p=Array.prototype.slice;N.exports=c;function c(y,g){if(!(this instanceof c))return new c(y,g);this.src=y,this._withAccess=g}c.prototype.withAccess=function(y){return this._withAccess=y!==!1,this},c.prototype.pick=function(y){return Array.isArray(y)||(y=p.call(arguments)),y.length&&(this.keys=y),this},c.prototype.to=function(y){if(y=y||{},!this.src)return y;var g=this.keys||Object.keys(this.src);if(!this._withAccess){for(var w=0;w<g.length;w++)f=g[w],y[f]===void 0&&(y[f]=this.src[f]);return y}for(var w=0;w<g.length;w++){var f=g[w];if(h(y,f)){var v=this.src.__lookupGetter__(f),m=this.src.__lookupSetter__(f);v&&y.__defineGetter__(f,v),m&&y.__defineSetter__(f,m),!v&&!m&&(y[f]=this.src[f])}}return y},c.prototype.toCover=function(y){for(var g=this.keys||Object.keys(this.src),w=0;w<g.length;w++){var f=g[w];delete y[f];var v=this.src.__lookupGetter__(f),m=this.src.__lookupSetter__(f);v&&y.__defineGetter__(f,v),m&&y.__defineSetter__(f,m),!v&&!m&&(y[f]=this.src[f])}},c.prototype.override=c.prototype.toCover,c.prototype.and=function(y){var g={};return this.to(g),this.src=y,this.to(g),this.src=g,this};function h(y,g){return y[g]===void 0&&y.__lookupGetter__(g)===void 0&&y.__lookupSetter__(g)===void 0}},{}],95:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/is-callable"),h=a("../internals/try-to-string"),y=p.TypeError;N.exports=function(g){if(c(g))return g;throw y(h(g)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/is-constructor"),h=a("../internals/try-to-string"),y=p.TypeError;N.exports=function(g){if(c(g))return g;throw y(h(g)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/is-callable"),h=p.String,y=p.TypeError;N.exports=function(g){if(typeof g=="object"||c(g))return g;throw y("Can't set "+h(g)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(a,N,j){var p=a("../internals/well-known-symbol"),c=a("../internals/object-create"),h=a("../internals/object-define-property"),y=p("unscopables"),g=Array.prototype;g[y]==null&&h.f(g,y,{configurable:!0,value:c(null)}),N.exports=function(w){g[y][w]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(a,N,j){"use strict";var p=a("../internals/string-multibyte").charAt;N.exports=function(c,h,y){return h+(y?p(c,h).length:1)}},{"../internals/string-multibyte":239}],100:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/object-is-prototype-of"),h=p.TypeError;N.exports=function(y,g){if(c(g,y))return y;throw h("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/is-object"),h=p.String,y=p.TypeError;N.exports=function(g){if(c(g))return g;throw y(h(g)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(a,N,j){N.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-native"),c=a("../internals/descriptors"),h=a("../internals/global"),y=a("../internals/is-callable"),g=a("../internals/is-object"),w=a("../internals/has-own-property"),f=a("../internals/classof"),v=a("../internals/try-to-string"),m=a("../internals/create-non-enumerable-property"),b=a("../internals/redefine"),x=a("../internals/object-define-property").f,R=a("../internals/object-is-prototype-of"),I=a("../internals/object-get-prototype-of"),E=a("../internals/object-set-prototype-of"),C=a("../internals/well-known-symbol"),P=a("../internals/uid"),Z=h.Int8Array,M=Z&&Z.prototype,J=h.Uint8ClampedArray,_=J&&J.prototype,k=Z&&I(Z),B=M&&I(M),U=Object.prototype,K=h.TypeError,G=C("toStringTag"),F=P("TYPED_ARRAY_TAG"),W=P("TYPED_ARRAY_CONSTRUCTOR"),X=p&&!!E&&f(h.opera)!=="Opera",re=!1,oe,pe,ie,Ie={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ee={BigInt64Array:8,BigUint64Array:8},de=function(De){if(!g(De))return!1;var je=f(De);return je==="DataView"||w(Ie,je)||w(ee,je)},me=function(Ce){if(!g(Ce))return!1;var De=f(Ce);return w(Ie,De)||w(ee,De)},xe=function(Ce){if(me(Ce))return Ce;throw K("Target is not a typed array")},ce=function(Ce){if(y(Ce)&&(!E||R(k,Ce)))return Ce;throw K(v(Ce)+" is not a typed array constructor")},le=function(Ce,De,je,fe){if(c){if(je)for(var Y in Ie){var be=h[Y];if(be&&w(be.prototype,Ce))try{delete be.prototype[Ce]}catch(q){try{be.prototype[Ce]=De}catch(V){}}}(!B[Ce]||je)&&b(B,Ce,je?De:X&&M[Ce]||De,fe)}},ge=function(Ce,De,je){var fe,Y;if(c){if(E){if(je){for(fe in Ie)if(Y=h[fe],Y&&w(Y,Ce))try{delete Y[Ce]}catch(be){}}if(!k[Ce]||je)try{return b(k,Ce,je?De:X&&k[Ce]||De)}catch(be){}else return}for(fe in Ie)Y=h[fe],Y&&(!Y[Ce]||je)&&b(Y,Ce,De)}};for(oe in Ie)pe=h[oe],ie=pe&&pe.prototype,ie?m(ie,W,pe):X=!1;for(oe in ee)pe=h[oe],ie=pe&&pe.prototype,ie&&m(ie,W,pe);if((!X||!y(k)||k===Function.prototype)&&(k=function(){throw K("Incorrect invocation")},X))for(oe in Ie)h[oe]&&E(h[oe],k);if((!X||!B||B===U)&&(B=k.prototype,X))for(oe in Ie)h[oe]&&E(h[oe].prototype,B);if(X&&I(_)!==B&&E(_,B),c&&!w(B,G)){re=!0,x(B,G,{get:function(){return g(this)?this[F]:void 0}});for(oe in Ie)h[oe]&&m(h[oe],F,oe)}N.exports={NATIVE_ARRAY_BUFFER_VIEWS:X,TYPED_ARRAY_CONSTRUCTOR:W,TYPED_ARRAY_TAG:re&&F,aTypedArray:xe,aTypedArrayConstructor:ce,exportTypedArrayMethod:le,exportTypedArrayStaticMethod:ge,isView:de,isTypedArray:me,TypedArray:k,TypedArrayPrototype:B}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(a,N,j){"use strict";var p=a("../internals/global"),c=a("../internals/function-uncurry-this"),h=a("../internals/descriptors"),y=a("../internals/array-buffer-native"),g=a("../internals/function-name"),w=a("../internals/create-non-enumerable-property"),f=a("../internals/redefine-all"),v=a("../internals/fails"),m=a("../internals/an-instance"),b=a("../internals/to-integer-or-infinity"),x=a("../internals/to-length"),R=a("../internals/to-index"),I=a("../internals/ieee754"),E=a("../internals/object-get-prototype-of"),C=a("../internals/object-set-prototype-of"),P=a("../internals/object-get-own-property-names").f,Z=a("../internals/object-define-property").f,M=a("../internals/array-fill"),J=a("../internals/array-slice-simple"),_=a("../internals/set-to-string-tag"),k=a("../internals/internal-state"),B=g.PROPER,U=g.CONFIGURABLE,K=k.get,G=k.set,F="ArrayBuffer",W="DataView",X="prototype",re="Wrong length",oe="Wrong index",pe=p[F],ie=pe,Ie=ie&&ie[X],ee=p[W],de=ee&&ee[X],me=Object.prototype,xe=p.Array,ce=p.RangeError,le=c(M),ge=c([].reverse),Ce=I.pack,De=I.unpack,je=function(Oe){return[Oe&255]},fe=function(Oe){return[Oe&255,Oe>>8&255]},Y=function(Oe){return[Oe&255,Oe>>8&255,Oe>>16&255,Oe>>24&255]},be=function(Oe){return Oe[3]<<24|Oe[2]<<16|Oe[1]<<8|Oe[0]},q=function(Oe){return Ce(Oe,23,4)},V=function(Oe){return Ce(Oe,52,8)},Q=function(Oe,Ue){Z(Oe[X],Ue,{get:function(){return K(this)[Ue]}})},L=function(Oe,Ue,nt,Qe){var rt=R(nt),We=K(Oe);if(rt+Ue>We.byteLength)throw ce(oe);var Je=K(We.buffer).bytes,Re=rt+We.byteOffset,Be=J(Je,Re,Re+Ue);return Qe?Be:ge(Be)},$=function(Oe,Ue,nt,Qe,rt,We){var Je=R(nt),Re=K(Oe);if(Je+Ue>Re.byteLength)throw ce(oe);for(var Be=K(Re.buffer).bytes,_e=Je+Re.byteOffset,Ve=Qe(+rt),et=0;et<Ue;et++)Be[_e+et]=Ve[We?et:Ue-et-1]};if(!y)ie=function(Ue){m(this,Ie);var nt=R(Ue);G(this,{bytes:le(xe(nt),0),byteLength:nt}),h||(this.byteLength=nt)},Ie=ie[X],ee=function(Ue,nt,Qe){m(this,de),m(Ue,Ie);var rt=K(Ue).byteLength,We=b(nt);if(We<0||We>rt)throw ce("Wrong offset");if(Qe=Qe===void 0?rt-We:x(Qe),We+Qe>rt)throw ce(re);G(this,{buffer:Ue,byteLength:Qe,byteOffset:We}),h||(this.buffer=Ue,this.byteLength=Qe,this.byteOffset=We)},de=ee[X],h&&(Q(ie,"byteLength"),Q(ee,"buffer"),Q(ee,"byteLength"),Q(ee,"byteOffset")),f(de,{getInt8:function(Ue){return L(this,1,Ue)[0]<<24>>24},getUint8:function(Ue){return L(this,1,Ue)[0]},getInt16:function(Ue){var nt=L(this,2,Ue,arguments.length>1?arguments[1]:void 0);return(nt[1]<<8|nt[0])<<16>>16},getUint16:function(Ue){var nt=L(this,2,Ue,arguments.length>1?arguments[1]:void 0);return nt[1]<<8|nt[0]},getInt32:function(Ue){return be(L(this,4,Ue,arguments.length>1?arguments[1]:void 0))},getUint32:function(Ue){return be(L(this,4,Ue,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Ue){return De(L(this,4,Ue,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Ue){return De(L(this,8,Ue,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Ue,nt){$(this,1,Ue,je,nt)},setUint8:function(Ue,nt){$(this,1,Ue,je,nt)},setInt16:function(Ue,nt){$(this,2,Ue,fe,nt,arguments.length>2?arguments[2]:void 0)},setUint16:function(Ue,nt){$(this,2,Ue,fe,nt,arguments.length>2?arguments[2]:void 0)},setInt32:function(Ue,nt){$(this,4,Ue,Y,nt,arguments.length>2?arguments[2]:void 0)},setUint32:function(Ue,nt){$(this,4,Ue,Y,nt,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Ue,nt){$(this,4,Ue,q,nt,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Ue,nt){$(this,8,Ue,V,nt,arguments.length>2?arguments[2]:void 0)}});else{var S=B&&pe.name!==F;if(!v(function(){pe(1)})||!v(function(){new pe(-1)})||v(function(){return new pe,new pe(1.5),new pe(NaN),S&&!U})){ie=function(Ue){return m(this,Ie),new pe(R(Ue))},ie[X]=Ie;for(var T=P(pe),z=0,ne;T.length>z;)(ne=T[z++])in ie||w(ie,ne,pe[ne]);Ie.constructor=ie}else S&&U&&w(pe,"name",F);C&&E(de)!==me&&C(de,me);var he=new ee(new ie(2)),Pe=c(de.setInt8);he.setInt8(0,2147483648),he.setInt8(1,2147483649),(he.getInt8(0)||!he.getInt8(1))&&f(de,{setInt8:function(Ue,nt){Pe(this,Ue,nt<<24>>24)},setUint8:function(Ue,nt){Pe(this,Ue,nt<<24>>24)}},{unsafe:!0})}_(ie,F),_(ee,W),N.exports={ArrayBuffer:ie,DataView:ee}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(a,N,j){"use strict";var p=a("../internals/to-object"),c=a("../internals/to-absolute-index"),h=a("../internals/length-of-array-like"),y=Math.min;N.exports=[].copyWithin||function(w,f){var v=p(this),m=h(v),b=c(w,m),x=c(f,m),R=arguments.length>2?arguments[2]:void 0,I=y((R===void 0?m:c(R,m))-x,m-b),E=1;for(x<b&&b<x+I&&(E=-1,x+=I-1,b+=I-1);I-- >0;)x in v?v[b]=v[x]:delete v[b],b+=E,x+=E;return v}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(a,N,j){"use strict";var p=a("../internals/to-object"),c=a("../internals/to-absolute-index"),h=a("../internals/length-of-array-like");N.exports=function(g){for(var w=p(this),f=h(w),v=arguments.length,m=c(v>1?arguments[1]:void 0,f),b=v>2?arguments[2]:void 0,x=b===void 0?f:c(b,f);x>m;)w[m++]=g;return w}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(a,N,j){"use strict";var p=a("../internals/array-iteration").forEach,c=a("../internals/array-method-is-strict"),h=c("forEach");N.exports=h?[].forEach:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(a,N,j){var p=a("../internals/length-of-array-like");N.exports=function(c,h){for(var y=0,g=p(h),w=new c(g);g>y;)w[y]=h[y++];return w}},{"../internals/length-of-array-like":188}],109:[function(a,N,j){"use strict";var p=a("../internals/global"),c=a("../internals/function-bind-context"),h=a("../internals/function-call"),y=a("../internals/to-object"),g=a("../internals/call-with-safe-iteration-closing"),w=a("../internals/is-array-iterator-method"),f=a("../internals/is-constructor"),v=a("../internals/length-of-array-like"),m=a("../internals/create-property"),b=a("../internals/get-iterator"),x=a("../internals/get-iterator-method"),R=p.Array;N.exports=function(E){var C=y(E),P=f(this),Z=arguments.length,M=Z>1?arguments[1]:void 0,J=M!==void 0;J&&(M=c(M,Z>2?arguments[2]:void 0));var _=x(C),k=0,B,U,K,G,F,W;if(_&&!(this==R&&w(_)))for(G=b(C,_),F=G.next,U=P?new this:[];!(K=h(F,G)).done;k++)W=J?g(G,M,[K.value,k],!0):K.value,m(U,k,W);else for(B=v(C),U=P?new this(B):R(B);B>k;k++)W=J?M(C[k],k):C[k],m(U,k,W);return U.length=k,U}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(a,N,j){var p=a("../internals/to-indexed-object"),c=a("../internals/to-absolute-index"),h=a("../internals/length-of-array-like"),y=function(g){return function(w,f,v){var m=p(w),b=h(m),x=c(v,b),R;if(g&&f!=f){for(;b>x;)if(R=m[x++],R!=R)return!0}else for(;b>x;x++)if((g||x in m)&&m[x]===f)return g||x||0;return!g&&-1}};N.exports={includes:y(!0),indexOf:y(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(a,N,j){var p=a("../internals/function-bind-context"),c=a("../internals/function-uncurry-this"),h=a("../internals/indexed-object"),y=a("../internals/to-object"),g=a("../internals/length-of-array-like"),w=a("../internals/array-species-create"),f=c([].push),v=function(m){var b=m==1,x=m==2,R=m==3,I=m==4,E=m==6,C=m==7,P=m==5||E;return function(Z,M,J,_){for(var k=y(Z),B=h(k),U=p(M,J),K=g(B),G=0,F=_||w,W=b?F(Z,K):x||C?F(Z,0):void 0,X,re;K>G;G++)if((P||G in B)&&(X=B[G],re=U(X,G,k),m))if(b)W[G]=re;else if(re)switch(m){case 3:return!0;case 5:return X;case 6:return G;case 2:f(W,X)}else switch(m){case 4:return!1;case 7:f(W,X)}return E?-1:R||I?I:W}};N.exports={forEach:v(0),map:v(1),filter:v(2),some:v(3),every:v(4),find:v(5),findIndex:v(6),filterReject:v(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(a,N,j){"use strict";var p=a("../internals/function-apply"),c=a("../internals/to-indexed-object"),h=a("../internals/to-integer-or-infinity"),y=a("../internals/length-of-array-like"),g=a("../internals/array-method-is-strict"),w=Math.min,f=[].lastIndexOf,v=!!f&&1/[1].lastIndexOf(1,-0)<0,m=g("lastIndexOf"),b=v||!m;N.exports=b?function(R){if(v)return p(f,this,arguments)||0;var I=c(this),E=y(I),C=E-1;for(arguments.length>1&&(C=w(C,h(arguments[1]))),C<0&&(C=E+C);C>=0;C--)if(C in I&&I[C]===R)return C||0;return-1}:f},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(a,N,j){var p=a("../internals/fails"),c=a("../internals/well-known-symbol"),h=a("../internals/engine-v8-version"),y=c("species");N.exports=function(g){return h>=51||!p(function(){var w=[],f=w.constructor={};return f[y]=function(){return{foo:1}},w[g](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(a,N,j){"use strict";var p=a("../internals/fails");N.exports=function(c,h){var y=[][c];return!!y&&p(function(){y.call(null,h||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/a-callable"),h=a("../internals/to-object"),y=a("../internals/indexed-object"),g=a("../internals/length-of-array-like"),w=p.TypeError,f=function(v){return function(m,b,x,R){c(b);var I=h(m),E=y(I),C=g(I),P=v?C-1:0,Z=v?-1:1;if(x<2)for(;;){if(P in E){R=E[P],P+=Z;break}if(P+=Z,v?P<0:C<=P)throw w("Reduce of empty array with no initial value")}for(;v?P>=0:C>P;P+=Z)P in E&&(R=b(R,E[P],P,I));return R}};N.exports={left:f(!1),right:f(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/to-absolute-index"),h=a("../internals/length-of-array-like"),y=a("../internals/create-property"),g=p.Array,w=Math.max;N.exports=function(f,v,m){for(var b=h(f),x=c(v,b),R=c(m===void 0?b:m,b),I=g(w(R-x,0)),E=0;x<R;x++,E++)y(I,E,f[x]);return I.length=E,I}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(a,N,j){var p=a("../internals/function-uncurry-this");N.exports=p([].slice)},{"../internals/function-uncurry-this":157}],118:[function(a,N,j){var p=a("../internals/array-slice-simple"),c=Math.floor,h=function(w,f){var v=w.length,m=c(v/2);return v<8?y(w,f):g(w,h(p(w,0,m),f),h(p(w,m),f),f)},y=function(w,f){for(var v=w.length,m=1,b,x;m<v;){for(x=m,b=w[m];x&&f(w[x-1],b)>0;)w[x]=w[--x];x!==m++&&(w[x]=b)}return w},g=function(w,f,v,m){for(var b=f.length,x=v.length,R=0,I=0;R<b||I<x;)w[R+I]=R<b&&I<x?m(f[R],v[I])<=0?f[R++]:v[I++]:R<b?f[R++]:v[I++];return w};N.exports=h},{"../internals/array-slice-simple":116}],119:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/is-array"),h=a("../internals/is-constructor"),y=a("../internals/is-object"),g=a("../internals/well-known-symbol"),w=g("species"),f=p.Array;N.exports=function(v){var m;return c(v)&&(m=v.constructor,h(m)&&(m===f||c(m.prototype))?m=void 0:y(m)&&(m=m[w],m===null&&(m=void 0))),m===void 0?f:m}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(a,N,j){var p=a("../internals/array-species-constructor");N.exports=function(c,h){return new(p(c))(h===0?0:h)}},{"../internals/array-species-constructor":119}],121:[function(a,N,j){var p=a("../internals/an-object"),c=a("../internals/iterator-close");N.exports=function(h,y,g,w){try{return w?y(p(g)[0],g[1]):y(g)}catch(f){c(h,"throw",f)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(a,N,j){var p=a("../internals/well-known-symbol"),c=p("iterator"),h=!1;try{var y=0,g={next:function(){return{done:!!y++}},return:function(){h=!0}};g[c]=function(){return this},Array.from(g,function(){throw 2})}catch(w){}N.exports=function(w,f){if(!f&&!h)return!1;var v=!1;try{var m={};m[c]=function(){return{next:function(){return{done:v=!0}}}},w(m)}catch(b){}return v}},{"../internals/well-known-symbol":268}],123:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=p({}.toString),h=p("".slice);N.exports=function(y){return h(c(y),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/to-string-tag-support"),h=a("../internals/is-callable"),y=a("../internals/classof-raw"),g=a("../internals/well-known-symbol"),w=g("toStringTag"),f=p.Object,v=y(function(){return arguments}())=="Arguments",m=function(b,x){try{return b[x]}catch(R){}};N.exports=c?y:function(b){var x,R,I;return b===void 0?"Undefined":b===null?"Null":typeof(R=m(x=f(b),w))=="string"?R:v?y(x):(I=y(x))=="Object"&&h(x.callee)?"Arguments":I}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(a,N,j){var p=a("../internals/has-own-property"),c=a("../internals/own-keys"),h=a("../internals/object-get-own-property-descriptor"),y=a("../internals/object-define-property");N.exports=function(g,w,f){for(var v=c(w),m=y.f,b=h.f,x=0;x<v.length;x++){var R=v[x];!p(g,R)&&!(f&&p(f,R))&&m(g,R,b(w,R))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(a,N,j){var p=a("../internals/well-known-symbol"),c=p("match");N.exports=function(h){var y=/./;try{"/./"[h](y)}catch(g){try{return y[c]=!1,"/./"[h](y)}catch(w){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(a,N,j){var p=a("../internals/fails");N.exports=!p(function(){function c(){}return c.prototype.constructor=null,Object.getPrototypeOf(new c)!==c.prototype})},{"../internals/fails":150}],128:[function(a,N,j){"use strict";var p=a("../internals/iterators-core").IteratorPrototype,c=a("../internals/object-create"),h=a("../internals/create-property-descriptor"),y=a("../internals/set-to-string-tag"),g=a("../internals/iterators"),w=function(){return this};N.exports=function(f,v,m,b){var x=v+" Iterator";return f.prototype=c(p,{next:h(+!b,m)}),y(f,x,!1,!0),g[x]=w,f}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(a,N,j){var p=a("../internals/descriptors"),c=a("../internals/object-define-property"),h=a("../internals/create-property-descriptor");N.exports=p?function(y,g,w){return c.f(y,g,h(1,w))}:function(y,g,w){return y[g]=w,y}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(a,N,j){N.exports=function(p,c){return{enumerable:!(p&1),configurable:!(p&2),writable:!(p&4),value:c}}},{}],131:[function(a,N,j){"use strict";var p=a("../internals/to-property-key"),c=a("../internals/object-define-property"),h=a("../internals/create-property-descriptor");N.exports=function(y,g,w){var f=p(g);f in y?c.f(y,f,h(0,w)):y[f]=w}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/function-call"),h=a("../internals/is-pure"),y=a("../internals/function-name"),g=a("../internals/is-callable"),w=a("../internals/create-iterator-constructor"),f=a("../internals/object-get-prototype-of"),v=a("../internals/object-set-prototype-of"),m=a("../internals/set-to-string-tag"),b=a("../internals/create-non-enumerable-property"),x=a("../internals/redefine"),R=a("../internals/well-known-symbol"),I=a("../internals/iterators"),E=a("../internals/iterators-core"),C=y.PROPER,P=y.CONFIGURABLE,Z=E.IteratorPrototype,M=E.BUGGY_SAFARI_ITERATORS,J=R("iterator"),_="keys",k="values",B="entries",U=function(){return this};N.exports=function(K,G,F,W,X,re,oe){w(F,G,W);var pe=function(Ce){if(Ce===X&&me)return me;if(!M&&Ce in ee)return ee[Ce];switch(Ce){case _:return function(){return new F(this,Ce)};case k:return function(){return new F(this,Ce)};case B:return function(){return new F(this,Ce)}}return function(){return new F(this)}},ie=G+" Iterator",Ie=!1,ee=K.prototype,de=ee[J]||ee["@@iterator"]||X&&ee[X],me=!M&&de||pe(X),xe=G=="Array"&&ee.entries||de,ce,le,ge;if(xe&&(ce=f(xe.call(new K)),ce!==Object.prototype&&ce.next&&(!h&&f(ce)!==Z&&(v?v(ce,Z):g(ce[J])||x(ce,J,U)),m(ce,ie,!0,!0),h&&(I[ie]=U))),C&&X==k&&de&&de.name!==k&&(!h&&P?b(ee,"name",k):(Ie=!0,me=function(){return c(de,this)})),X)if(le={values:pe(k),keys:re?me:pe(_),entries:pe(B)},oe)for(ge in le)(M||Ie||!(ge in ee))&&x(ee,ge,le[ge]);else p({target:G,proto:!0,forced:M||Ie},le);return(!h||oe)&&ee[J]!==me&&x(ee,J,me,{name:X}),I[G]=me,le}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(a,N,j){var p=a("../internals/path"),c=a("../internals/has-own-property"),h=a("../internals/well-known-symbol-wrapped"),y=a("../internals/object-define-property").f;N.exports=function(g){var w=p.Symbol||(p.Symbol={});c(w,g)||y(w,g,{value:h.f(g)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(a,N,j){var p=a("../internals/fails");N.exports=!p(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/is-object"),h=p.document,y=c(h)&&c(h.createElement);N.exports=function(g){return y?h.createElement(g):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(a,N,j){N.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(a,N,j){var p=a("../internals/document-create-element"),c=p("span").classList,h=c&&c.constructor&&c.constructor.prototype;N.exports=h===Object.prototype?void 0:h},{"../internals/document-create-element":135}],138:[function(a,N,j){var p=a("../internals/engine-user-agent"),c=p.match(/firefox\/(\d+)/i);N.exports=!!c&&+c[1]},{"../internals/engine-user-agent":145}],139:[function(a,N,j){N.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(a,N,j){var p=a("../internals/engine-user-agent");N.exports=/MSIE|Trident/.test(p)},{"../internals/engine-user-agent":145}],141:[function(a,N,j){var p=a("../internals/engine-user-agent"),c=a("../internals/global");N.exports=/ipad|iphone|ipod/i.test(p)&&c.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(a,N,j){var p=a("../internals/engine-user-agent");N.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(p)},{"../internals/engine-user-agent":145}],143:[function(a,N,j){var p=a("../internals/classof-raw"),c=a("../internals/global");N.exports=p(c.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(a,N,j){var p=a("../internals/engine-user-agent");N.exports=/web0s(?!.*chrome)/i.test(p)},{"../internals/engine-user-agent":145}],145:[function(a,N,j){var p=a("../internals/get-built-in");N.exports=p("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/engine-user-agent"),h=p.process,y=p.Deno,g=h&&h.versions||y&&y.version,w=g&&g.v8,f,v;w&&(f=w.split("."),v=f[0]>0&&f[0]<4?1:+(f[0]+f[1])),!v&&c&&(f=c.match(/Edge\/(\d+)/),(!f||f[1]>=74)&&(f=c.match(/Chrome\/(\d+)/),f&&(v=+f[1]))),N.exports=v},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(a,N,j){var p=a("../internals/engine-user-agent"),c=p.match(/AppleWebKit\/(\d+)\./);N.exports=!!c&&+c[1]},{"../internals/engine-user-agent":145}],148:[function(a,N,j){N.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/object-get-own-property-descriptor").f,h=a("../internals/create-non-enumerable-property"),y=a("../internals/redefine"),g=a("../internals/set-global"),w=a("../internals/copy-constructor-properties"),f=a("../internals/is-forced");N.exports=function(v,m){var b=v.target,x=v.global,R=v.stat,I,E,C,P,Z,M;if(x?E=p:R?E=p[b]||g(b,{}):E=(p[b]||{}).prototype,E)for(C in m){if(Z=m[C],v.noTargetGet?(M=c(E,C),P=M&&M.value):P=E[C],I=f(x?C:b+(R?".":"#")+C,v.forced),!I&&P!==void 0){if(typeof Z==typeof P)continue;w(Z,P)}(v.sham||P&&P.sham)&&h(Z,"sham",!0),y(E,C,Z,v)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(a,N,j){N.exports=function(p){try{return!!p()}catch(c){return!0}}},{}],151:[function(a,N,j){"use strict";a("../modules/es.regexp.exec");var p=a("../internals/function-uncurry-this"),c=a("../internals/redefine"),h=a("../internals/regexp-exec"),y=a("../internals/fails"),g=a("../internals/well-known-symbol"),w=a("../internals/create-non-enumerable-property"),f=g("species"),v=RegExp.prototype;N.exports=function(m,b,x,R){var I=g(m),E=!y(function(){var M={};return M[I]=function(){return 7},""[m](M)!=7}),C=E&&!y(function(){var M=!1,J=/a/;return m==="split"&&(J={},J.constructor={},J.constructor[f]=function(){return J},J.flags="",J[I]=/./[I]),J.exec=function(){return M=!0,null},J[I](""),!M});if(!E||!C||x){var P=p(/./[I]),Z=b(I,""[m],function(M,J,_,k,B){var U=p(M),K=J.exec;return K===h||K===v.exec?E&&!B?{done:!0,value:P(J,_,k)}:{done:!0,value:U(_,J,k)}:{done:!1}});c(String.prototype,m,Z[0]),c(v,I,Z[1])}R&&w(v[I],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(a,N,j){var p=a("../internals/function-bind-native"),c=Function.prototype,h=c.apply,y=c.call;N.exports=typeof Reflect=="object"&&Reflect.apply||(p?y.bind(h):function(){return y.apply(h,arguments)})},{"../internals/function-bind-native":154}],153:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=a("../internals/a-callable"),h=a("../internals/function-bind-native"),y=p(p.bind);N.exports=function(g,w){return c(g),w===void 0?g:h?y(g,w):function(){return g.apply(w,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(a,N,j){var p=a("../internals/fails");N.exports=!p(function(){var c=function(){}.bind();return typeof c!="function"||c.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(a,N,j){var p=a("../internals/function-bind-native"),c=Function.prototype.call;N.exports=p?c.bind(c):function(){return c.apply(c,arguments)}},{"../internals/function-bind-native":154}],156:[function(a,N,j){var p=a("../internals/descriptors"),c=a("../internals/has-own-property"),h=Function.prototype,y=p&&Object.getOwnPropertyDescriptor,g=c(h,"name"),w=g&&function(){}.name==="something",f=g&&(!p||p&&y(h,"name").configurable);N.exports={EXISTS:g,PROPER:w,CONFIGURABLE:f}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(a,N,j){var p=a("../internals/function-bind-native"),c=Function.prototype,h=c.bind,y=c.call,g=p&&h.bind(y,y);N.exports=p?function(w){return w&&g(w)}:function(w){return w&&function(){return y.apply(w,arguments)}}},{"../internals/function-bind-native":154}],158:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/is-callable"),h=function(y){return c(y)?y:void 0};N.exports=function(y,g){return arguments.length<2?h(p[y]):p[y]&&p[y][g]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(a,N,j){var p=a("../internals/classof"),c=a("../internals/get-method"),h=a("../internals/iterators"),y=a("../internals/well-known-symbol"),g=y("iterator");N.exports=function(w){if(w!=null)return c(w,g)||c(w,"@@iterator")||h[p(w)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/function-call"),h=a("../internals/a-callable"),y=a("../internals/an-object"),g=a("../internals/try-to-string"),w=a("../internals/get-iterator-method"),f=p.TypeError;N.exports=function(v,m){var b=arguments.length<2?w(v):m;if(h(b))return y(c(b,v));throw f(g(v)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(a,N,j){var p=a("../internals/a-callable");N.exports=function(c,h){var y=c[h];return y==null?void 0:p(y)}},{"../internals/a-callable":95}],162:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=a("../internals/to-object"),h=Math.floor,y=p("".charAt),g=p("".replace),w=p("".slice),f=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,v=/\$([$&'`]|\d{1,2})/g;N.exports=function(m,b,x,R,I,E){var C=x+m.length,P=R.length,Z=v;return I!==void 0&&(I=c(I),Z=f),g(E,Z,function(M,J){var _;switch(y(J,0)){case"$":return"$";case"&":return m;case"`":return w(b,0,x);case"'":return w(b,C);case"<":_=I[w(J,1,-1)];break;default:var k=+J;if(k===0)return M;if(k>P){var B=h(k/10);return B===0?M:B<=P?R[B-1]===void 0?y(J,1):R[B-1]+y(J,1):M}_=R[k-1]}return _===void 0?"":_})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(a,N,j){(function(p){(function(){var c=function(h){return h&&h.Math==Math&&h};N.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof p=="object"&&p)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=a("../internals/to-object"),h=p({}.hasOwnProperty);N.exports=Object.hasOwn||function(g,w){return h(c(g),w)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(a,N,j){N.exports={}},{}],166:[function(a,N,j){var p=a("../internals/global");N.exports=function(c,h){var y=p.console;y&&y.error&&(arguments.length==1?y.error(c):y.error(c,h))}},{"../internals/global":163}],167:[function(a,N,j){var p=a("../internals/get-built-in");N.exports=p("document","documentElement")},{"../internals/get-built-in":158}],168:[function(a,N,j){var p=a("../internals/descriptors"),c=a("../internals/fails"),h=a("../internals/document-create-element");N.exports=!p&&!c(function(){return Object.defineProperty(h("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(a,N,j){var p=a("../internals/global"),c=p.Array,h=Math.abs,y=Math.pow,g=Math.floor,w=Math.log,f=Math.LN2,v=function(b,x,R){var I=c(R),E=R*8-x-1,C=(1<<E)-1,P=C>>1,Z=x===23?y(2,-24)-y(2,-77):0,M=b<0||b===0&&1/b<0?1:0,J=0,_,k,B;for(b=h(b),b!=b||b===1/0?(k=b!=b?1:0,_=C):(_=g(w(b)/f),B=y(2,-_),b*B<1&&(_--,B*=2),_+P>=1?b+=Z/B:b+=Z*y(2,1-P),b*B>=2&&(_++,B/=2),_+P>=C?(k=0,_=C):_+P>=1?(k=(b*B-1)*y(2,x),_=_+P):(k=b*y(2,P-1)*y(2,x),_=0));x>=8;)I[J++]=k&255,k/=256,x-=8;for(_=_<<x|k,E+=x;E>0;)I[J++]=_&255,_/=256,E-=8;return I[--J]|=M*128,I},m=function(b,x){var R=b.length,I=R*8-x-1,E=(1<<I)-1,C=E>>1,P=I-7,Z=R-1,M=b[Z--],J=M&127,_;for(M>>=7;P>0;)J=J*256+b[Z--],P-=8;for(_=J&(1<<-P)-1,J>>=-P,P+=x;P>0;)_=_*256+b[Z--],P-=8;if(J===0)J=1-C;else{if(J===E)return _?NaN:M?-1/0:1/0;_=_+y(2,x),J=J-C}return(M?-1:1)*_*y(2,J-x)};N.exports={pack:v,unpack:m}},{"../internals/global":163}],170:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/function-uncurry-this"),h=a("../internals/fails"),y=a("../internals/classof-raw"),g=p.Object,w=c("".split);N.exports=h(function(){return!g("z").propertyIsEnumerable(0)})?function(f){return y(f)=="String"?w(f,""):g(f)}:g},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(a,N,j){var p=a("../internals/is-callable"),c=a("../internals/is-object"),h=a("../internals/object-set-prototype-of");N.exports=function(y,g,w){var f,v;return h&&p(f=g.constructor)&&f!==w&&c(v=f.prototype)&&v!==w.prototype&&h(y,v),y}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=a("../internals/is-callable"),h=a("../internals/shared-store"),y=p(Function.toString);c(h.inspectSource)||(h.inspectSource=function(g){return y(g)}),N.exports=h.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(a,N,j){var p=a("../internals/native-weak-map"),c=a("../internals/global"),h=a("../internals/function-uncurry-this"),y=a("../internals/is-object"),g=a("../internals/create-non-enumerable-property"),w=a("../internals/has-own-property"),f=a("../internals/shared-store"),v=a("../internals/shared-key"),m=a("../internals/hidden-keys"),b="Object already initialized",x=c.TypeError,R=c.WeakMap,I,E,C,P=function(U){return C(U)?E(U):I(U,{})},Z=function(U){return function(K){var G;if(!y(K)||(G=E(K)).type!==U)throw x("Incompatible receiver, "+U+" required");return G}};if(p||f.state){var M=f.state||(f.state=new R),J=h(M.get),_=h(M.has),k=h(M.set);I=function(U,K){if(_(M,U))throw new x(b);return K.facade=U,k(M,U,K),K},E=function(U){return J(M,U)||{}},C=function(U){return _(M,U)}}else{var B=v("state");m[B]=!0,I=function(U,K){if(w(U,B))throw new x(b);return K.facade=U,g(U,B,K),K},E=function(U){return w(U,B)?U[B]:{}},C=function(U){return w(U,B)}}N.exports={set:I,get:E,has:C,enforce:P,getterFor:Z}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(a,N,j){var p=a("../internals/well-known-symbol"),c=a("../internals/iterators"),h=p("iterator"),y=Array.prototype;N.exports=function(g){return g!==void 0&&(c.Array===g||y[h]===g)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(a,N,j){var p=a("../internals/classof-raw");N.exports=Array.isArray||function(h){return p(h)=="Array"}},{"../internals/classof-raw":123}],176:[function(a,N,j){N.exports=function(p){return typeof p=="function"}},{}],177:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=a("../internals/fails"),h=a("../internals/is-callable"),y=a("../internals/classof"),g=a("../internals/get-built-in"),w=a("../internals/inspect-source"),f=function(){},v=[],m=g("Reflect","construct"),b=/^\s*(?:class|function)\b/,x=p(b.exec),R=!b.exec(f),I=function(P){if(!h(P))return!1;try{return m(f,v,P),!0}catch(Z){return!1}},E=function(P){if(!h(P))return!1;switch(y(P)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return R||!!x(b,w(P))}catch(Z){return!0}};E.sham=!0,N.exports=!m||c(function(){var C;return I(I.call)||!I(Object)||!I(function(){C=!0})||C})?E:I},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(a,N,j){var p=a("../internals/fails"),c=a("../internals/is-callable"),h=/#|\.prototype\./,y=function(m,b){var x=w[g(m)];return x==v?!0:x==f?!1:c(b)?p(b):!!b},g=y.normalize=function(m){return String(m).replace(h,".").toLowerCase()},w=y.data={},f=y.NATIVE="N",v=y.POLYFILL="P";N.exports=y},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(a,N,j){var p=a("../internals/is-object"),c=Math.floor;N.exports=Number.isInteger||function(y){return!p(y)&&isFinite(y)&&c(y)===y}},{"../internals/is-object":180}],180:[function(a,N,j){var p=a("../internals/is-callable");N.exports=function(c){return typeof c=="object"?c!==null:p(c)}},{"../internals/is-callable":176}],181:[function(a,N,j){N.exports=!1},{}],182:[function(a,N,j){var p=a("../internals/is-object"),c=a("../internals/classof-raw"),h=a("../internals/well-known-symbol"),y=h("match");N.exports=function(g){var w;return p(g)&&((w=g[y])!==void 0?!!w:c(g)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/get-built-in"),h=a("../internals/is-callable"),y=a("../internals/object-is-prototype-of"),g=a("../internals/use-symbol-as-uid"),w=p.Object;N.exports=g?function(f){return typeof f=="symbol"}:function(f){var v=c("Symbol");return h(v)&&y(v.prototype,w(f))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/function-bind-context"),h=a("../internals/function-call"),y=a("../internals/an-object"),g=a("../internals/try-to-string"),w=a("../internals/is-array-iterator-method"),f=a("../internals/length-of-array-like"),v=a("../internals/object-is-prototype-of"),m=a("../internals/get-iterator"),b=a("../internals/get-iterator-method"),x=a("../internals/iterator-close"),R=p.TypeError,I=function(C,P){this.stopped=C,this.result=P},E=I.prototype;N.exports=function(C,P,Z){var M=Z&&Z.that,J=!!(Z&&Z.AS_ENTRIES),_=!!(Z&&Z.IS_ITERATOR),k=!!(Z&&Z.INTERRUPTED),B=c(P,M),U,K,G,F,W,X,re,oe=function(ie){return U&&x(U,"normal",ie),new I(!0,ie)},pe=function(ie){return J?(y(ie),k?B(ie[0],ie[1],oe):B(ie[0],ie[1])):k?B(ie,oe):B(ie)};if(_)U=C;else{if(K=b(C),!K)throw R(g(C)+" is not iterable");if(w(K)){for(G=0,F=f(C);F>G;G++)if(W=pe(C[G]),W&&v(E,W))return W;return new I(!1)}U=m(C,K)}for(X=U.next;!(re=h(X,U)).done;){try{W=pe(re.value)}catch(ie){x(U,"throw",ie)}if(typeof W=="object"&&W&&v(E,W))return W}return new I(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(a,N,j){var p=a("../internals/function-call"),c=a("../internals/an-object"),h=a("../internals/get-method");N.exports=function(y,g,w){var f,v;c(y);try{if(f=h(y,"return"),!f){if(g==="throw")throw w;return w}f=p(f,y)}catch(m){v=!0,f=m}if(g==="throw")throw w;if(v)throw f;return c(f),w}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(a,N,j){"use strict";var p=a("../internals/fails"),c=a("../internals/is-callable"),h=a("../internals/object-create"),y=a("../internals/object-get-prototype-of"),g=a("../internals/redefine"),w=a("../internals/well-known-symbol"),f=a("../internals/is-pure"),v=w("iterator"),m=!1,b,x,R;[].keys&&(R=[].keys(),"next"in R?(x=y(y(R)),x!==Object.prototype&&(b=x)):m=!0);var I=b==null||p(function(){var E={};return b[v].call(E)!==E});I?b={}:f&&(b=h(b)),c(b[v])||g(b,v,function(){return this}),N.exports={IteratorPrototype:b,BUGGY_SAFARI_ITERATORS:m}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(a,N,j){arguments[4][165][0].apply(j,arguments)},{dup:165}],188:[function(a,N,j){var p=a("../internals/to-length");N.exports=function(c){return p(c.length)}},{"../internals/to-length":249}],189:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/function-bind-context"),h=a("../internals/object-get-own-property-descriptor").f,y=a("../internals/task").set,g=a("../internals/engine-is-ios"),w=a("../internals/engine-is-ios-pebble"),f=a("../internals/engine-is-webos-webkit"),v=a("../internals/engine-is-node"),m=p.MutationObserver||p.WebKitMutationObserver,b=p.document,x=p.process,R=p.Promise,I=h(p,"queueMicrotask"),E=I&&I.value,C,P,Z,M,J,_,k,B;E||(C=function(){var U,K;for(v&&(U=x.domain)&&U.exit();P;){K=P.fn,P=P.next;try{K()}catch(G){throw P?M():Z=void 0,G}}Z=void 0,U&&U.enter()},!g&&!v&&!f&&m&&b?(J=!0,_=b.createTextNode(""),new m(C).observe(_,{characterData:!0}),M=function(){_.data=J=!J}):!w&&R&&R.resolve?(k=R.resolve(void 0),k.constructor=R,B=c(k.then,k),M=function(){B(C)}):v?M=function(){x.nextTick(C)}:(y=c(y,p),M=function(){y(C)})),N.exports=E||function(U){var K={fn:U,next:void 0};Z&&(Z.next=K),P||(P=K,M()),Z=K}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(a,N,j){var p=a("../internals/native-symbol");N.exports=p&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(a,N,j){var p=a("../internals/engine-v8-version"),c=a("../internals/fails");N.exports=!!Object.getOwnPropertySymbols&&!c(function(){var h=Symbol();return!String(h)||!(Object(h)instanceof Symbol)||!Symbol.sham&&p&&p<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/is-callable"),h=a("../internals/inspect-source"),y=p.WeakMap;N.exports=c(y)&&/native code/.test(h(y))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(a,N,j){"use strict";var p=a("../internals/a-callable"),c=function(h){var y,g;this.promise=new h(function(w,f){if(y!==void 0||g!==void 0)throw TypeError("Bad Promise constructor");y=w,g=f}),this.resolve=p(y),this.reject=p(g)};N.exports.f=function(h){return new c(h)}},{"../internals/a-callable":95}],194:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/is-regexp"),h=p.TypeError;N.exports=function(y){if(c(y))throw h("The method doesn't accept regular expressions");return y}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(a,N,j){"use strict";var p=a("../internals/descriptors"),c=a("../internals/function-uncurry-this"),h=a("../internals/function-call"),y=a("../internals/fails"),g=a("../internals/object-keys"),w=a("../internals/object-get-own-property-symbols"),f=a("../internals/object-property-is-enumerable"),v=a("../internals/to-object"),m=a("../internals/indexed-object"),b=Object.assign,x=Object.defineProperty,R=c([].concat);N.exports=!b||y(function(){if(p&&b({b:1},b(x({},"a",{enumerable:!0,get:function(){x(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var I={},E={},C=Symbol(),P="abcdefghijklmnopqrst";return I[C]=7,P.split("").forEach(function(Z){E[Z]=Z}),b({},I)[C]!=7||g(b({},E)).join("")!=P})?function(E,C){for(var P=v(E),Z=arguments.length,M=1,J=w.f,_=f.f;Z>M;)for(var k=m(arguments[M++]),B=J?R(g(k),J(k)):g(k),U=B.length,K=0,G;U>K;)G=B[K++],(!p||h(_,k,G))&&(P[G]=k[G]);return P}:b},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(a,N,j){var p=a("../internals/an-object"),c=a("../internals/object-define-properties"),h=a("../internals/enum-bug-keys"),y=a("../internals/hidden-keys"),g=a("../internals/html"),w=a("../internals/document-create-element"),f=a("../internals/shared-key"),v=">",m="<",b="prototype",x="script",R=f("IE_PROTO"),I=function(){},E=function(J){return m+x+v+J+m+"/"+x+v},C=function(J){J.write(E("")),J.close();var _=J.parentWindow.Object;return J=null,_},P=function(){var J=w("iframe"),_="java"+x+":",k;return J.style.display="none",g.appendChild(J),J.src=String(_),k=J.contentWindow.document,k.open(),k.write(E("document.F=Object")),k.close(),k.F},Z,M=function(){try{Z=new ActiveXObject("htmlfile")}catch(_){}M=typeof document!="undefined"?document.domain&&Z?C(Z):P():C(Z);for(var J=h.length;J--;)delete M[b][h[J]];return M()};y[R]=!0,N.exports=Object.create||function(_,k){var B;return _!==null?(I[b]=p(_),B=new I,I[b]=null,B[R]=_):B=M(),k===void 0?B:c.f(B,k)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(a,N,j){var p=a("../internals/descriptors"),c=a("../internals/v8-prototype-define-bug"),h=a("../internals/object-define-property"),y=a("../internals/an-object"),g=a("../internals/to-indexed-object"),w=a("../internals/object-keys");j.f=p&&!c?Object.defineProperties:function(v,m){y(v);for(var b=g(m),x=w(m),R=x.length,I=0,E;R>I;)h.f(v,E=x[I++],b[E]);return v}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/descriptors"),h=a("../internals/ie8-dom-define"),y=a("../internals/v8-prototype-define-bug"),g=a("../internals/an-object"),w=a("../internals/to-property-key"),f=p.TypeError,v=Object.defineProperty,m=Object.getOwnPropertyDescriptor,b="enumerable",x="configurable",R="writable";j.f=c?y?function(E,C,P){if(g(E),C=w(C),g(P),typeof E=="function"&&C==="prototype"&&"value"in P&&R in P&&!P[R]){var Z=m(E,C);Z&&Z[R]&&(E[C]=P.value,P={configurable:x in P?P[x]:Z[x],enumerable:b in P?P[b]:Z[b],writable:!1})}return v(E,C,P)}:v:function(E,C,P){if(g(E),C=w(C),g(P),h)try{return v(E,C,P)}catch(Z){}if("get"in P||"set"in P)throw f("Accessors not supported");return"value"in P&&(E[C]=P.value),E}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(a,N,j){var p=a("../internals/descriptors"),c=a("../internals/function-call"),h=a("../internals/object-property-is-enumerable"),y=a("../internals/create-property-descriptor"),g=a("../internals/to-indexed-object"),w=a("../internals/to-property-key"),f=a("../internals/has-own-property"),v=a("../internals/ie8-dom-define"),m=Object.getOwnPropertyDescriptor;j.f=p?m:function(x,R){if(x=g(x),R=w(R),v)try{return m(x,R)}catch(I){}if(f(x,R))return y(!c(h.f,x,R),x[R])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(a,N,j){var p=a("../internals/classof-raw"),c=a("../internals/to-indexed-object"),h=a("../internals/object-get-own-property-names").f,y=a("../internals/array-slice-simple"),g=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],w=function(f){try{return h(f)}catch(v){return y(g)}};N.exports.f=function(v){return g&&p(v)=="Window"?w(v):h(c(v))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(a,N,j){var p=a("../internals/object-keys-internal"),c=a("../internals/enum-bug-keys"),h=c.concat("length","prototype");j.f=Object.getOwnPropertyNames||function(g){return p(g,h)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(a,N,j){j.f=Object.getOwnPropertySymbols},{}],203:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/has-own-property"),h=a("../internals/is-callable"),y=a("../internals/to-object"),g=a("../internals/shared-key"),w=a("../internals/correct-prototype-getter"),f=g("IE_PROTO"),v=p.Object,m=v.prototype;N.exports=w?v.getPrototypeOf:function(b){var x=y(b);if(c(x,f))return x[f];var R=x.constructor;return h(R)&&x instanceof R?R.prototype:x instanceof v?m:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(a,N,j){var p=a("../internals/function-uncurry-this");N.exports=p({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=a("../internals/has-own-property"),h=a("../internals/to-indexed-object"),y=a("../internals/array-includes").indexOf,g=a("../internals/hidden-keys"),w=p([].push);N.exports=function(f,v){var m=h(f),b=0,x=[],R;for(R in m)!c(g,R)&&c(m,R)&&w(x,R);for(;v.length>b;)c(m,R=v[b++])&&(~y(x,R)||w(x,R));return x}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(a,N,j){var p=a("../internals/object-keys-internal"),c=a("../internals/enum-bug-keys");N.exports=Object.keys||function(y){return p(y,c)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(a,N,j){"use strict";var p={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,h=c&&!p.call({1:2},1);j.f=h?function(g){var w=c(this,g);return!!w&&w.enumerable}:p},{}],208:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=a("../internals/an-object"),h=a("../internals/a-possible-prototype");N.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var y=!1,g={},w;try{w=p(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),w(g,[]),y=g instanceof Array}catch(f){}return function(v,m){return c(v),h(m),y?w(v,m):v.__proto__=m,v}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(a,N,j){var p=a("../internals/descriptors"),c=a("../internals/function-uncurry-this"),h=a("../internals/object-keys"),y=a("../internals/to-indexed-object"),g=a("../internals/object-property-is-enumerable").f,w=c(g),f=c([].push),v=function(m){return function(b){for(var x=y(b),R=h(x),I=R.length,E=0,C=[],P;I>E;)P=R[E++],(!p||w(x,P))&&f(C,m?[P,x[P]]:x[P]);return C}};N.exports={entries:v(!0),values:v(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(a,N,j){"use strict";var p=a("../internals/to-string-tag-support"),c=a("../internals/classof");N.exports=p?{}.toString:function(){return"[object "+c(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/function-call"),h=a("../internals/is-callable"),y=a("../internals/is-object"),g=p.TypeError;N.exports=function(w,f){var v,m;if(f==="string"&&h(v=w.toString)&&!y(m=c(v,w))||h(v=w.valueOf)&&!y(m=c(v,w))||f!=="string"&&h(v=w.toString)&&!y(m=c(v,w)))return m;throw g("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(a,N,j){var p=a("../internals/get-built-in"),c=a("../internals/function-uncurry-this"),h=a("../internals/object-get-own-property-names"),y=a("../internals/object-get-own-property-symbols"),g=a("../internals/an-object"),w=c([].concat);N.exports=p("Reflect","ownKeys")||function(v){var m=h.f(g(v)),b=y.f;return b?w(m,b(v)):m}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(a,N,j){var p=a("../internals/global");N.exports=p},{"../internals/global":163}],214:[function(a,N,j){N.exports=function(p){try{return{error:!1,value:p()}}catch(c){return{error:!0,value:c}}}},{}],215:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/promise-native-constructor"),h=a("../internals/is-callable"),y=a("../internals/is-forced"),g=a("../internals/inspect-source"),w=a("../internals/well-known-symbol"),f=a("../internals/engine-is-browser"),v=a("../internals/is-pure"),m=a("../internals/engine-v8-version"),b=c&&c.prototype,x=w("species"),R=!1,I=h(p.PromiseRejectionEvent),E=y("Promise",function(){var C=g(c),P=C!==String(c);if(!P&&m===66||v&&!(b.catch&&b.finally))return!0;if(m>=51&&/native code/.test(C))return!1;var Z=new c(function(_){_(1)}),M=function(_){_(function(){},function(){})},J=Z.constructor={};return J[x]=M,R=Z.then(function(){})instanceof M,R?!P&&f&&!I:!0});N.exports={CONSTRUCTOR:E,REJECTION_EVENT:I,SUBCLASSING:R}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(a,N,j){var p=a("../internals/global");N.exports=p.Promise},{"../internals/global":163}],217:[function(a,N,j){var p=a("../internals/an-object"),c=a("../internals/is-object"),h=a("../internals/new-promise-capability");N.exports=function(y,g){if(p(y),c(g)&&g.constructor===y)return g;var w=h.f(y),f=w.resolve;return f(g),w.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(a,N,j){var p=a("../internals/promise-native-constructor"),c=a("../internals/check-correctness-of-iteration"),h=a("../internals/promise-constructor-detection").CONSTRUCTOR;N.exports=h||!c(function(y){p.all(y).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(a,N,j){var p=a("../internals/object-define-property").f;N.exports=function(c,h,y){y in c||p(c,y,{configurable:!0,get:function(){return h[y]},set:function(g){h[y]=g}})}},{"../internals/object-define-property":198}],220:[function(a,N,j){var p=function(){this.head=null,this.tail=null};p.prototype={add:function(c){var h={item:c,next:null};this.head?this.tail.next=h:this.head=h,this.tail=h},get:function(){var c=this.head;if(c)return this.head=c.next,this.tail===c&&(this.tail=null),c.item}},N.exports=p},{}],221:[function(a,N,j){var p=a("../internals/redefine");N.exports=function(c,h,y){for(var g in h)p(c,g,h[g],y);return c}},{"../internals/redefine":222}],222:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/is-callable"),h=a("../internals/has-own-property"),y=a("../internals/create-non-enumerable-property"),g=a("../internals/set-global"),w=a("../internals/inspect-source"),f=a("../internals/internal-state"),v=a("../internals/function-name").CONFIGURABLE,m=f.get,b=f.enforce,x=String(String).split("String");(N.exports=function(R,I,E,C){var P=C?!!C.unsafe:!1,Z=C?!!C.enumerable:!1,M=C?!!C.noTargetGet:!1,J=C&&C.name!==void 0?C.name:I,_;if(c(E)&&(String(J).slice(0,7)==="Symbol("&&(J="["+String(J).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!h(E,"name")||v&&E.name!==J)&&y(E,"name",J),_=b(E),_.source||(_.source=x.join(typeof J=="string"?J:""))),R===p){Z?R[I]=E:g(I,E);return}else P?!M&&R[I]&&(Z=!0):delete R[I];Z?R[I]=E:y(R,I,E)})(Function.prototype,"toString",function(){return c(this)&&m(this).source||w(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/function-call"),h=a("../internals/an-object"),y=a("../internals/is-callable"),g=a("../internals/classof-raw"),w=a("../internals/regexp-exec"),f=p.TypeError;N.exports=function(v,m){var b=v.exec;if(y(b)){var x=c(b,v,m);return x!==null&&h(x),x}if(g(v)==="RegExp")return c(w,v,m);throw f("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(a,N,j){"use strict";var p=a("../internals/function-call"),c=a("../internals/function-uncurry-this"),h=a("../internals/to-string"),y=a("../internals/regexp-flags"),g=a("../internals/regexp-sticky-helpers"),w=a("../internals/shared"),f=a("../internals/object-create"),v=a("../internals/internal-state").get,m=a("../internals/regexp-unsupported-dot-all"),b=a("../internals/regexp-unsupported-ncg"),x=w("native-string-replace",String.prototype.replace),R=RegExp.prototype.exec,I=R,E=c("".charAt),C=c("".indexOf),P=c("".replace),Z=c("".slice),M=function(){var B=/a/,U=/b*/g;return p(R,B,"a"),p(R,U,"a"),B.lastIndex!==0||U.lastIndex!==0}(),J=g.BROKEN_CARET,_=/()??/.exec("")[1]!==void 0,k=M||_||J||m||b;k&&(I=function(U){var K=this,G=v(K),F=h(U),W=G.raw,X,re,oe,pe,ie,Ie,ee;if(W)return W.lastIndex=K.lastIndex,X=p(I,W,F),K.lastIndex=W.lastIndex,X;var de=G.groups,me=J&&K.sticky,xe=p(y,K),ce=K.source,le=0,ge=F;if(me&&(xe=P(xe,"y",""),C(xe,"g")===-1&&(xe+="g"),ge=Z(F,K.lastIndex),K.lastIndex>0&&(!K.multiline||K.multiline&&E(F,K.lastIndex-1)!==`
`)&&(ce="(?: "+ce+")",ge=" "+ge,le++),re=new RegExp("^(?:"+ce+")",xe)),_&&(re=new RegExp("^"+ce+"$(?!\\s)",xe)),M&&(oe=K.lastIndex),pe=p(R,me?re:K,ge),me?pe?(pe.input=Z(pe.input,le),pe[0]=Z(pe[0],le),pe.index=K.lastIndex,K.lastIndex+=pe[0].length):K.lastIndex=0:M&&pe&&(K.lastIndex=K.global?pe.index+pe[0].length:oe),_&&pe&&pe.length>1&&p(x,pe[0],re,function(){for(ie=1;ie<arguments.length-2;ie++)arguments[ie]===void 0&&(pe[ie]=void 0)}),pe&&de)for(pe.groups=Ie=f(null),ie=0;ie<de.length;ie++)ee=de[ie],Ie[ee[0]]=pe[ee[1]];return pe}),N.exports=I},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(a,N,j){"use strict";var p=a("../internals/an-object");N.exports=function(){var c=p(this),h="";return c.hasIndices&&(h+="d"),c.global&&(h+="g"),c.ignoreCase&&(h+="i"),c.multiline&&(h+="m"),c.dotAll&&(h+="s"),c.unicode&&(h+="u"),c.sticky&&(h+="y"),h}},{"../internals/an-object":101}],226:[function(a,N,j){var p=a("../internals/function-call"),c=a("../internals/has-own-property"),h=a("../internals/object-is-prototype-of"),y=a("../internals/regexp-flags"),g=RegExp.prototype;N.exports=function(w){var f=w.flags;return f===void 0&&!("flags"in g)&&!c(w,"flags")&&h(g,w)?p(y,w):f}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(a,N,j){var p=a("../internals/fails"),c=a("../internals/global"),h=c.RegExp,y=p(function(){var f=h("a","y");return f.lastIndex=2,f.exec("abcd")!=null}),g=y||p(function(){return!h("a","y").sticky}),w=y||p(function(){var f=h("^r","gy");return f.lastIndex=2,f.exec("str")!=null});N.exports={BROKEN_CARET:w,MISSED_STICKY:g,UNSUPPORTED_Y:y}},{"../internals/fails":150,"../internals/global":163}],228:[function(a,N,j){var p=a("../internals/fails"),c=a("../internals/global"),h=c.RegExp;N.exports=p(function(){var y=h(".","s");return!(y.dotAll&&y.exec(`
`)&&y.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(a,N,j){var p=a("../internals/fails"),c=a("../internals/global"),h=c.RegExp;N.exports=p(function(){var y=h("(?<a>b)","g");return y.exec("b").groups.a!=="b"||"b".replace(y,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(a,N,j){var p=a("../internals/global"),c=p.TypeError;N.exports=function(h){if(h==null)throw c("Can't call method on "+h);return h}},{"../internals/global":163}],231:[function(a,N,j){N.exports=Object.is||function(c,h){return c===h?c!==0||1/c===1/h:c!=c&&h!=h}},{}],232:[function(a,N,j){var p=a("../internals/global"),c=Object.defineProperty;N.exports=function(h,y){try{c(p,h,{value:y,configurable:!0,writable:!0})}catch(g){p[h]=y}return y}},{"../internals/global":163}],233:[function(a,N,j){"use strict";var p=a("../internals/get-built-in"),c=a("../internals/object-define-property"),h=a("../internals/well-known-symbol"),y=a("../internals/descriptors"),g=h("species");N.exports=function(w){var f=p(w),v=c.f;y&&f&&!f[g]&&v(f,g,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(a,N,j){var p=a("../internals/object-define-property").f,c=a("../internals/has-own-property"),h=a("../internals/well-known-symbol"),y=h("toStringTag");N.exports=function(g,w,f){g&&!f&&(g=g.prototype),g&&!c(g,y)&&p(g,y,{configurable:!0,value:w})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(a,N,j){var p=a("../internals/shared"),c=a("../internals/uid"),h=p("keys");N.exports=function(y){return h[y]||(h[y]=c(y))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/set-global"),h="__core-js_shared__",y=p[h]||c(h,{});N.exports=y},{"../internals/global":163,"../internals/set-global":232}],237:[function(a,N,j){var p=a("../internals/is-pure"),c=a("../internals/shared-store");(N.exports=function(h,y){return c[h]||(c[h]=y!==void 0?y:{})})("versions",[]).push({version:"3.22.1",mode:p?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(a,N,j){var p=a("../internals/an-object"),c=a("../internals/a-constructor"),h=a("../internals/well-known-symbol"),y=h("species");N.exports=function(g,w){var f=p(g).constructor,v;return f===void 0||(v=p(f)[y])==null?w:c(v)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=a("../internals/to-integer-or-infinity"),h=a("../internals/to-string"),y=a("../internals/require-object-coercible"),g=p("".charAt),w=p("".charCodeAt),f=p("".slice),v=function(m){return function(b,x){var R=h(y(b)),I=c(x),E=R.length,C,P;return I<0||I>=E?m?"":void 0:(C=w(R,I),C<55296||C>56319||I+1===E||(P=w(R,I+1))<56320||P>57343?m?g(R,I):C:m?f(R,I,I+2):(C-55296<<10)+(P-56320)+65536)}};N.exports={codeAt:v(!1),charAt:v(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(a,N,j){var p=a("../internals/function-name").PROPER,c=a("../internals/fails"),h=a("../internals/whitespaces"),y="\u200B\x85\u180E";N.exports=function(g){return c(function(){return!!h[g]()||y[g]()!==y||p&&h[g].name!==g})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=a("../internals/require-object-coercible"),h=a("../internals/to-string"),y=a("../internals/whitespaces"),g=p("".replace),w="["+y+"]",f=RegExp("^"+w+w+"*"),v=RegExp(w+w+"*$"),m=function(b){return function(x){var R=h(c(x));return b&1&&(R=g(R,f,"")),b&2&&(R=g(R,v,"")),R}};N.exports={start:m(1),end:m(2),trim:m(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(a,N,j){var p=a("../internals/function-call"),c=a("../internals/get-built-in"),h=a("../internals/well-known-symbol"),y=a("../internals/redefine");N.exports=function(){var g=c("Symbol"),w=g&&g.prototype,f=w&&w.valueOf,v=h("toPrimitive");w&&!w[v]&&y(w,v,function(m){return p(f,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/function-apply"),h=a("../internals/function-bind-context"),y=a("../internals/is-callable"),g=a("../internals/has-own-property"),w=a("../internals/fails"),f=a("../internals/html"),v=a("../internals/array-slice"),m=a("../internals/document-create-element"),b=a("../internals/validate-arguments-length"),x=a("../internals/engine-is-ios"),R=a("../internals/engine-is-node"),I=p.setImmediate,E=p.clearImmediate,C=p.process,P=p.Dispatch,Z=p.Function,M=p.MessageChannel,J=p.String,_=0,k={},B="onreadystatechange",U,K,G,F;try{U=p.location}catch(pe){}var W=function(pe){if(g(k,pe)){var ie=k[pe];delete k[pe],ie()}},X=function(pe){return function(){W(pe)}},re=function(pe){W(pe.data)},oe=function(pe){p.postMessage(J(pe),U.protocol+"//"+U.host)};(!I||!E)&&(I=function(ie){b(arguments.length,1);var Ie=y(ie)?ie:Z(ie),ee=v(arguments,1);return k[++_]=function(){c(Ie,void 0,ee)},K(_),_},E=function(ie){delete k[ie]},R?K=function(pe){C.nextTick(X(pe))}:P&&P.now?K=function(pe){P.now(X(pe))}:M&&!x?(G=new M,F=G.port2,G.port1.onmessage=re,K=h(F.postMessage,F)):p.addEventListener&&y(p.postMessage)&&!p.importScripts&&U&&U.protocol!=="file:"&&!w(oe)?(K=oe,p.addEventListener("message",re,!1)):B in m("script")?K=function(pe){f.appendChild(m("script"))[B]=function(){f.removeChild(this),W(pe)}}:K=function(pe){setTimeout(X(pe),0)}),N.exports={set:I,clear:E}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(a,N,j){var p=a("../internals/function-uncurry-this");N.exports=p(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(a,N,j){var p=a("../internals/to-integer-or-infinity"),c=Math.max,h=Math.min;N.exports=function(y,g){var w=p(y);return w<0?c(w+g,0):h(w,g)}},{"../internals/to-integer-or-infinity":248}],246:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/to-integer-or-infinity"),h=a("../internals/to-length"),y=p.RangeError;N.exports=function(g){if(g===void 0)return 0;var w=c(g),f=h(w);if(w!==f)throw y("Wrong length or index");return f}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(a,N,j){var p=a("../internals/indexed-object"),c=a("../internals/require-object-coercible");N.exports=function(h){return p(c(h))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(a,N,j){var p=Math.ceil,c=Math.floor;N.exports=function(h){var y=+h;return y!==y||y===0?0:(y>0?c:p)(y)}},{}],249:[function(a,N,j){var p=a("../internals/to-integer-or-infinity"),c=Math.min;N.exports=function(h){return h>0?c(p(h),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/require-object-coercible"),h=p.Object;N.exports=function(y){return h(c(y))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/to-positive-integer"),h=p.RangeError;N.exports=function(y,g){var w=c(y);if(w%g)throw h("Wrong offset");return w}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/to-integer-or-infinity"),h=p.RangeError;N.exports=function(y){var g=c(y);if(g<0)throw h("The argument can't be less than 0");return g}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/function-call"),h=a("../internals/is-object"),y=a("../internals/is-symbol"),g=a("../internals/get-method"),w=a("../internals/ordinary-to-primitive"),f=a("../internals/well-known-symbol"),v=p.TypeError,m=f("toPrimitive");N.exports=function(b,x){if(!h(b)||y(b))return b;var R=g(b,m),I;if(R){if(x===void 0&&(x="default"),I=c(R,b,x),!h(I)||y(I))return I;throw v("Can't convert object to primitive value")}return x===void 0&&(x="number"),w(b,x)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(a,N,j){var p=a("../internals/to-primitive"),c=a("../internals/is-symbol");N.exports=function(h){var y=p(h,"string");return c(y)?y:y+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(a,N,j){var p=a("../internals/well-known-symbol"),c=p("toStringTag"),h={};h[c]="z",N.exports=String(h)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/classof"),h=p.String;N.exports=function(y){if(c(y)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return h(y)}},{"../internals/classof":124,"../internals/global":163}],257:[function(a,N,j){var p=a("../internals/global"),c=p.String;N.exports=function(h){try{return c(h)}catch(y){return"Object"}}},{"../internals/global":163}],258:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/global"),h=a("../internals/function-call"),y=a("../internals/descriptors"),g=a("../internals/typed-array-constructors-require-wrappers"),w=a("../internals/array-buffer-view-core"),f=a("../internals/array-buffer"),v=a("../internals/an-instance"),m=a("../internals/create-property-descriptor"),b=a("../internals/create-non-enumerable-property"),x=a("../internals/is-integral-number"),R=a("../internals/to-length"),I=a("../internals/to-index"),E=a("../internals/to-offset"),C=a("../internals/to-property-key"),P=a("../internals/has-own-property"),Z=a("../internals/classof"),M=a("../internals/is-object"),J=a("../internals/is-symbol"),_=a("../internals/object-create"),k=a("../internals/object-is-prototype-of"),B=a("../internals/object-set-prototype-of"),U=a("../internals/object-get-own-property-names").f,K=a("../internals/typed-array-from"),G=a("../internals/array-iteration").forEach,F=a("../internals/set-species"),W=a("../internals/object-define-property"),X=a("../internals/object-get-own-property-descriptor"),re=a("../internals/internal-state"),oe=a("../internals/inherit-if-required"),pe=re.get,ie=re.set,Ie=W.f,ee=X.f,de=Math.round,me=c.RangeError,xe=f.ArrayBuffer,ce=xe.prototype,le=f.DataView,ge=w.NATIVE_ARRAY_BUFFER_VIEWS,Ce=w.TYPED_ARRAY_CONSTRUCTOR,De=w.TYPED_ARRAY_TAG,je=w.TypedArray,fe=w.TypedArrayPrototype,Y=w.aTypedArrayConstructor,be=w.isTypedArray,q="BYTES_PER_ELEMENT",V="Wrong length",Q=function(ne,he){Y(ne);for(var Pe=0,Oe=he.length,Ue=new ne(Oe);Oe>Pe;)Ue[Pe]=he[Pe++];return Ue},L=function(ne,he){Ie(ne,he,{get:function(){return pe(this)[he]}})},$=function(ne){var he;return k(ce,ne)||(he=Z(ne))=="ArrayBuffer"||he=="SharedArrayBuffer"},S=function(ne,he){return be(ne)&&!J(he)&&he in ne&&x(+he)&&he>=0},T=function(he,Pe){return Pe=C(Pe),S(he,Pe)?m(2,he[Pe]):ee(he,Pe)},z=function(he,Pe,Oe){return Pe=C(Pe),S(he,Pe)&&M(Oe)&&P(Oe,"value")&&!P(Oe,"get")&&!P(Oe,"set")&&!Oe.configurable&&(!P(Oe,"writable")||Oe.writable)&&(!P(Oe,"enumerable")||Oe.enumerable)?(he[Pe]=Oe.value,he):Ie(he,Pe,Oe)};y?(ge||(X.f=T,W.f=z,L(fe,"buffer"),L(fe,"byteOffset"),L(fe,"byteLength"),L(fe,"length")),p({target:"Object",stat:!0,forced:!ge},{getOwnPropertyDescriptor:T,defineProperty:z}),N.exports=function(ne,he,Pe){var Oe=ne.match(/\d+$/)[0]/8,Ue=ne+(Pe?"Clamped":"")+"Array",nt="get"+ne,Qe="set"+ne,rt=c[Ue],We=rt,Je=We&&We.prototype,Re={},Be=function(et,st){var Et=pe(et);return Et.view[nt](st*Oe+Et.byteOffset,!0)},_e=function(et,st,Et){var Ct=pe(et);Pe&&(Et=(Et=de(Et))<0?0:Et>255?255:Et&255),Ct.view[Qe](st*Oe+Ct.byteOffset,Et,!0)},Ve=function(et,st){Ie(et,st,{get:function(){return Be(this,st)},set:function(Et){return _e(this,st,Et)},enumerable:!0})};ge?g&&(We=he(function(et,st,Et,Ct){return v(et,Je),oe(function(){return M(st)?$(st)?Ct!==void 0?new rt(st,E(Et,Oe),Ct):Et!==void 0?new rt(st,E(Et,Oe)):new rt(st):be(st)?Q(We,st):h(K,We,st):new rt(I(st))}(),et,We)}),B&&B(We,je),G(U(rt),function(et){et in We||b(We,et,rt[et])}),We.prototype=Je):(We=he(function(et,st,Et,Ct){v(et,Je);var kt=0,Pt=0,_t,Ot,Ht;if(!M(st))Ht=I(st),Ot=Ht*Oe,_t=new xe(Ot);else if($(st)){_t=st,Pt=E(Et,Oe);var Ft=st.byteLength;if(Ct===void 0){if(Ft%Oe||(Ot=Ft-Pt,Ot<0))throw me(V)}else if(Ot=R(Ct)*Oe,Ot+Pt>Ft)throw me(V);Ht=Ot/Oe}else return be(st)?Q(We,st):h(K,We,st);for(ie(et,{buffer:_t,byteOffset:Pt,byteLength:Ot,length:Ht,view:new le(_t)});kt<Ht;)Ve(et,kt++)}),B&&B(We,je),Je=We.prototype=_(fe)),Je.constructor!==We&&b(Je,"constructor",We),b(Je,Ce,We),De&&b(Je,De,Ue),Re[Ue]=We,p({global:!0,forced:We!=rt,sham:!ge},Re),q in We||b(We,q,Oe),q in Je||b(Je,q,Oe),F(Ue)}):N.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/fails"),h=a("../internals/check-correctness-of-iteration"),y=a("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,g=p.ArrayBuffer,w=p.Int8Array;N.exports=!y||!c(function(){w(1)})||!c(function(){new w(-1)})||!h(function(f){new w,new w(null),new w(1.5),new w(f)},!0)||c(function(){return new w(new g(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(a,N,j){var p=a("../internals/array-from-constructor-and-list"),c=a("../internals/typed-array-species-constructor");N.exports=function(h,y){return p(c(h),y)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(a,N,j){var p=a("../internals/function-bind-context"),c=a("../internals/function-call"),h=a("../internals/a-constructor"),y=a("../internals/to-object"),g=a("../internals/length-of-array-like"),w=a("../internals/get-iterator"),f=a("../internals/get-iterator-method"),v=a("../internals/is-array-iterator-method"),m=a("../internals/array-buffer-view-core").aTypedArrayConstructor;N.exports=function(x){var R=h(this),I=y(x),E=arguments.length,C=E>1?arguments[1]:void 0,P=C!==void 0,Z=f(I),M,J,_,k,B,U;if(Z&&!v(Z))for(B=w(I,Z),U=B.next,I=[];!(k=c(U,B)).done;)I.push(k.value);for(P&&E>2&&(C=p(C,arguments[2])),J=g(I),_=new(m(R))(J),M=0;J>M;M++)_[M]=P?C(I[M],M):I[M];return _}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(a,N,j){var p=a("../internals/array-buffer-view-core"),c=a("../internals/species-constructor"),h=p.TYPED_ARRAY_CONSTRUCTOR,y=p.aTypedArrayConstructor;N.exports=function(g){return y(c(g,g[h]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(a,N,j){var p=a("../internals/function-uncurry-this"),c=0,h=Math.random(),y=p(1 .toString);N.exports=function(g){return"Symbol("+(g===void 0?"":g)+")_"+y(++c+h,36)}},{"../internals/function-uncurry-this":157}],264:[function(a,N,j){var p=a("../internals/native-symbol");N.exports=p&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(a,N,j){var p=a("../internals/descriptors"),c=a("../internals/fails");N.exports=p&&c(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(a,N,j){var p=a("../internals/global"),c=p.TypeError;N.exports=function(h,y){if(h<y)throw c("Not enough arguments");return h}},{"../internals/global":163}],267:[function(a,N,j){var p=a("../internals/well-known-symbol");j.f=p},{"../internals/well-known-symbol":268}],268:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/shared"),h=a("../internals/has-own-property"),y=a("../internals/uid"),g=a("../internals/native-symbol"),w=a("../internals/use-symbol-as-uid"),f=c("wks"),v=p.Symbol,m=v&&v.for,b=w?v:v&&v.withoutSetter||y;N.exports=function(x){if(!h(f,x)||!(g||typeof f[x]=="string")){var R="Symbol."+x;g&&h(v,x)?f[x]=v[x]:w&&m?f[x]=m(R):f[x]=b(R)}return f[x]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(a,N,j){N.exports=`
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/global"),h=a("../internals/array-buffer"),y=a("../internals/set-species"),g="ArrayBuffer",w=h[g],f=c[g];p({global:!0,forced:f!==w},{ArrayBuffer:w}),y(g)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/function-uncurry-this"),h=a("../internals/fails"),y=a("../internals/array-buffer"),g=a("../internals/an-object"),w=a("../internals/to-absolute-index"),f=a("../internals/to-length"),v=a("../internals/species-constructor"),m=y.ArrayBuffer,b=y.DataView,x=b.prototype,R=c(m.prototype.slice),I=c(x.getUint8),E=c(x.setUint8),C=h(function(){return!new m(2).slice(1,void 0).byteLength});p({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:C},{slice:function(Z,M){if(R&&M===void 0)return R(g(this),Z);for(var J=g(this).byteLength,_=w(Z,J),k=w(M===void 0?J:M,J),B=new(v(this,m))(f(k-_)),U=new b(this),K=new b(B),G=0;_<k;)E(K,G++,I(U,_++));return B}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/global"),h=a("../internals/fails"),y=a("../internals/is-array"),g=a("../internals/is-object"),w=a("../internals/to-object"),f=a("../internals/length-of-array-like"),v=a("../internals/create-property"),m=a("../internals/array-species-create"),b=a("../internals/array-method-has-species-support"),x=a("../internals/well-known-symbol"),R=a("../internals/engine-v8-version"),I=x("isConcatSpreadable"),E=9007199254740991,C="Maximum allowed index exceeded",P=c.TypeError,Z=R>=51||!h(function(){var k=[];return k[I]=!1,k.concat()[0]!==k}),M=b("concat"),J=function(k){if(!g(k))return!1;var B=k[I];return B!==void 0?!!B:y(k)},_=!Z||!M;p({target:"Array",proto:!0,forced:_},{concat:function(B){var U=w(this),K=m(U,0),G=0,F,W,X,re,oe;for(F=-1,X=arguments.length;F<X;F++)if(oe=F===-1?U:arguments[F],J(oe)){if(re=f(oe),G+re>E)throw P(C);for(W=0;W<re;W++,G++)W in oe&&v(K,G,oe[W])}else{if(G>=E)throw P(C);v(K,G++,oe)}return K.length=G,K}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(a,N,j){var p=a("../internals/export"),c=a("../internals/array-fill"),h=a("../internals/add-to-unscopables");p({target:"Array",proto:!0},{fill:c}),h("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/array-iteration").filter,h=a("../internals/array-method-has-species-support"),y=h("filter");p({target:"Array",proto:!0,forced:!y},{filter:function(w){return c(this,w,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/array-iteration").find,h=a("../internals/add-to-unscopables"),y="find",g=!0;y in[]&&Array(1)[y](function(){g=!1}),p({target:"Array",proto:!0,forced:g},{find:function(f){return c(this,f,arguments.length>1?arguments[1]:void 0)}}),h(y)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(a,N,j){var p=a("../internals/export"),c=a("../internals/array-from"),h=a("../internals/check-correctness-of-iteration"),y=!h(function(g){Array.from(g)});p({target:"Array",stat:!0,forced:y},{from:c})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/array-includes").includes,h=a("../internals/add-to-unscopables");p({target:"Array",proto:!0},{includes:function(g){return c(this,g,arguments.length>1?arguments[1]:void 0)}}),h("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(a,N,j){"use strict";var p=a("../internals/to-indexed-object"),c=a("../internals/add-to-unscopables"),h=a("../internals/iterators"),y=a("../internals/internal-state"),g=a("../internals/object-define-property").f,w=a("../internals/define-iterator"),f=a("../internals/is-pure"),v=a("../internals/descriptors"),m="Array Iterator",b=y.set,x=y.getterFor(m);N.exports=w(Array,"Array",function(I,E){b(this,{type:m,target:p(I),index:0,kind:E})},function(){var I=x(this),E=I.target,C=I.kind,P=I.index++;return!E||P>=E.length?(I.target=void 0,{value:void 0,done:!0}):C=="keys"?{value:P,done:!1}:C=="values"?{value:E[P],done:!1}:{value:[P,E[P]],done:!1}},"values");var R=h.Arguments=h.Array;if(c("keys"),c("values"),c("entries"),!f&&v&&R.name!=="values")try{g(R,"name",{value:"values"})}catch(I){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/function-uncurry-this"),h=a("../internals/indexed-object"),y=a("../internals/to-indexed-object"),g=a("../internals/array-method-is-strict"),w=c([].join),f=h!=Object,v=g("join",",");p({target:"Array",proto:!0,forced:f||!v},{join:function(b){return w(y(this),b===void 0?",":b)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/array-iteration").map,h=a("../internals/array-method-has-species-support"),y=h("map");p({target:"Array",proto:!0,forced:!y},{map:function(w){return c(this,w,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/global"),h=a("../internals/is-array"),y=a("../internals/is-constructor"),g=a("../internals/is-object"),w=a("../internals/to-absolute-index"),f=a("../internals/length-of-array-like"),v=a("../internals/to-indexed-object"),m=a("../internals/create-property"),b=a("../internals/well-known-symbol"),x=a("../internals/array-method-has-species-support"),R=a("../internals/array-slice"),I=x("slice"),E=b("species"),C=c.Array,P=Math.max;p({target:"Array",proto:!0,forced:!I},{slice:function(M,J){var _=v(this),k=f(_),B=w(M,k),U=w(J===void 0?k:J,k),K,G,F;if(h(_)&&(K=_.constructor,y(K)&&(K===C||h(K.prototype))?K=void 0:g(K)&&(K=K[E],K===null&&(K=void 0)),K===C||K===void 0))return R(_,B,U);for(G=new(K===void 0?C:K)(P(U-B,0)),F=0;B<U;B++,F++)B in _&&m(G,F,_[B]);return G.length=F,G}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/function-uncurry-this"),h=a("../internals/a-callable"),y=a("../internals/to-object"),g=a("../internals/length-of-array-like"),w=a("../internals/to-string"),f=a("../internals/fails"),v=a("../internals/array-sort"),m=a("../internals/array-method-is-strict"),b=a("../internals/engine-ff-version"),x=a("../internals/engine-is-ie-or-edge"),R=a("../internals/engine-v8-version"),I=a("../internals/engine-webkit-version"),E=[],C=c(E.sort),P=c(E.push),Z=f(function(){E.sort(void 0)}),M=f(function(){E.sort(null)}),J=m("sort"),_=!f(function(){if(R)return R<70;if(!(b&&b>3)){if(x)return!0;if(I)return I<603;var U="",K,G,F,W;for(K=65;K<76;K++){switch(G=String.fromCharCode(K),K){case 66:case 69:case 70:case 72:F=3;break;case 68:case 71:F=4;break;default:F=2}for(W=0;W<47;W++)E.push({k:G+W,v:F})}for(E.sort(function(X,re){return re.v-X.v}),W=0;W<E.length;W++)G=E[W].k.charAt(0),U.charAt(U.length-1)!==G&&(U+=G);return U!=="DGBEFHACIJK"}}),k=Z||!M||!J||!_,B=function(U){return function(K,G){return G===void 0?-1:K===void 0?1:U!==void 0?+U(K,G)||0:w(K)>w(G)?1:-1}};p({target:"Array",proto:!0,forced:k},{sort:function(K){K!==void 0&&h(K);var G=y(this);if(_)return K===void 0?C(G):C(G,K);var F=[],W=g(G),X,re;for(re=0;re<W;re++)re in G&&P(F,G[re]);for(v(F,B(K)),X=F.length,re=0;re<X;)G[re]=F[re++];for(;re<W;)delete G[re++];return G}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/global"),h=a("../internals/to-absolute-index"),y=a("../internals/to-integer-or-infinity"),g=a("../internals/length-of-array-like"),w=a("../internals/to-object"),f=a("../internals/array-species-create"),v=a("../internals/create-property"),m=a("../internals/array-method-has-species-support"),b=m("splice"),x=c.TypeError,R=Math.max,I=Math.min,E=9007199254740991,C="Maximum allowed length exceeded";p({target:"Array",proto:!0,forced:!b},{splice:function(Z,M){var J=w(this),_=g(J),k=h(Z,_),B=arguments.length,U,K,G,F,W,X;if(B===0?U=K=0:B===1?(U=0,K=_-k):(U=B-2,K=I(R(y(M),0),_-k)),_+U-K>E)throw x(C);for(G=f(J,K),F=0;F<K;F++)W=k+F,W in J&&v(G,F,J[W]);if(G.length=K,U<K){for(F=k;F<_-K;F++)W=F+K,X=F+U,W in J?J[X]=J[W]:delete J[X];for(F=_;F>_-K+U;F--)delete J[F-1]}else if(U>K)for(F=_-K;F>k;F--)W=F+K-1,X=F+U-1,W in J?J[X]=J[W]:delete J[X];for(F=0;F<U;F++)J[F+k]=arguments[F+2];return J.length=_-K+U,G}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(a,N,j){var p=a("../internals/descriptors"),c=a("../internals/function-name").EXISTS,h=a("../internals/function-uncurry-this"),y=a("../internals/object-define-property").f,g=Function.prototype,w=h(g.toString),f=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,v=h(f.exec),m="name";p&&!c&&y(g,m,{configurable:!0,get:function(){try{return v(f,w(this))[1]}catch(b){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(a,N,j){var p=a("../internals/export"),c=a("../internals/get-built-in"),h=a("../internals/function-apply"),y=a("../internals/function-call"),g=a("../internals/function-uncurry-this"),w=a("../internals/fails"),f=a("../internals/is-array"),v=a("../internals/is-callable"),m=a("../internals/is-object"),b=a("../internals/is-symbol"),x=a("../internals/array-slice"),R=a("../internals/native-symbol"),I=c("JSON","stringify"),E=g(/./.exec),C=g("".charAt),P=g("".charCodeAt),Z=g("".replace),M=g(1 .toString),J=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,B=!R||w(function(){var F=c("Symbol")();return I([F])!="[null]"||I({a:F})!="{}"||I(Object(F))!="{}"}),U=w(function(){return I("\uDF06\uD834")!=='"\\udf06\\ud834"'||I("\uDEAD")!=='"\\udead"'}),K=function(F,W){var X=x(arguments),re=W;if(!(!m(W)&&F===void 0||b(F)))return f(W)||(W=function(oe,pe){if(v(re)&&(pe=y(re,this,oe,pe)),!b(pe))return pe}),X[1]=W,h(I,null,X)},G=function(F,W,X){var re=C(X,W-1),oe=C(X,W+1);return E(_,F)&&!E(k,oe)||E(k,F)&&!E(_,re)?"\\u"+M(P(F,0),16):F};I&&p({target:"JSON",stat:!0,forced:B||U},{stringify:function(W,X,re){var oe=x(arguments),pe=h(B?K:I,null,oe);return U&&typeof pe=="string"?Z(pe,J,G):pe}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(a,N,j){"use strict";var p=a("../internals/descriptors"),c=a("../internals/global"),h=a("../internals/function-uncurry-this"),y=a("../internals/is-forced"),g=a("../internals/redefine"),w=a("../internals/has-own-property"),f=a("../internals/inherit-if-required"),v=a("../internals/object-is-prototype-of"),m=a("../internals/is-symbol"),b=a("../internals/to-primitive"),x=a("../internals/fails"),R=a("../internals/object-get-own-property-names").f,I=a("../internals/object-get-own-property-descriptor").f,E=a("../internals/object-define-property").f,C=a("../internals/this-number-value"),P=a("../internals/string-trim").trim,Z="Number",M=c[Z],J=M.prototype,_=c.TypeError,k=h("".slice),B=h("".charCodeAt),U=function(re){var oe=b(re,"number");return typeof oe=="bigint"?oe:K(oe)},K=function(re){var oe=b(re,"number"),pe,ie,Ie,ee,de,me,xe,ce;if(m(oe))throw _("Cannot convert a Symbol value to a number");if(typeof oe=="string"&&oe.length>2){if(oe=P(oe),pe=B(oe,0),pe===43||pe===45){if(ie=B(oe,2),ie===88||ie===120)return NaN}else if(pe===48){switch(B(oe,1)){case 66:case 98:Ie=2,ee=49;break;case 79:case 111:Ie=8,ee=55;break;default:return+oe}for(de=k(oe,2),me=de.length,xe=0;xe<me;xe++)if(ce=B(de,xe),ce<48||ce>ee)return NaN;return parseInt(de,Ie)}}return+oe};if(y(Z,!M(" 0o1")||!M("0b1")||M("+0x1"))){for(var G=function(oe){var pe=arguments.length<1?0:M(U(oe)),ie=this;return v(J,ie)&&x(function(){C(ie)})?f(Object(pe),ie,G):pe},F=p?R(M):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),W=0,X;F.length>W;W++)w(M,X=F[W])&&!w(G,X)&&E(G,X,I(M,X));G.prototype=J,J.constructor=G,g(c,Z,G)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(a,N,j){var p=a("../internals/export"),c=a("../internals/object-assign");p({target:"Object",stat:!0,forced:Object.assign!==c},{assign:c})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(a,N,j){var p=a("../internals/export"),c=a("../internals/object-to-array").entries;p({target:"Object",stat:!0},{entries:function(y){return c(y)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(a,N,j){var p=a("../internals/export"),c=a("../internals/native-symbol"),h=a("../internals/fails"),y=a("../internals/object-get-own-property-symbols"),g=a("../internals/to-object"),w=!c||h(function(){y.f(1)});p({target:"Object",stat:!0,forced:w},{getOwnPropertySymbols:function(v){var m=y.f;return m?m(g(v)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(a,N,j){var p=a("../internals/export"),c=a("../internals/to-object"),h=a("../internals/object-keys"),y=a("../internals/fails"),g=y(function(){h(1)});p({target:"Object",stat:!0,forced:g},{keys:function(f){return h(c(f))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(a,N,j){var p=a("../internals/to-string-tag-support"),c=a("../internals/redefine"),h=a("../internals/object-to-string");p||c(Object.prototype,"toString",h,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/function-call"),h=a("../internals/a-callable"),y=a("../internals/new-promise-capability"),g=a("../internals/perform"),w=a("../internals/iterate"),f=a("../internals/promise-statics-incorrect-iteration");p({target:"Promise",stat:!0,forced:f},{all:function(m){var b=this,x=y.f(b),R=x.resolve,I=x.reject,E=g(function(){var C=h(b.resolve),P=[],Z=0,M=1;w(m,function(J){var _=Z++,k=!1;M++,c(C,b,J).then(function(B){k||(k=!0,P[_]=B,--M||R(P))},I)}),--M||R(P)});return E.error&&I(E.value),x.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/is-pure"),h=a("../internals/promise-constructor-detection").CONSTRUCTOR,y=a("../internals/promise-native-constructor"),g=a("../internals/get-built-in"),w=a("../internals/is-callable"),f=a("../internals/redefine"),v=y&&y.prototype;if(p({target:"Promise",proto:!0,forced:h,real:!0},{catch:function(b){return this.then(void 0,b)}}),!c&&w(y)){var m=g("Promise").prototype.catch;v.catch!==m&&f(v,"catch",m,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/is-pure"),h=a("../internals/engine-is-node"),y=a("../internals/global"),g=a("../internals/function-call"),w=a("../internals/redefine"),f=a("../internals/redefine-all"),v=a("../internals/object-set-prototype-of"),m=a("../internals/set-to-string-tag"),b=a("../internals/set-species"),x=a("../internals/a-callable"),R=a("../internals/is-callable"),I=a("../internals/is-object"),E=a("../internals/an-instance"),C=a("../internals/species-constructor"),P=a("../internals/task").set,Z=a("../internals/microtask"),M=a("../internals/host-report-errors"),J=a("../internals/perform"),_=a("../internals/queue"),k=a("../internals/internal-state"),B=a("../internals/promise-native-constructor"),U=a("../internals/promise-constructor-detection"),K=a("../internals/new-promise-capability"),G="Promise",F=U.CONSTRUCTOR,W=U.REJECTION_EVENT,X=U.SUBCLASSING,re=k.getterFor(G),oe=k.set,pe=B&&B.prototype,ie=B,Ie=pe,ee=y.TypeError,de=y.document,me=y.process,xe=K.f,ce=xe,le=!!(de&&de.createEvent&&y.dispatchEvent),ge="unhandledrejection",Ce="rejectionhandled",De=0,je=1,fe=2,Y=1,be=2,q,V,Q,L,$=function(Qe){var rt;return I(Qe)&&R(rt=Qe.then)?rt:!1},S=function(Qe,rt){var We=rt.value,Je=rt.state==je,Re=Je?Qe.ok:Qe.fail,Be=Qe.resolve,_e=Qe.reject,Ve=Qe.domain,et,st,Et;try{Re?(Je||(rt.rejection===be&&Pe(rt),rt.rejection=Y),Re===!0?et=We:(Ve&&Ve.enter(),et=Re(We),Ve&&(Ve.exit(),Et=!0)),et===Qe.promise?_e(ee("Promise-chain cycle")):(st=$(et))?g(st,et,Be,_e):Be(et)):_e(We)}catch(Ct){Ve&&!Et&&Ve.exit(),_e(Ct)}},T=function(Qe,rt){Qe.notified||(Qe.notified=!0,Z(function(){for(var We=Qe.reactions,Je;Je=We.get();)S(Je,Qe);Qe.notified=!1,rt&&!Qe.rejection&&ne(Qe)}))},z=function(Qe,rt,We){var Je,Re;le?(Je=de.createEvent("Event"),Je.promise=rt,Je.reason=We,Je.initEvent(Qe,!1,!0),y.dispatchEvent(Je)):Je={promise:rt,reason:We},!W&&(Re=y["on"+Qe])?Re(Je):Qe===ge&&M("Unhandled promise rejection",We)},ne=function(Qe){g(P,y,function(){var rt=Qe.facade,We=Qe.value,Je=he(Qe),Re;if(Je&&(Re=J(function(){h?me.emit("unhandledRejection",We,rt):z(ge,rt,We)}),Qe.rejection=h||he(Qe)?be:Y,Re.error))throw Re.value})},he=function(Qe){return Qe.rejection!==Y&&!Qe.parent},Pe=function(Qe){g(P,y,function(){var rt=Qe.facade;h?me.emit("rejectionHandled",rt):z(Ce,rt,Qe.value)})},Oe=function(Qe,rt,We){return function(Je){Qe(rt,Je,We)}},Ue=function(Qe,rt,We){Qe.done||(Qe.done=!0,We&&(Qe=We),Qe.value=rt,Qe.state=fe,T(Qe,!0))},nt=function(Qe,rt,We){if(!Qe.done){Qe.done=!0,We&&(Qe=We);try{if(Qe.facade===rt)throw ee("Promise can't be resolved itself");var Je=$(rt);Je?Z(function(){var Re={done:!1};try{g(Je,rt,Oe(nt,Re,Qe),Oe(Ue,Re,Qe))}catch(Be){Ue(Re,Be,Qe)}}):(Qe.value=rt,Qe.state=je,T(Qe,!1))}catch(Re){Ue({done:!1},Re,Qe)}}};if(F&&(ie=function(rt){E(this,Ie),x(rt),g(q,this);var We=re(this);try{rt(Oe(nt,We),Oe(Ue,We))}catch(Je){Ue(We,Je)}},Ie=ie.prototype,q=function(rt){oe(this,{type:G,done:!1,notified:!1,parent:!1,reactions:new _,rejection:!1,state:De,value:void 0})},q.prototype=f(Ie,{then:function(rt,We){var Je=re(this),Re=xe(C(this,ie));return Je.parent=!0,Re.ok=R(rt)?rt:!0,Re.fail=R(We)&&We,Re.domain=h?me.domain:void 0,Je.state==De?Je.reactions.add(Re):Z(function(){S(Re,Je)}),Re.promise}}),V=function(){var Qe=new q,rt=re(Qe);this.promise=Qe,this.resolve=Oe(nt,rt),this.reject=Oe(Ue,rt)},K.f=xe=function(Qe){return Qe===ie||Qe===Q?new V(Qe):ce(Qe)},!c&&R(B)&&pe!==Object.prototype)){L=pe.then,X||w(pe,"then",function(rt,We){var Je=this;return new ie(function(Re,Be){g(L,Je,Re,Be)}).then(rt,We)},{unsafe:!0});try{delete pe.constructor}catch(Qe){}v&&v(pe,Ie)}p({global:!0,wrap:!0,forced:F},{Promise:ie}),m(ie,G,!1,!0),b(G)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(a,N,j){a("../modules/es.promise.constructor"),a("../modules/es.promise.all"),a("../modules/es.promise.catch"),a("../modules/es.promise.race"),a("../modules/es.promise.reject"),a("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/function-call"),h=a("../internals/a-callable"),y=a("../internals/new-promise-capability"),g=a("../internals/perform"),w=a("../internals/iterate"),f=a("../internals/promise-statics-incorrect-iteration");p({target:"Promise",stat:!0,forced:f},{race:function(m){var b=this,x=y.f(b),R=x.reject,I=g(function(){var E=h(b.resolve);w(m,function(C){c(E,b,C).then(x.resolve,R)})});return I.error&&R(I.value),x.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/function-call"),h=a("../internals/new-promise-capability"),y=a("../internals/promise-constructor-detection").CONSTRUCTOR;p({target:"Promise",stat:!0,forced:y},{reject:function(w){var f=h.f(this);return c(f.reject,void 0,w),f.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/get-built-in"),h=a("../internals/is-pure"),y=a("../internals/promise-native-constructor"),g=a("../internals/promise-constructor-detection").CONSTRUCTOR,w=a("../internals/promise-resolve"),f=c("Promise"),v=h&&!g;p({target:"Promise",stat:!0,forced:h||g},{resolve:function(b){return w(v&&this===f?y:this,b)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(a,N,j){var p=a("../internals/descriptors"),c=a("../internals/global"),h=a("../internals/function-uncurry-this"),y=a("../internals/is-forced"),g=a("../internals/inherit-if-required"),w=a("../internals/create-non-enumerable-property"),f=a("../internals/object-get-own-property-names").f,v=a("../internals/object-is-prototype-of"),m=a("../internals/is-regexp"),b=a("../internals/to-string"),x=a("../internals/regexp-get-flags"),R=a("../internals/regexp-sticky-helpers"),I=a("../internals/proxy-accessor"),E=a("../internals/redefine"),C=a("../internals/fails"),P=a("../internals/has-own-property"),Z=a("../internals/internal-state").enforce,M=a("../internals/set-species"),J=a("../internals/well-known-symbol"),_=a("../internals/regexp-unsupported-dot-all"),k=a("../internals/regexp-unsupported-ncg"),B=J("match"),U=c.RegExp,K=U.prototype,G=c.SyntaxError,F=h(K.exec),W=h("".charAt),X=h("".replace),re=h("".indexOf),oe=h("".slice),pe=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ie=/a/g,Ie=/a/g,ee=new U(ie)!==ie,de=R.MISSED_STICKY,me=R.UNSUPPORTED_Y,xe=p&&(!ee||de||_||k||C(function(){return Ie[B]=!1,U(ie)!=ie||U(Ie)==Ie||U(ie,"i")!="/a/i"})),ce=function(je){for(var fe=je.length,Y=0,be="",q=!1,V;Y<=fe;Y++){if(V=W(je,Y),V==="\\"){be+=V+W(je,++Y);continue}!q&&V==="."?be+="[\\s\\S]":(V==="["?q=!0:V==="]"&&(q=!1),be+=V)}return be},le=function(je){for(var fe=je.length,Y=0,be="",q=[],V={},Q=!1,L=!1,$=0,S="",T;Y<=fe;Y++){if(T=W(je,Y),T==="\\")T=T+W(je,++Y);else if(T==="]")Q=!1;else if(!Q)switch(!0){case T==="[":Q=!0;break;case T==="(":F(pe,oe(je,Y+1))&&(Y+=2,L=!0),be+=T,$++;continue;case(T===">"&&L):if(S===""||P(V,S))throw new G("Invalid capture group name");V[S]=!0,q[q.length]=[S,$],L=!1,S="";continue}L?S+=T:be+=T}return[be,q]};if(y("RegExp",xe)){for(var ge=function(fe,Y){var be=v(K,this),q=m(fe),V=Y===void 0,Q=[],L=fe,$,S,T,z,ne,he;if(!be&&q&&V&&fe.constructor===ge)return fe;if((q||v(K,fe))&&(fe=fe.source,V&&(Y=x(L))),fe=fe===void 0?"":b(fe),Y=Y===void 0?"":b(Y),L=fe,_&&"dotAll"in ie&&(S=!!Y&&re(Y,"s")>-1,S&&(Y=X(Y,/s/g,""))),$=Y,de&&"sticky"in ie&&(T=!!Y&&re(Y,"y")>-1,T&&me&&(Y=X(Y,/y/g,""))),k&&(z=le(fe),fe=z[0],Q=z[1]),ne=g(U(fe,Y),be?this:K,ge),(S||T||Q.length)&&(he=Z(ne),S&&(he.dotAll=!0,he.raw=ge(ce(fe),$)),T&&(he.sticky=!0),Q.length&&(he.groups=Q)),fe!==L)try{w(ne,"source",L===""?"(?:)":L)}catch(Pe){}return ne},Ce=f(U),De=0;Ce.length>De;)I(ge,U,Ce[De++]);K.constructor=ge,ge.prototype=K,E(c,"RegExp",ge)}M("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/regexp-exec");p({target:"RegExp",proto:!0,forced:/./.exec!==c},{exec:c})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(a,N,j){"use strict";var p=a("../internals/function-name").PROPER,c=a("../internals/redefine"),h=a("../internals/an-object"),y=a("../internals/to-string"),g=a("../internals/fails"),w=a("../internals/regexp-get-flags"),f="toString",v=RegExp.prototype,m=v[f],b=g(function(){return m.call({source:"a",flags:"b"})!="/a/b"}),x=p&&m.name!=f;(b||x)&&c(RegExp.prototype,f,function(){var I=h(this),E=y(I.source),C=y(w(I));return"/"+E+"/"+C},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/function-uncurry-this"),h=a("../internals/not-a-regexp"),y=a("../internals/require-object-coercible"),g=a("../internals/to-string"),w=a("../internals/correct-is-regexp-logic"),f=c("".indexOf);p({target:"String",proto:!0,forced:!w("includes")},{includes:function(m){return!!~f(g(y(this)),g(h(m)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(a,N,j){"use strict";var p=a("../internals/string-multibyte").charAt,c=a("../internals/to-string"),h=a("../internals/internal-state"),y=a("../internals/define-iterator"),g="String Iterator",w=h.set,f=h.getterFor(g);y(String,"String",function(v){w(this,{type:g,string:c(v),index:0})},function(){var m=f(this),b=m.string,x=m.index,R;return x>=b.length?{value:void 0,done:!0}:(R=p(b,x),m.index+=R.length,{value:R,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(a,N,j){"use strict";var p=a("../internals/function-call"),c=a("../internals/fix-regexp-well-known-symbol-logic"),h=a("../internals/an-object"),y=a("../internals/to-length"),g=a("../internals/to-string"),w=a("../internals/require-object-coercible"),f=a("../internals/get-method"),v=a("../internals/advance-string-index"),m=a("../internals/regexp-exec-abstract");c("match",function(b,x,R){return[function(E){var C=w(this),P=E==null?void 0:f(E,b);return P?p(P,E,C):new RegExp(E)[b](g(C))},function(I){var E=h(this),C=g(I),P=R(x,E,C);if(P.done)return P.value;if(!E.global)return m(E,C);var Z=E.unicode;E.lastIndex=0;for(var M=[],J=0,_;(_=m(E,C))!==null;){var k=g(_[0]);M[J]=k,k===""&&(E.lastIndex=v(C,y(E.lastIndex),Z)),J++}return J===0?null:M}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(a,N,j){"use strict";var p=a("../internals/function-apply"),c=a("../internals/function-call"),h=a("../internals/function-uncurry-this"),y=a("../internals/fix-regexp-well-known-symbol-logic"),g=a("../internals/fails"),w=a("../internals/an-object"),f=a("../internals/is-callable"),v=a("../internals/to-integer-or-infinity"),m=a("../internals/to-length"),b=a("../internals/to-string"),x=a("../internals/require-object-coercible"),R=a("../internals/advance-string-index"),I=a("../internals/get-method"),E=a("../internals/get-substitution"),C=a("../internals/regexp-exec-abstract"),P=a("../internals/well-known-symbol"),Z=P("replace"),M=Math.max,J=Math.min,_=h([].concat),k=h([].push),B=h("".indexOf),U=h("".slice),K=function(X){return X===void 0?X:String(X)},G=function(){return"a".replace(/./,"$0")==="$0"}(),F=function(){return/./[Z]?/./[Z]("a","$0")==="":!1}(),W=!g(function(){var X=/./;return X.exec=function(){var re=[];return re.groups={a:"7"},re},"".replace(X,"$<a>")!=="7"});y("replace",function(X,re,oe){var pe=F?"$":"$0";return[function(Ie,ee){var de=x(this),me=Ie==null?void 0:I(Ie,Z);return me?c(me,Ie,de,ee):c(re,b(de),Ie,ee)},function(ie,Ie){var ee=w(this),de=b(ie);if(typeof Ie=="string"&&B(Ie,pe)===-1&&B(Ie,"$<")===-1){var me=oe(re,ee,de,Ie);if(me.done)return me.value}var xe=f(Ie);xe||(Ie=b(Ie));var ce=ee.global;if(ce){var le=ee.unicode;ee.lastIndex=0}for(var ge=[];;){var Ce=C(ee,de);if(Ce===null||(k(ge,Ce),!ce))break;var De=b(Ce[0]);De===""&&(ee.lastIndex=R(de,m(ee.lastIndex),le))}for(var je="",fe=0,Y=0;Y<ge.length;Y++){Ce=ge[Y];for(var be=b(Ce[0]),q=M(J(v(Ce.index),de.length),0),V=[],Q=1;Q<Ce.length;Q++)k(V,K(Ce[Q]));var L=Ce.groups;if(xe){var $=_([be],V,q,de);L!==void 0&&k($,L);var S=b(p(Ie,void 0,$))}else S=E(be,de,q,V,L,Ie);q>=fe&&(je+=U(de,fe,q)+S,fe=q+be.length)}return je+U(de,fe)}]},!W||!G||F)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(a,N,j){"use strict";var p=a("../internals/function-call"),c=a("../internals/fix-regexp-well-known-symbol-logic"),h=a("../internals/an-object"),y=a("../internals/require-object-coercible"),g=a("../internals/same-value"),w=a("../internals/to-string"),f=a("../internals/get-method"),v=a("../internals/regexp-exec-abstract");c("search",function(m,b,x){return[function(I){var E=y(this),C=I==null?void 0:f(I,m);return C?p(C,I,E):new RegExp(I)[m](w(E))},function(R){var I=h(this),E=w(R),C=x(b,I,E);if(C.done)return C.value;var P=I.lastIndex;g(P,0)||(I.lastIndex=0);var Z=v(I,E);return g(I.lastIndex,P)||(I.lastIndex=P),Z===null?-1:Z.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(a,N,j){"use strict";var p=a("../internals/function-apply"),c=a("../internals/function-call"),h=a("../internals/function-uncurry-this"),y=a("../internals/fix-regexp-well-known-symbol-logic"),g=a("../internals/is-regexp"),w=a("../internals/an-object"),f=a("../internals/require-object-coercible"),v=a("../internals/species-constructor"),m=a("../internals/advance-string-index"),b=a("../internals/to-length"),x=a("../internals/to-string"),R=a("../internals/get-method"),I=a("../internals/array-slice-simple"),E=a("../internals/regexp-exec-abstract"),C=a("../internals/regexp-exec"),P=a("../internals/regexp-sticky-helpers"),Z=a("../internals/fails"),M=P.UNSUPPORTED_Y,J=4294967295,_=Math.min,k=[].push,B=h(/./.exec),U=h(k),K=h("".slice),G=!Z(function(){var F=/(?:)/,W=F.exec;F.exec=function(){return W.apply(this,arguments)};var X="ab".split(F);return X.length!==2||X[0]!=="a"||X[1]!=="b"});y("split",function(F,W,X){var re;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?re=function(oe,pe){var ie=x(f(this)),Ie=pe===void 0?J:pe>>>0;if(Ie===0)return[];if(oe===void 0)return[ie];if(!g(oe))return c(W,ie,oe,Ie);for(var ee=[],de=(oe.ignoreCase?"i":"")+(oe.multiline?"m":"")+(oe.unicode?"u":"")+(oe.sticky?"y":""),me=0,xe=new RegExp(oe.source,de+"g"),ce,le,ge;(ce=c(C,xe,ie))&&(le=xe.lastIndex,!(le>me&&(U(ee,K(ie,me,ce.index)),ce.length>1&&ce.index<ie.length&&p(k,ee,I(ce,1)),ge=ce[0].length,me=le,ee.length>=Ie)));)xe.lastIndex===ce.index&&xe.lastIndex++;return me===ie.length?(ge||!B(xe,""))&&U(ee,""):U(ee,K(ie,me)),ee.length>Ie?I(ee,0,Ie):ee}:"0".split(void 0,0).length?re=function(oe,pe){return oe===void 0&&pe===0?[]:c(W,this,oe,pe)}:re=W,[function(pe,ie){var Ie=f(this),ee=pe==null?void 0:R(pe,F);return ee?c(ee,pe,Ie,ie):c(re,x(Ie),pe,ie)},function(oe,pe){var ie=w(this),Ie=x(oe),ee=X(re,ie,Ie,pe,re!==W);if(ee.done)return ee.value;var de=v(ie,RegExp),me=ie.unicode,xe=(ie.ignoreCase?"i":"")+(ie.multiline?"m":"")+(ie.unicode?"u":"")+(M?"g":"y"),ce=new de(M?"^(?:"+ie.source+")":ie,xe),le=pe===void 0?J:pe>>>0;if(le===0)return[];if(Ie.length===0)return E(ce,Ie)===null?[Ie]:[];for(var ge=0,Ce=0,De=[];Ce<Ie.length;){ce.lastIndex=M?0:Ce;var je=E(ce,M?K(Ie,Ce):Ie),fe;if(je===null||(fe=_(b(ce.lastIndex+(M?Ce:0)),Ie.length))===ge)Ce=m(Ie,Ce,me);else{if(U(De,K(Ie,ge,Ce)),De.length===le)return De;for(var Y=1;Y<=je.length-1;Y++)if(U(De,je[Y]),De.length===le)return De;Ce=ge=fe}}return U(De,K(Ie,ge)),De}]},!G,M)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/string-trim").trim,h=a("../internals/string-trim-forced");p({target:"String",proto:!0,forced:h("trim")},{trim:function(){return c(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/global"),h=a("../internals/function-call"),y=a("../internals/function-uncurry-this"),g=a("../internals/is-pure"),w=a("../internals/descriptors"),f=a("../internals/native-symbol"),v=a("../internals/fails"),m=a("../internals/has-own-property"),b=a("../internals/object-is-prototype-of"),x=a("../internals/an-object"),R=a("../internals/to-indexed-object"),I=a("../internals/to-property-key"),E=a("../internals/to-string"),C=a("../internals/create-property-descriptor"),P=a("../internals/object-create"),Z=a("../internals/object-keys"),M=a("../internals/object-get-own-property-names"),J=a("../internals/object-get-own-property-names-external"),_=a("../internals/object-get-own-property-symbols"),k=a("../internals/object-get-own-property-descriptor"),B=a("../internals/object-define-property"),U=a("../internals/object-define-properties"),K=a("../internals/object-property-is-enumerable"),G=a("../internals/redefine"),F=a("../internals/shared"),W=a("../internals/shared-key"),X=a("../internals/hidden-keys"),re=a("../internals/uid"),oe=a("../internals/well-known-symbol"),pe=a("../internals/well-known-symbol-wrapped"),ie=a("../internals/define-well-known-symbol"),Ie=a("../internals/symbol-define-to-primitive"),ee=a("../internals/set-to-string-tag"),de=a("../internals/internal-state"),me=a("../internals/array-iteration").forEach,xe=W("hidden"),ce="Symbol",le="prototype",ge=de.set,Ce=de.getterFor(ce),De=Object[le],je=c.Symbol,fe=je&&je[le],Y=c.TypeError,be=c.QObject,q=k.f,V=B.f,Q=J.f,L=K.f,$=y([].push),S=F("symbols"),T=F("op-symbols"),z=F("wks"),ne=!be||!be[le]||!be[le].findChild,he=w&&v(function(){return P(V({},"a",{get:function(){return V(this,"a",{value:7}).a}})).a!=7})?function(Re,Be,_e){var Ve=q(De,Be);Ve&&delete De[Be],V(Re,Be,_e),Ve&&Re!==De&&V(De,Be,Ve)}:V,Pe=function(Re,Be){var _e=S[Re]=P(fe);return ge(_e,{type:ce,tag:Re,description:Be}),w||(_e.description=Be),_e},Oe=function(Be,_e,Ve){Be===De&&Oe(T,_e,Ve),x(Be);var et=I(_e);return x(Ve),m(S,et)?(Ve.enumerable?(m(Be,xe)&&Be[xe][et]&&(Be[xe][et]=!1),Ve=P(Ve,{enumerable:C(0,!1)})):(m(Be,xe)||V(Be,xe,C(1,{})),Be[xe][et]=!0),he(Be,et,Ve)):V(Be,et,Ve)},Ue=function(Be,_e){x(Be);var Ve=R(_e),et=Z(Ve).concat(Je(Ve));return me(et,function(st){(!w||h(Qe,Ve,st))&&Oe(Be,st,Ve[st])}),Be},nt=function(Be,_e){return _e===void 0?P(Be):Ue(P(Be),_e)},Qe=function(Be){var _e=I(Be),Ve=h(L,this,_e);return this===De&&m(S,_e)&&!m(T,_e)?!1:Ve||!m(this,_e)||!m(S,_e)||m(this,xe)&&this[xe][_e]?Ve:!0},rt=function(Be,_e){var Ve=R(Be),et=I(_e);if(!(Ve===De&&m(S,et)&&!m(T,et))){var st=q(Ve,et);return st&&m(S,et)&&!(m(Ve,xe)&&Ve[xe][et])&&(st.enumerable=!0),st}},We=function(Be){var _e=Q(R(Be)),Ve=[];return me(_e,function(et){!m(S,et)&&!m(X,et)&&$(Ve,et)}),Ve},Je=function(Re){var Be=Re===De,_e=Q(Be?T:R(Re)),Ve=[];return me(_e,function(et){m(S,et)&&(!Be||m(De,et))&&$(Ve,S[et])}),Ve};f||(je=function(){if(b(fe,this))throw Y("Symbol is not a constructor");var Be=!arguments.length||arguments[0]===void 0?void 0:E(arguments[0]),_e=re(Be),Ve=function(et){this===De&&h(Ve,T,et),m(this,xe)&&m(this[xe],_e)&&(this[xe][_e]=!1),he(this,_e,C(1,et))};return w&&ne&&he(De,_e,{configurable:!0,set:Ve}),Pe(_e,Be)},fe=je[le],G(fe,"toString",function(){return Ce(this).tag}),G(je,"withoutSetter",function(Re){return Pe(re(Re),Re)}),K.f=Qe,B.f=Oe,U.f=Ue,k.f=rt,M.f=J.f=We,_.f=Je,pe.f=function(Re){return Pe(oe(Re),Re)},w&&(V(fe,"description",{configurable:!0,get:function(){return Ce(this).description}}),g||G(De,"propertyIsEnumerable",Qe,{unsafe:!0}))),p({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:je}),me(Z(z),function(Re){ie(Re)}),p({target:ce,stat:!0,forced:!f},{useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),p({target:"Object",stat:!0,forced:!f,sham:!w},{create:nt,defineProperty:Oe,defineProperties:Ue,getOwnPropertyDescriptor:rt}),p({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:We}),Ie(),ee(je,ce),X[xe]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(a,N,j){"use strict";var p=a("../internals/export"),c=a("../internals/descriptors"),h=a("../internals/global"),y=a("../internals/function-uncurry-this"),g=a("../internals/has-own-property"),w=a("../internals/is-callable"),f=a("../internals/object-is-prototype-of"),v=a("../internals/to-string"),m=a("../internals/object-define-property").f,b=a("../internals/copy-constructor-properties"),x=h.Symbol,R=x&&x.prototype;if(c&&w(x)&&(!("description"in R)||x().description!==void 0)){var I={},E=function(){var B=arguments.length<1||arguments[0]===void 0?void 0:v(arguments[0]),U=f(R,this)?new x(B):B===void 0?x():x(B);return B===""&&(I[U]=!0),U};b(E,x),E.prototype=R,R.constructor=E;var C=String(x("test"))=="Symbol(test)",P=y(R.toString),Z=y(R.valueOf),M=/^Symbol\((.*)\)[^)]+$/,J=y("".replace),_=y("".slice);m(R,"description",{configurable:!0,get:function(){var B=Z(this),U=P(B);if(g(I,B))return"";var K=C?_(U,7,-1):J(U,M,"$1");return K===""?void 0:K}}),p({global:!0,forced:!0},{Symbol:E})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(a,N,j){var p=a("../internals/export"),c=a("../internals/get-built-in"),h=a("../internals/has-own-property"),y=a("../internals/to-string"),g=a("../internals/shared"),w=a("../internals/native-symbol-registry"),f=g("string-to-symbol-registry"),v=g("symbol-to-string-registry");p({target:"Symbol",stat:!0,forced:!w},{for:function(m){var b=y(m);if(h(f,b))return f[b];var x=c("Symbol")(b);return f[b]=x,v[x]=b,x}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(a,N,j){var p=a("../internals/define-well-known-symbol");p("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(a,N,j){a("../modules/es.symbol.constructor"),a("../modules/es.symbol.for"),a("../modules/es.symbol.key-for"),a("../modules/es.json.stringify"),a("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(a,N,j){var p=a("../internals/export"),c=a("../internals/has-own-property"),h=a("../internals/is-symbol"),y=a("../internals/try-to-string"),g=a("../internals/shared"),w=a("../internals/native-symbol-registry"),f=g("symbol-to-string-registry");p({target:"Symbol",stat:!0,forced:!w},{keyFor:function(m){if(!h(m))throw TypeError(y(m)+" is not a symbol");if(c(f,m))return f[m]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(a,N,j){"use strict";var p=a("../internals/function-uncurry-this"),c=a("../internals/array-buffer-view-core"),h=a("../internals/array-copy-within"),y=p(h),g=c.aTypedArray,w=c.exportTypedArrayMethod;w("copyWithin",function(v,m){return y(g(this),v,m,arguments.length>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-iteration").every,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("every",function(w){return c(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/function-call"),h=a("../internals/array-fill"),y=p.aTypedArray,g=p.exportTypedArrayMethod;g("fill",function(f){var v=arguments.length;return c(h,y(this),f,v>1?arguments[1]:void 0,v>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-iteration").filter,h=a("../internals/typed-array-from-species-and-list"),y=p.aTypedArray,g=p.exportTypedArrayMethod;g("filter",function(f){var v=c(y(this),f,arguments.length>1?arguments[1]:void 0);return h(this,v)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-iteration").findIndex,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("findIndex",function(w){return c(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-iteration").find,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("find",function(w){return c(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-iteration").forEach,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("forEach",function(w){c(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-includes").includes,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("includes",function(w){return c(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-includes").indexOf,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("indexOf",function(w){return c(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(a,N,j){"use strict";var p=a("../internals/global"),c=a("../internals/fails"),h=a("../internals/function-uncurry-this"),y=a("../internals/array-buffer-view-core"),g=a("../modules/es.array.iterator"),w=a("../internals/well-known-symbol"),f=w("iterator"),v=p.Uint8Array,m=h(g.values),b=h(g.keys),x=h(g.entries),R=y.aTypedArray,I=y.exportTypedArrayMethod,E=v&&v.prototype,C=!c(function(){E[f].call([1])}),P=!!E&&E.values&&E[f]===E.values&&E.values.name==="values",Z=function(){return m(R(this))};I("entries",function(){return x(R(this))},C),I("keys",function(){return b(R(this))},C),I("values",Z,C||!P,{name:"values"}),I(f,Z,C||!P,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/function-uncurry-this"),h=p.aTypedArray,y=p.exportTypedArrayMethod,g=c([].join);y("join",function(f){return g(h(this),f)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/function-apply"),h=a("../internals/array-last-index-of"),y=p.aTypedArray,g=p.exportTypedArrayMethod;g("lastIndexOf",function(f){var v=arguments.length;return c(h,y(this),v>1?[f,arguments[1]]:[f])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-iteration").map,h=a("../internals/typed-array-species-constructor"),y=p.aTypedArray,g=p.exportTypedArrayMethod;g("map",function(f){return c(y(this),f,arguments.length>1?arguments[1]:void 0,function(v,m){return new(h(v))(m)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-reduce").right,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("reduceRight",function(w){var f=arguments.length;return c(h(this),w,f,f>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-reduce").left,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("reduce",function(w){var f=arguments.length;return c(h(this),w,f,f>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=p.aTypedArray,h=p.exportTypedArrayMethod,y=Math.floor;h("reverse",function(){for(var w=this,f=c(w).length,v=y(f/2),m=0,b;m<v;)b=w[m],w[m++]=w[--f],w[f]=b;return w})},{"../internals/array-buffer-view-core":103}],331:[function(a,N,j){"use strict";var p=a("../internals/global"),c=a("../internals/function-call"),h=a("../internals/array-buffer-view-core"),y=a("../internals/length-of-array-like"),g=a("../internals/to-offset"),w=a("../internals/to-object"),f=a("../internals/fails"),v=p.RangeError,m=p.Int8Array,b=m&&m.prototype,x=b&&b.set,R=h.aTypedArray,I=h.exportTypedArrayMethod,E=!f(function(){var P=new Uint8ClampedArray(2);return c(x,P,{length:1,0:3},1),P[1]!==3}),C=E&&h.NATIVE_ARRAY_BUFFER_VIEWS&&f(function(){var P=new m(2);return P.set(1),P.set("2",1),P[0]!==0||P[1]!==2});I("set",function(Z){R(this);var M=g(arguments.length>1?arguments[1]:void 0,1),J=w(Z);if(E)return c(x,this,J,M);var _=this.length,k=y(J),B=0;if(k+M>_)throw v("Wrong length");for(;B<k;)this[M+B]=J[B++]},!E||C)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/typed-array-species-constructor"),h=a("../internals/fails"),y=a("../internals/array-slice"),g=p.aTypedArray,w=p.exportTypedArrayMethod,f=h(function(){new Int8Array(1).slice()});w("slice",function(m,b){for(var x=y(g(this),m,b),R=c(this),I=0,E=x.length,C=new R(E);E>I;)C[I]=x[I++];return C},f)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/array-iteration").some,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("some",function(w){return c(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(a,N,j){"use strict";var p=a("../internals/global"),c=a("../internals/function-uncurry-this"),h=a("../internals/fails"),y=a("../internals/a-callable"),g=a("../internals/array-sort"),w=a("../internals/array-buffer-view-core"),f=a("../internals/engine-ff-version"),v=a("../internals/engine-is-ie-or-edge"),m=a("../internals/engine-v8-version"),b=a("../internals/engine-webkit-version"),x=w.aTypedArray,R=w.exportTypedArrayMethod,I=p.Uint16Array,E=I&&c(I.prototype.sort),C=!!E&&!(h(function(){E(new I(2),null)})&&h(function(){E(new I(2),{})})),P=!!E&&!h(function(){if(m)return m<74;if(f)return f<67;if(v)return!0;if(b)return b<602;var M=new I(516),J=Array(516),_,k;for(_=0;_<516;_++)k=_%4,M[_]=515-_,J[_]=_-2*k+3;for(E(M,function(B,U){return(B/4|0)-(U/4|0)}),_=0;_<516;_++)if(M[_]!==J[_])return!0}),Z=function(M){return function(J,_){return M!==void 0?+M(J,_)||0:_!==_?-1:J!==J?1:J===0&&_===0?1/J>0&&1/_<0?1:-1:J>_}};R("sort",function(J){return J!==void 0&&y(J),P?E(this,J):g(x(this),Z(J))},!P||C)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core"),c=a("../internals/to-length"),h=a("../internals/to-absolute-index"),y=a("../internals/typed-array-species-constructor"),g=p.aTypedArray,w=p.exportTypedArrayMethod;w("subarray",function(v,m){var b=g(this),x=b.length,R=h(v,x),I=y(b);return new I(b.buffer,b.byteOffset+R*b.BYTES_PER_ELEMENT,c((m===void 0?x:h(m,x))-R))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(a,N,j){"use strict";var p=a("../internals/global"),c=a("../internals/function-apply"),h=a("../internals/array-buffer-view-core"),y=a("../internals/fails"),g=a("../internals/array-slice"),w=p.Int8Array,f=h.aTypedArray,v=h.exportTypedArrayMethod,m=[].toLocaleString,b=!!w&&y(function(){m.call(new w(1))}),x=y(function(){return[1,2].toLocaleString()!=new w([1,2]).toLocaleString()})||!y(function(){w.prototype.toLocaleString.call([1,2])});v("toLocaleString",function(){return c(m,b?g(f(this)):f(this),g(arguments))},x)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(a,N,j){"use strict";var p=a("../internals/array-buffer-view-core").exportTypedArrayMethod,c=a("../internals/fails"),h=a("../internals/global"),y=a("../internals/function-uncurry-this"),g=h.Uint8Array,w=g&&g.prototype||{},f=[].toString,v=y([].join);c(function(){f.call({})})&&(f=function(){return v(this)});var m=w.toString!=f;p("toString",f,m)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(a,N,j){var p=a("../internals/typed-array-constructor");p("Uint8",function(c){return function(y,g,w){return c(this,y,g,w)}})},{"../internals/typed-array-constructor":258}],339:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/dom-iterables"),h=a("../internals/dom-token-list-prototype"),y=a("../internals/array-for-each"),g=a("../internals/create-non-enumerable-property"),w=function(v){if(v&&v.forEach!==y)try{g(v,"forEach",y)}catch(m){v.forEach=y}};for(var f in c)c[f]&&w(p[f]&&p[f].prototype);w(h)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(a,N,j){var p=a("../internals/global"),c=a("../internals/dom-iterables"),h=a("../internals/dom-token-list-prototype"),y=a("../modules/es.array.iterator"),g=a("../internals/create-non-enumerable-property"),w=a("../internals/well-known-symbol"),f=w("iterator"),v=w("toStringTag"),m=y.values,b=function(R,I){if(R){if(R[f]!==m)try{g(R,f,m)}catch(C){R[f]=m}if(R[v]||g(R,v,I),c[I]){for(var E in y)if(R[E]!==y[E])try{g(R,E,y[E])}catch(C){R[E]=y[E]}}}};for(var x in c)b(p[x]&&p[x].prototype,x);b(h,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(a,N,j){function p(P){return Array.isArray?Array.isArray(P):C(P)==="[object Array]"}j.isArray=p;function c(P){return typeof P=="boolean"}j.isBoolean=c;function h(P){return P===null}j.isNull=h;function y(P){return P==null}j.isNullOrUndefined=y;function g(P){return typeof P=="number"}j.isNumber=g;function w(P){return typeof P=="string"}j.isString=w;function f(P){return typeof P=="symbol"}j.isSymbol=f;function v(P){return P===void 0}j.isUndefined=v;function m(P){return C(P)==="[object RegExp]"}j.isRegExp=m;function b(P){return typeof P=="object"&&P!==null}j.isObject=b;function x(P){return C(P)==="[object Date]"}j.isDate=x;function R(P){return C(P)==="[object Error]"||P instanceof Error}j.isError=R;function I(P){return typeof P=="function"}j.isFunction=I;function E(P){return P===null||typeof P=="boolean"||typeof P=="number"||typeof P=="string"||typeof P=="symbol"||typeof P=="undefined"}j.isPrimitive=E,j.isBuffer=a("buffer").Buffer.isBuffer;function C(P){return Object.prototype.toString.call(P)}},{buffer:90}],342:[function(a,N,j){(function(p){"use strict";var c=function(){var f=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,v=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g;return function(b,x,R,I){if(arguments.length===1&&w(b)==="string"&&!/\d/.test(b)&&(x=b,b=void 0),b=b||new Date,b instanceof Date||(b=new Date(b)),isNaN(b))throw TypeError("Invalid date");x=String(c.masks[x]||x||c.masks.default);var E=x.slice(0,4);(E==="UTC:"||E==="GMT:")&&(x=x.slice(4),R=!0,E==="GMT:"&&(I=!0));var C=R?"getUTC":"get",P=b[C+"Date"](),Z=b[C+"Day"](),M=b[C+"Month"](),J=b[C+"FullYear"](),_=b[C+"Hours"](),k=b[C+"Minutes"](),B=b[C+"Seconds"](),U=b[C+"Milliseconds"](),K=R?0:b.getTimezoneOffset(),G=y(b),F=g(b),W={d:P,dd:h(P),ddd:c.i18n.dayNames[Z],dddd:c.i18n.dayNames[Z+7],m:M+1,mm:h(M+1),mmm:c.i18n.monthNames[M],mmmm:c.i18n.monthNames[M+12],yy:String(J).slice(2),yyyy:J,h:_%12||12,hh:h(_%12||12),H:_,HH:h(_),M:k,MM:h(k),s:B,ss:h(B),l:h(U,3),L:h(Math.round(U/10)),t:_<12?"a":"p",tt:_<12?"am":"pm",T:_<12?"A":"P",TT:_<12?"AM":"PM",Z:I?"GMT":R?"UTC":(String(b).match(v)||[""]).pop().replace(m,""),o:(K>0?"-":"+")+h(Math.floor(Math.abs(K)/60)*100+Math.abs(K)%60,4),S:["th","st","nd","rd"][P%10>3?0:(P%100-P%10!=10)*P%10],W:G,N:F};return x.replace(f,function(X){return X in W?W[X]:X.slice(1,X.length-1)})}}();c.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},c.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function h(f,v){for(f=String(f),v=v||2;f.length<v;)f="0"+f;return f}function y(f){var v=new Date(f.getFullYear(),f.getMonth(),f.getDate());v.setDate(v.getDate()-(v.getDay()+6)%7+3);var m=new Date(v.getFullYear(),0,4);m.setDate(m.getDate()-(m.getDay()+6)%7+3);var b=v.getTimezoneOffset()-m.getTimezoneOffset();v.setHours(v.getHours()-b);var x=(v-m)/(864e5*7);return 1+Math.floor(x)}function g(f){var v=f.getDay();return v===0&&(v=7),v}function w(f){return f===null?"null":f===void 0?"undefined":typeof f!="object"?typeof f:Array.isArray(f)?"array":{}.toString.call(f).slice(8,-1).toLowerCase()}typeof Se=="function"&&Se.amd?Se(function(){return c}):typeof j=="object"?N.exports=c:p.dateFormat=c})(this)},{}],343:[function(a,N,j){"use strict";var p=/["'&<>]/;N.exports=c;function c(h){var y=""+h,g=p.exec(y);if(!g)return y;var w,f="",v=0,m=0;for(v=g.index;v<y.length;v++){switch(y.charCodeAt(v)){case 34:w="&quot;";break;case 38:w="&amp;";break;case 39:w="&#39;";break;case 60:w="&lt;";break;case 62:w="&gt;";break;default:continue}m!==v&&(f+=y.substring(m,v)),m=v+1,f+=w}return m!==v?f+y.substring(m,v):f}},{}],344:[function(a,N,j){"use strict";var p=typeof Reflect=="object"?Reflect:null,c=p&&typeof p.apply=="function"?p.apply:function(B,U,K){return Function.prototype.apply.call(B,U,K)},h;p&&typeof p.ownKeys=="function"?h=p.ownKeys:Object.getOwnPropertySymbols?h=function(B){return Object.getOwnPropertyNames(B).concat(Object.getOwnPropertySymbols(B))}:h=function(B){return Object.getOwnPropertyNames(B)};function y(k){console&&console.warn&&console.warn(k)}var g=Number.isNaN||function(B){return B!==B};function w(){w.init.call(this)}N.exports=w,N.exports.once=M,w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var f=10;function v(k){if(typeof k!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(k){if(typeof k!="number"||k<0||g(k))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+k+".");f=k}}),w.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},w.prototype.setMaxListeners=function(B){if(typeof B!="number"||B<0||g(B))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+B+".");return this._maxListeners=B,this};function m(k){return k._maxListeners===void 0?w.defaultMaxListeners:k._maxListeners}w.prototype.getMaxListeners=function(){return m(this)},w.prototype.emit=function(B){for(var U=[],K=1;K<arguments.length;K++)U.push(arguments[K]);var G=B==="error",F=this._events;if(F!==void 0)G=G&&F.error===void 0;else if(!G)return!1;if(G){var W;if(U.length>0&&(W=U[0]),W instanceof Error)throw W;var X=new Error("Unhandled error."+(W?" ("+W.message+")":""));throw X.context=W,X}var re=F[B];if(re===void 0)return!1;if(typeof re=="function")c(re,this,U);else for(var oe=re.length,pe=C(re,oe),K=0;K<oe;++K)c(pe[K],this,U);return!0};function b(k,B,U,K){var G,F,W;if(v(U),F=k._events,F===void 0?(F=k._events=Object.create(null),k._eventsCount=0):(F.newListener!==void 0&&(k.emit("newListener",B,U.listener?U.listener:U),F=k._events),W=F[B]),W===void 0)W=F[B]=U,++k._eventsCount;else if(typeof W=="function"?W=F[B]=K?[U,W]:[W,U]:K?W.unshift(U):W.push(U),G=m(k),G>0&&W.length>G&&!W.warned){W.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+W.length+" "+String(B)+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=k,X.type=B,X.count=W.length,y(X)}return k}w.prototype.addListener=function(B,U){return b(this,B,U,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(B,U){return b(this,B,U,!0)};function x(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function R(k,B,U){var K={fired:!1,wrapFn:void 0,target:k,type:B,listener:U},G=x.bind(K);return G.listener=U,K.wrapFn=G,G}w.prototype.once=function(B,U){return v(U),this.on(B,R(this,B,U)),this},w.prototype.prependOnceListener=function(B,U){return v(U),this.prependListener(B,R(this,B,U)),this},w.prototype.removeListener=function(B,U){var K,G,F,W,X;if(v(U),G=this._events,G===void 0)return this;if(K=G[B],K===void 0)return this;if(K===U||K.listener===U)--this._eventsCount===0?this._events=Object.create(null):(delete G[B],G.removeListener&&this.emit("removeListener",B,K.listener||U));else if(typeof K!="function"){for(F=-1,W=K.length-1;W>=0;W--)if(K[W]===U||K[W].listener===U){X=K[W].listener,F=W;break}if(F<0)return this;F===0?K.shift():P(K,F),K.length===1&&(G[B]=K[0]),G.removeListener!==void 0&&this.emit("removeListener",B,X||U)}return this},w.prototype.off=w.prototype.removeListener,w.prototype.removeAllListeners=function(B){var U,K,G;if(K=this._events,K===void 0)return this;if(K.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):K[B]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete K[B]),this;if(arguments.length===0){var F=Object.keys(K),W;for(G=0;G<F.length;++G)W=F[G],W!=="removeListener"&&this.removeAllListeners(W);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(U=K[B],typeof U=="function")this.removeListener(B,U);else if(U!==void 0)for(G=U.length-1;G>=0;G--)this.removeListener(B,U[G]);return this};function I(k,B,U){var K=k._events;if(K===void 0)return[];var G=K[B];return G===void 0?[]:typeof G=="function"?U?[G.listener||G]:[G]:U?Z(G):C(G,G.length)}w.prototype.listeners=function(B){return I(this,B,!0)},w.prototype.rawListeners=function(B){return I(this,B,!1)},w.listenerCount=function(k,B){return typeof k.listenerCount=="function"?k.listenerCount(B):E.call(k,B)},w.prototype.listenerCount=E;function E(k){var B=this._events;if(B!==void 0){var U=B[k];if(typeof U=="function")return 1;if(U!==void 0)return U.length}return 0}w.prototype.eventNames=function(){return this._eventsCount>0?h(this._events):[]};function C(k,B){for(var U=new Array(B),K=0;K<B;++K)U[K]=k[K];return U}function P(k,B){for(;B+1<k.length;B++)k[B]=k[B+1];k.pop()}function Z(k){for(var B=new Array(k.length),U=0;U<B.length;++U)B[U]=k[U].listener||k[U];return B}function M(k,B){return new Promise(function(U,K){function G(W){k.removeListener(B,F),K(W)}function F(){typeof k.removeListener=="function"&&k.removeListener("error",G),U([].slice.call(arguments))}_(k,B,F,{once:!0}),B!=="error"&&J(k,G,{once:!0})})}function J(k,B,U){typeof k.on=="function"&&_(k,"error",B,U)}function _(k,B,U,K){if(typeof k.on=="function")K.once?k.once(B,U):k.on(B,U);else if(typeof k.addEventListener=="function")k.addEventListener(B,function G(F){K.once&&k.removeEventListener(B,G),U(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof k)}},{}],345:[function(a,N,j){"use strict";var p=a("is-callable"),c=Object.prototype.toString,h=Object.prototype.hasOwnProperty,y=function(m,b,x){for(var R=0,I=m.length;R<I;R++)h.call(m,R)&&(x==null?b(m[R],R,m):b.call(x,m[R],R,m))},g=function(m,b,x){for(var R=0,I=m.length;R<I;R++)x==null?b(m.charAt(R),R,m):b.call(x,m.charAt(R),R,m)},w=function(m,b,x){for(var R in m)h.call(m,R)&&(x==null?b(m[R],R,m):b.call(x,m[R],R,m))},f=function(m,b,x){if(!p(b))throw new TypeError("iterator must be a function");var R;arguments.length>=3&&(R=x),c.call(m)==="[object Array]"?y(m,b,R):typeof m=="string"?g(m,b,R):w(m,b,R)};N.exports=f},{"is-callable":367}],346:[function(a,N,j){"use strict";var p="Function.prototype.bind called on incompatible ",c=Array.prototype.slice,h=Object.prototype.toString,y="[object Function]";N.exports=function(w){var f=this;if(typeof f!="function"||h.call(f)!==y)throw new TypeError(p+f);for(var v=c.call(arguments,1),m,b=function(){if(this instanceof m){var C=f.apply(this,v.concat(c.call(arguments)));return Object(C)===C?C:this}else return f.apply(w,v.concat(c.call(arguments)))},x=Math.max(0,f.length-v.length),R=[],I=0;I<x;I++)R.push("$"+I);if(m=Function("binder","return function ("+R.join(",")+"){ return binder.apply(this,arguments); }")(b),f.prototype){var E=function(){};E.prototype=f.prototype,m.prototype=new E,E.prototype=null}return m}},{}],347:[function(a,N,j){"use strict";var p=a("./implementation");N.exports=Function.prototype.bind||p},{"./implementation":346}],348:[function(a,N,j){"use strict";var p,c=SyntaxError,h=Function,y=TypeError,g=function(re){try{return h('"use strict"; return ('+re+").constructor;")()}catch(oe){}},w=Object.getOwnPropertyDescriptor;if(w)try{w({},"")}catch(re){w=null}var f=function(){throw new y},v=w?function(){try{return arguments.callee,f}catch(re){try{return w(arguments,"callee").get}catch(oe){return f}}}():f,m=a("has-symbols")(),b=a("has-proto")(),x=Object.getPrototypeOf||(b?function(re){return re.__proto__}:null),R={},I=typeof Uint8Array=="undefined"||!x?p:x(Uint8Array),E={"%AggregateError%":typeof AggregateError=="undefined"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?p:ArrayBuffer,"%ArrayIteratorPrototype%":m&&x?x([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics=="undefined"?p:Atomics,"%BigInt%":typeof BigInt=="undefined"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?p:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?p:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array=="undefined"?p:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?p:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&x?x(x([][Symbol.iterator]())):p,"%JSON%":typeof JSON=="object"?JSON:p,"%Map%":typeof Map=="undefined"?p:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!m||!x?p:x(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?p:Promise,"%Proxy%":typeof Proxy=="undefined"?p:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?p:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!m||!x?p:x(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&x?x(""[Symbol.iterator]()):p,"%Symbol%":m?Symbol:p,"%SyntaxError%":c,"%ThrowTypeError%":v,"%TypedArray%":I,"%TypeError%":y,"%Uint8Array%":typeof Uint8Array=="undefined"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?p:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?p:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?p:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?p:WeakSet};if(x)try{null.error}catch(re){var C=x(x(re));E["%Error.prototype%"]=C}var P=function re(oe){var pe;if(oe==="%AsyncFunction%")pe=g("async function () {}");else if(oe==="%GeneratorFunction%")pe=g("function* () {}");else if(oe==="%AsyncGeneratorFunction%")pe=g("async function* () {}");else if(oe==="%AsyncGenerator%"){var ie=re("%AsyncGeneratorFunction%");ie&&(pe=ie.prototype)}else if(oe==="%AsyncIteratorPrototype%"){var Ie=re("%AsyncGenerator%");Ie&&x&&(pe=x(Ie.prototype))}return E[oe]=pe,pe},Z={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=a("function-bind"),J=a("has"),_=M.call(Function.call,Array.prototype.concat),k=M.call(Function.apply,Array.prototype.splice),B=M.call(Function.call,String.prototype.replace),U=M.call(Function.call,String.prototype.slice),K=M.call(Function.call,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,W=function(oe){var pe=U(oe,0,1),ie=U(oe,-1);if(pe==="%"&&ie!=="%")throw new c("invalid intrinsic syntax, expected closing `%`");if(ie==="%"&&pe!=="%")throw new c("invalid intrinsic syntax, expected opening `%`");var Ie=[];return B(oe,G,function(ee,de,me,xe){Ie[Ie.length]=me?B(xe,F,"$1"):de||ee}),Ie},X=function(oe,pe){var ie=oe,Ie;if(J(Z,ie)&&(Ie=Z[ie],ie="%"+Ie[0]+"%"),J(E,ie)){var ee=E[ie];if(ee===R&&(ee=P(ie)),typeof ee=="undefined"&&!pe)throw new y("intrinsic "+oe+" exists, but is not available. Please file an issue!");return{alias:Ie,name:ie,value:ee}}throw new c("intrinsic "+oe+" does not exist!")};N.exports=function(oe,pe){if(typeof oe!="string"||oe.length===0)throw new y("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof pe!="boolean")throw new y('"allowMissing" argument must be a boolean');if(K(/^%?[^%]*%?$/,oe)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ie=W(oe),Ie=ie.length>0?ie[0]:"",ee=X("%"+Ie+"%",pe),de=ee.name,me=ee.value,xe=!1,ce=ee.alias;ce&&(Ie=ce[0],k(ie,_([0,1],ce)));for(var le=1,ge=!0;le<ie.length;le+=1){var Ce=ie[le],De=U(Ce,0,1),je=U(Ce,-1);if((De==='"'||De==="'"||De==="`"||je==='"'||je==="'"||je==="`")&&De!==je)throw new c("property names with quotes must have matching quotes");if((Ce==="constructor"||!ge)&&(xe=!0),Ie+="."+Ce,de="%"+Ie+"%",J(E,de))me=E[de];else if(me!=null){if(!(Ce in me)){if(!pe)throw new y("base intrinsic for "+oe+" exists, but the property is not available.");return}if(w&&le+1>=ie.length){var fe=w(me,Ce);ge=!!fe,ge&&"get"in fe&&!("originalValue"in fe.get)?me=fe.get:me=me[Ce]}else ge=J(me,Ce),me=me[Ce];ge&&!xe&&(E[de]=me)}}return me}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(a,N,j){"use strict";var p=a("get-intrinsic"),c=p("%Object.getOwnPropertyDescriptor%",!0);if(c)try{c([],"length")}catch(h){c=null}N.exports=c},{"get-intrinsic":348}],350:[function(a,N,j){"use strict";var p={foo:{}},c=Object;N.exports=function(){return{__proto__:p}.foo===p.foo&&!({__proto__:null}instanceof c)}},{}],351:[function(a,N,j){"use strict";var p=typeof Symbol!="undefined"&&Symbol,c=a("./shams");N.exports=function(){return typeof p!="function"||typeof Symbol!="function"||typeof p("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:c()}},{"./shams":352}],352:[function(a,N,j){"use strict";N.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var c={},h=Symbol("test"),y=Object(h);if(typeof h=="string"||Object.prototype.toString.call(h)!=="[object Symbol]"||Object.prototype.toString.call(y)!=="[object Symbol]")return!1;var g=42;c[h]=g;for(h in c)return!1;if(typeof Object.keys=="function"&&Object.keys(c).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(c).length!==0)return!1;var w=Object.getOwnPropertySymbols(c);if(w.length!==1||w[0]!==h||!Object.prototype.propertyIsEnumerable.call(c,h))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(c,h);if(f.value!==g||f.enumerable!==!0)return!1}return!0}},{}],353:[function(a,N,j){"use strict";var p=a("has-symbols/shams");N.exports=function(){return p()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(a,N,j){"use strict";var p=a("function-bind");N.exports=p.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(a,N,j){var p=a("http"),c=a("url"),h=N.exports;for(var y in p)p.hasOwnProperty(y)&&(h[y]=p[y]);h.request=function(w,f){return w=g(w),p.request.call(this,w,f)},h.get=function(w,f){return w=g(w),p.get.call(this,w,f)};function g(w){if(typeof w=="string"&&(w=c.parse(w)),w.protocol||(w.protocol="https:"),w.protocol!=="https:")throw new Error('Protocol "'+w.protocol+'" not supported. Expected "https:"');return w}},{http:468,url:472}],356:[function(a,N,j){"use strict";var p=a("util"),c=a("ms");N.exports=function(h){if(typeof h=="number")return h;var y=c(h);if(y===void 0){var g=new Error(p.format("humanize-ms(%j) result undefined",h));console.warn(g.stack)}return y}},{ms:376,util:419}],357:[function(a,N,j){j.read=function(p,c,h,y,g){var w,f,v=g*8-y-1,m=(1<<v)-1,b=m>>1,x=-7,R=h?g-1:0,I=h?-1:1,E=p[c+R];for(R+=I,w=E&(1<<-x)-1,E>>=-x,x+=v;x>0;w=w*256+p[c+R],R+=I,x-=8);for(f=w&(1<<-x)-1,w>>=-x,x+=y;x>0;f=f*256+p[c+R],R+=I,x-=8);if(w===0)w=1-b;else{if(w===m)return f?NaN:(E?-1:1)*(1/0);f=f+Math.pow(2,y),w=w-b}return(E?-1:1)*f*Math.pow(2,w-y)},j.write=function(p,c,h,y,g,w){var f,v,m,b=w*8-g-1,x=(1<<b)-1,R=x>>1,I=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=y?0:w-1,C=y?1:-1,P=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(v=isNaN(c)?1:0,f=x):(f=Math.floor(Math.log(c)/Math.LN2),c*(m=Math.pow(2,-f))<1&&(f--,m*=2),f+R>=1?c+=I/m:c+=I*Math.pow(2,1-R),c*m>=2&&(f++,m/=2),f+R>=x?(v=0,f=x):f+R>=1?(v=(c*m-1)*Math.pow(2,g),f=f+R):(v=c*Math.pow(2,R-1)*Math.pow(2,g),f=0));g>=8;p[h+E]=v&255,E+=C,v/=256,g-=8);for(f=f<<g|v,b+=g;b>0;p[h+E]=f&255,E+=C,f/=256,b-=8);p[h+E-C]|=P*128}},{}],358:[function(a,N,j){"use strict";var p=[a("./nextTick"),a("./queueMicrotask"),a("./mutation.js"),a("./messageChannel"),a("./stateChange"),a("./timeout")],c,h,y=-1,g=[],w=!1;function f(){!c||!h||(c=!1,h.length?g=h.concat(g):y=-1,g.length&&v())}function v(){if(!c){w=!1,c=!0;for(var E=g.length,C=setTimeout(f);E;){for(h=g,g=[];h&&++y<E;)h[y].run();y=-1,E=g.length}h=null,y=-1,c=!1,clearTimeout(C)}}for(var m,b=-1,x=p.length;++b<x;)if(p[b]&&p[b].test&&p[b].test()){m=p[b].install(v);break}function R(E,C){this.fun=E,this.array=C}R.prototype.run=function(){var E=this.fun,C=this.array;switch(C.length){case 0:return E();case 1:return E(C[0]);case 2:return E(C[0],C[1]);case 3:return E(C[0],C[1],C[2]);default:return E.apply(null,C)}},N.exports=I;function I(E){var C=new Array(arguments.length-1);if(arguments.length>1)for(var P=1;P<arguments.length;P++)C[P-1]=arguments[P];g.push(new R(E,C)),!w&&!c&&(w=!0,m())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(a,N,j){(function(p){(function(){"use strict";j.test=function(){return p.setImmediate?!1:typeof p.MessageChannel!="undefined"},j.install=function(c){var h=new p.MessageChannel;return h.port1.onmessage=c,function(){h.port2.postMessage(0)}}}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(a,N,j){(function(p){(function(){"use strict";var c=p.MutationObserver||p.WebKitMutationObserver;j.test=function(){return c},j.install=function(h){var y=0,g=new c(h),w=p.document.createTextNode("");return g.observe(w,{characterData:!0}),function(){w.data=y=++y%2}}}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(a,N,j){(function(p){(function(){"use strict";j.test=function(){return typeof p.queueMicrotask=="function"},j.install=function(c){return function(){p.queueMicrotask(c)}}}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(a,N,j){(function(p){(function(){"use strict";j.test=function(){return"document"in p&&"onreadystatechange"in p.document.createElement("script")},j.install=function(c){return function(){var h=p.document.createElement("script");return h.onreadystatechange=function(){c(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},p.document.documentElement.appendChild(h),c}}}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(a,N,j){"use strict";j.test=function(){return!0},j.install=function(p){return function(){setTimeout(p,0)}}},{}],364:[function(a,N,j){typeof Object.create=="function"?N.exports=function(c,h){h&&(c.super_=h,c.prototype=Object.create(h.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:N.exports=function(c,h){if(h){c.super_=h;var y=function(){};y.prototype=h.prototype,c.prototype=new y,c.prototype.constructor=c}}},{}],365:[function(a,N,j){"use strict";var p=a("has-tostringtag/shams")(),c=a("call-bind/callBound"),h=c("Object.prototype.toString"),y=function(v){return p&&v&&typeof v=="object"&&Symbol.toStringTag in v?!1:h(v)==="[object Arguments]"},g=function(v){return y(v)?!0:v!==null&&typeof v=="object"&&typeof v.length=="number"&&v.length>=0&&h(v)!=="[object Array]"&&h(v.callee)==="[object Function]"},w=function(){return y(arguments)}();y.isLegacyArguments=g,N.exports=w?y:g},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(a,N,j){N.exports=function(h){return h!=null&&(p(h)||c(h)||!!h._isBuffer)};function p(h){return!!h.constructor&&typeof h.constructor.isBuffer=="function"&&h.constructor.isBuffer(h)}function c(h){return typeof h.readFloatLE=="function"&&typeof h.slice=="function"&&p(h.slice(0,0))}},{}],367:[function(a,N,j){"use strict";var p=Function.prototype.toString,c=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,h,y;if(typeof c=="function"&&typeof Object.defineProperty=="function")try{h=Object.defineProperty({},"length",{get:function(){throw y}}),y={},c(function(){throw 42},null,h)}catch(J){J!==y&&(c=null)}else c=null;var g=/^\s*class\b/,w=function(_){try{var k=p.call(_);return g.test(k)}catch(B){return!1}},f=function(_){try{return w(_)?!1:(p.call(_),!0)}catch(k){return!1}},v=Object.prototype.toString,m="[object Object]",b="[object Function]",x="[object GeneratorFunction]",R="[object HTMLAllCollection]",I="[object HTML document.all class]",E="[object HTMLCollection]",C=typeof Symbol=="function"&&!!Symbol.toStringTag,P=!(0 in[,]),Z=function(){return!1};if(typeof document=="object"){var M=document.all;v.call(M)===v.call(document.all)&&(Z=function(_){if((P||!_)&&(typeof _=="undefined"||typeof _=="object"))try{var k=v.call(_);return(k===R||k===I||k===E||k===m)&&_("")==null}catch(B){}return!1})}N.exports=c?function(_){if(Z(_))return!0;if(!_||typeof _!="function"&&typeof _!="object")return!1;try{c(_,null,h)}catch(k){if(k!==y)return!1}return!w(_)&&f(_)}:function(_){if(Z(_))return!0;if(!_||typeof _!="function"&&typeof _!="object")return!1;if(C)return f(_);if(w(_))return!1;var k=v.call(_);return k!==b&&k!==x&&!/^\[object HTML/.test(k)?!1:f(_)}},{}],368:[function(a,N,j){"use strict";var p=Object.prototype.toString,c=Function.prototype.toString,h=/^\s*(?:function)?\*/,y=a("has-tostringtag/shams")(),g=Object.getPrototypeOf,w=function(){if(!y)return!1;try{return Function("return function*() {}")()}catch(v){}},f;N.exports=function(m){if(typeof m!="function")return!1;if(h.test(c.call(m)))return!0;if(!y){var b=p.call(m);return b==="[object GeneratorFunction]"}if(!g)return!1;if(typeof f=="undefined"){var x=w();f=x?g(x):!1}return g(m)===f}},{"has-tostringtag/shams":353}],369:[function(a,N,j){"use strict";var p=a("which-typed-array");N.exports=function(h){return!!p(h)}},{"which-typed-array":420}],370:[function(a,N,j){var p={}.toString;N.exports=Array.isArray||function(c){return p.call(c)=="[object Array]"}},{}],371:[function(a,N,j){(function(p){(function(){(function(c,h){typeof j=="object"&&typeof N!="undefined"?N.exports=h(c):typeof Se=="function"&&Se.amd?Se(h):h(c)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof p!="undefined"?p:this,function(c){"use strict";c=c||{};var h=c.Base64,y="2.6.4",g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=function(oe){for(var pe={},ie=0,Ie=oe.length;ie<Ie;ie++)pe[oe.charAt(ie)]=ie;return pe}(g),f=String.fromCharCode,v=function(oe){if(oe.length<2){var pe=oe.charCodeAt(0);return pe<128?oe:pe<2048?f(192|pe>>>6)+f(128|pe&63):f(224|pe>>>12&15)+f(128|pe>>>6&63)+f(128|pe&63)}else{var pe=65536+(oe.charCodeAt(0)-55296)*1024+(oe.charCodeAt(1)-56320);return f(240|pe>>>18&7)+f(128|pe>>>12&63)+f(128|pe>>>6&63)+f(128|pe&63)}},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b=function(oe){return oe.replace(m,v)},x=function(oe){var pe=[0,2,1][oe.length%3],ie=oe.charCodeAt(0)<<16|(oe.length>1?oe.charCodeAt(1):0)<<8|(oe.length>2?oe.charCodeAt(2):0),Ie=[g.charAt(ie>>>18),g.charAt(ie>>>12&63),pe>=2?"=":g.charAt(ie>>>6&63),pe>=1?"=":g.charAt(ie&63)];return Ie.join("")},R=c.btoa&&typeof c.btoa=="function"?function(oe){return c.btoa(oe)}:function(oe){if(oe.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return oe.replace(/[\s\S]{1,3}/g,x)},I=function(oe){return R(b(String(oe)))},E=function(oe){return oe.replace(/[+\/]/g,function(pe){return pe=="+"?"-":"_"}).replace(/=/g,"")},C=function(oe,pe){return pe?E(I(oe)):I(oe)},P=function(oe){return C(oe,!0)},Z;c.Uint8Array&&(Z=function(oe,pe){for(var ie="",Ie=0,ee=oe.length;Ie<ee;Ie+=3){var de=oe[Ie],me=oe[Ie+1],xe=oe[Ie+2],ce=de<<16|me<<8|xe;ie+=g.charAt(ce>>>18)+g.charAt(ce>>>12&63)+(typeof me!="undefined"?g.charAt(ce>>>6&63):"=")+(typeof xe!="undefined"?g.charAt(ce&63):"=")}return pe?E(ie):ie});var M=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,J=function(oe){switch(oe.length){case 4:var pe=(7&oe.charCodeAt(0))<<18|(63&oe.charCodeAt(1))<<12|(63&oe.charCodeAt(2))<<6|63&oe.charCodeAt(3),ie=pe-65536;return f((ie>>>10)+55296)+f((ie&1023)+56320);case 3:return f((15&oe.charCodeAt(0))<<12|(63&oe.charCodeAt(1))<<6|63&oe.charCodeAt(2));default:return f((31&oe.charCodeAt(0))<<6|63&oe.charCodeAt(1))}},_=function(oe){return oe.replace(M,J)},k=function(oe){var pe=oe.length,ie=pe%4,Ie=(pe>0?w[oe.charAt(0)]<<18:0)|(pe>1?w[oe.charAt(1)]<<12:0)|(pe>2?w[oe.charAt(2)]<<6:0)|(pe>3?w[oe.charAt(3)]:0),ee=[f(Ie>>>16),f(Ie>>>8&255),f(Ie&255)];return ee.length-=[0,0,2,1][ie],ee.join("")},B=c.atob&&typeof c.atob=="function"?function(oe){return c.atob(oe)}:function(oe){return oe.replace(/\S{1,4}/g,k)},U=function(oe){return B(String(oe).replace(/[^A-Za-z0-9\+\/]/g,""))},K=function(oe){return _(B(oe))},G=function(oe){return String(oe).replace(/[-_]/g,function(pe){return pe=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},F=function(oe){return K(G(oe))},W;c.Uint8Array&&(W=function(oe){return Uint8Array.from(U(G(oe)),function(pe){return pe.charCodeAt(0)})});var X=function(){var oe=c.Base64;return c.Base64=h,oe};if(c.Base64={VERSION:y,atob:U,btoa:R,fromBase64:F,toBase64:C,utob:b,encode:C,encodeURI:P,btou:_,decode:F,noConflict:X,fromUint8Array:Z,toUint8Array:W},typeof Object.defineProperty=="function"){var re=function(oe){return{value:oe,enumerable:!1,writable:!0,configurable:!0}};c.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",re(function(){return F(this)})),Object.defineProperty(String.prototype,"toBase64",re(function(oe){return C(this,oe)})),Object.defineProperty(String.prototype,"toBase64URI",re(function(){return C(this,!0)}))}}return c.Meteor&&(Base64=c.Base64),typeof N!="undefined"&&N.exports?N.exports.Base64=c.Base64:typeof Se=="function"&&Se.amd&&Se([],function(){return c.Base64}),{Base64:c.Base64}})}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(a,N,j){"use strict";N.exports=c;var p=Object.prototype.hasOwnProperty;function c(h,y,g){if(!h)throw new TypeError("argument dest is required");if(!y)throw new TypeError("argument src is required");return g===void 0&&(g=!0),Object.getOwnPropertyNames(y).forEach(function(f){if(!(!g&&p.call(h,f))){var v=Object.getOwnPropertyDescriptor(y,f);Object.defineProperty(h,f,v)}}),h}},{}],373:[function(a,N,j){"use strict";a("core-js/modules/es.array.map.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.replace.js"),a("core-js/modules/es.regexp.constructor.js"),a("core-js/modules/es.regexp.to-string.js");function p(){this._types=Object.create(null),this._extensions=Object.create(null);for(var c=0;c<arguments.length;c++)this.define(arguments[c]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}p.prototype.define=function(c,h){for(var y in c){var g=c[y].map(function(m){return m.toLowerCase()});y=y.toLowerCase();for(var w=0;w<g.length;w++){var f=g[w];if(f[0]!=="*"){if(!h&&f in this._types)throw new Error('Attempt to change mapping for "'+f+'" extension from "'+this._types[f]+'" to "'+y+'". Pass `force=true` to allow this, otherwise remove "'+f+'" from the list of extensions for "'+y+'".');this._types[f]=y}}if(h||!this._extensions[y]){var v=g[0];this._extensions[y]=v[0]!=="*"?v:v.substr(1)}}},p.prototype.getType=function(c){c=String(c);var h=c.replace(/^.*[/\\]/,"").toLowerCase(),y=h.replace(/^.*\./,"").toLowerCase(),g=h.length<c.length,w=y.length<h.length-1;return(w||!g)&&this._types[y]||null},p.prototype.getExtension=function(c){return c=/^\s*([^;\s]*)/.test(c)&&RegExp.$1,c&&this._extensions[c.toLowerCase()]||null},N.exports=p},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(a,N,j){"use strict";var p=a("./Mime");N.exports=new p(a("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(a,N,j){"use strict";N.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(a,N,j){var p=1e3,c=p*60,h=c*60,y=h*24,g=y*7,w=y*365.25;N.exports=function(x,R){R=R||{};var I=typeof x;if(I==="string"&&x.length>0)return f(x);if(I==="number"&&isFinite(x))return R.long?m(x):v(x);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(x))};function f(x){if(x=String(x),!(x.length>100)){var R=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(x);if(R){var I=parseFloat(R[1]),E=(R[2]||"ms").toLowerCase();switch(E){case"years":case"year":case"yrs":case"yr":case"y":return I*w;case"weeks":case"week":case"w":return I*g;case"days":case"day":case"d":return I*y;case"hours":case"hour":case"hrs":case"hr":case"h":return I*h;case"minutes":case"minute":case"mins":case"min":case"m":return I*c;case"seconds":case"second":case"secs":case"sec":case"s":return I*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}function v(x){var R=Math.abs(x);return R>=y?Math.round(x/y)+"d":R>=h?Math.round(x/h)+"h":R>=c?Math.round(x/c)+"m":R>=p?Math.round(x/p)+"s":x+"ms"}function m(x){var R=Math.abs(x);return R>=y?b(x,R,y,"day"):R>=h?b(x,R,h,"hour"):R>=c?b(x,R,c,"minute"):R>=p?b(x,R,p,"second"):x+" ms"}function b(x,R,I,E){var C=R>=I*1.5;return Math.round(x/I)+" "+E+(C?"s":"")}},{}],377:[function(a,N,j){"use strict";var p=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;function y(w){if(w==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(w)}function g(){try{if(!Object.assign)return!1;var w=new String("abc");if(w[5]="de",Object.getOwnPropertyNames(w)[0]==="5")return!1;for(var f={},v=0;v<10;v++)f["_"+String.fromCharCode(v)]=v;var m=Object.getOwnPropertyNames(f).map(function(x){return f[x]});if(m.join("")!=="0123456789")return!1;var b={};return"abcdefghijklmnopqrst".split("").forEach(function(x){b[x]=x}),Object.keys(Object.assign({},b)).join("")==="abcdefghijklmnopqrst"}catch(x){return!1}}N.exports=g()?Object.assign:function(w,f){for(var v,m=y(w),b,x=1;x<arguments.length;x++){v=Object(arguments[x]);for(var R in v)c.call(v,R)&&(m[R]=v[R]);if(p){b=p(v);for(var I=0;I<b.length;I++)h.call(v,b[I])&&(m[b[I]]=v[b[I]])}}return m}},{}],378:[function(a,N,j){(function(p){(function(){"use strict";function c(w){if(typeof w!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(w))}function h(w,f){for(var v="",m=0,b=-1,x=0,R,I=0;I<=w.length;++I){if(I<w.length)R=w.charCodeAt(I);else{if(R===47)break;R=47}if(R===47){if(!(b===I-1||x===1))if(b!==I-1&&x===2){if(v.length<2||m!==2||v.charCodeAt(v.length-1)!==46||v.charCodeAt(v.length-2)!==46){if(v.length>2){var E=v.lastIndexOf("/");if(E!==v.length-1){E===-1?(v="",m=0):(v=v.slice(0,E),m=v.length-1-v.lastIndexOf("/")),b=I,x=0;continue}}else if(v.length===2||v.length===1){v="",m=0,b=I,x=0;continue}}f&&(v.length>0?v+="/..":v="..",m=2)}else v.length>0?v+="/"+w.slice(b+1,I):v=w.slice(b+1,I),m=I-b-1;b=I,x=0}else R===46&&x!==-1?++x:x=-1}return v}function y(w,f){var v=f.dir||f.root,m=f.base||(f.name||"")+(f.ext||"");return v?v===f.root?v+m:v+w+m:m}var g={resolve:function(){for(var f="",v=!1,m,b=arguments.length-1;b>=-1&&!v;b--){var x;b>=0?x=arguments[b]:(m===void 0&&(m=p.cwd()),x=m),c(x),x.length!==0&&(f=x+"/"+f,v=x.charCodeAt(0)===47)}return f=h(f,!v),v?f.length>0?"/"+f:"/":f.length>0?f:"."},normalize:function(f){if(c(f),f.length===0)return".";var v=f.charCodeAt(0)===47,m=f.charCodeAt(f.length-1)===47;return f=h(f,!v),f.length===0&&!v&&(f="."),f.length>0&&m&&(f+="/"),v?"/"+f:f},isAbsolute:function(f){return c(f),f.length>0&&f.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var f,v=0;v<arguments.length;++v){var m=arguments[v];c(m),m.length>0&&(f===void 0?f=m:f+="/"+m)}return f===void 0?".":g.normalize(f)},relative:function(f,v){if(c(f),c(v),f===v||(f=g.resolve(f),v=g.resolve(v),f===v))return"";for(var m=1;m<f.length&&f.charCodeAt(m)===47;++m);for(var b=f.length,x=b-m,R=1;R<v.length&&v.charCodeAt(R)===47;++R);for(var I=v.length,E=I-R,C=x<E?x:E,P=-1,Z=0;Z<=C;++Z){if(Z===C){if(E>C){if(v.charCodeAt(R+Z)===47)return v.slice(R+Z+1);if(Z===0)return v.slice(R+Z)}else x>C&&(f.charCodeAt(m+Z)===47?P=Z:Z===0&&(P=0));break}var M=f.charCodeAt(m+Z),J=v.charCodeAt(R+Z);if(M!==J)break;M===47&&(P=Z)}var _="";for(Z=m+P+1;Z<=b;++Z)(Z===b||f.charCodeAt(Z)===47)&&(_.length===0?_+="..":_+="/..");return _.length>0?_+v.slice(R+P):(R+=P,v.charCodeAt(R)===47&&++R,v.slice(R))},_makeLong:function(f){return f},dirname:function(f){if(c(f),f.length===0)return".";for(var v=f.charCodeAt(0),m=v===47,b=-1,x=!0,R=f.length-1;R>=1;--R)if(v=f.charCodeAt(R),v===47){if(!x){b=R;break}}else x=!1;return b===-1?m?"/":".":m&&b===1?"//":f.slice(0,b)},basename:function(f,v){if(v!==void 0&&typeof v!="string")throw new TypeError('"ext" argument must be a string');c(f);var m=0,b=-1,x=!0,R;if(v!==void 0&&v.length>0&&v.length<=f.length){if(v.length===f.length&&v===f)return"";var I=v.length-1,E=-1;for(R=f.length-1;R>=0;--R){var C=f.charCodeAt(R);if(C===47){if(!x){m=R+1;break}}else E===-1&&(x=!1,E=R+1),I>=0&&(C===v.charCodeAt(I)?--I===-1&&(b=R):(I=-1,b=E))}return m===b?b=E:b===-1&&(b=f.length),f.slice(m,b)}else{for(R=f.length-1;R>=0;--R)if(f.charCodeAt(R)===47){if(!x){m=R+1;break}}else b===-1&&(x=!1,b=R+1);return b===-1?"":f.slice(m,b)}},extname:function(f){c(f);for(var v=-1,m=0,b=-1,x=!0,R=0,I=f.length-1;I>=0;--I){var E=f.charCodeAt(I);if(E===47){if(!x){m=I+1;break}continue}b===-1&&(x=!1,b=I+1),E===46?v===-1?v=I:R!==1&&(R=1):v!==-1&&(R=-1)}return v===-1||b===-1||R===0||R===1&&v===b-1&&v===m+1?"":f.slice(v,b)},format:function(f){if(f===null||typeof f!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof f);return y("/",f)},parse:function(f){c(f);var v={root:"",dir:"",base:"",ext:"",name:""};if(f.length===0)return v;var m=f.charCodeAt(0),b=m===47,x;b?(v.root="/",x=1):x=0;for(var R=-1,I=0,E=-1,C=!0,P=f.length-1,Z=0;P>=x;--P){if(m=f.charCodeAt(P),m===47){if(!C){I=P+1;break}continue}E===-1&&(C=!1,E=P+1),m===46?R===-1?R=P:Z!==1&&(Z=1):R!==-1&&(Z=-1)}return R===-1||E===-1||Z===0||Z===1&&R===E-1&&R===I+1?E!==-1&&(I===0&&b?v.base=v.name=f.slice(1,E):v.base=v.name=f.slice(I,E)):(I===0&&b?(v.name=f.slice(1,R),v.base=f.slice(1,E)):(v.name=f.slice(I,R),v.base=f.slice(I,E)),v.ext=f.slice(R,E)),I>0?v.dir=f.slice(0,I-1):b&&(v.dir="/"),v},sep:"/",delimiter:":",win32:null,posix:null};g.posix=g,N.exports=g}).call(this)}).call(this,a("_process"))},{_process:467}],379:[function(a,N,j){(function(p){(function(){(function(){"use strict";var c={function:!0,object:!0},h=c[typeof window]&&window||this,y=h,g=c[typeof j]&&j,w=c[typeof N]&&N&&!N.nodeType&&N,f=g&&w&&typeof p=="object"&&p;f&&(f.global===f||f.window===f||f.self===f)&&(h=f);var v=Math.pow(2,53)-1,m=/\bOpera/,b=this,x=Object.prototype,R=x.hasOwnProperty,I=x.toString;function E(F){return F=String(F),F.charAt(0).toUpperCase()+F.slice(1)}function C(F,W,X){var re={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return W&&X&&/^Win/i.test(F)&&!/^Windows Phone /i.test(F)&&(re=re[/[\d.]+$/.exec(F)])&&(F="Windows "+re),F=String(F),W&&X&&(F=F.replace(RegExp(W,"i"),X)),F=Z(F.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),F}function P(F,W){var X=-1,re=F?F.length:0;if(typeof re=="number"&&re>-1&&re<=v)for(;++X<re;)W(F[X],X,F);else M(F,W)}function Z(F){return F=U(F),/^(?:webOS|i(?:OS|P))/.test(F)?F:E(F)}function M(F,W){for(var X in F)R.call(F,X)&&W(F[X],X,F)}function J(F){return F==null?E(F):I.call(F).slice(8,-1)}function _(F,W){var X=F!=null?typeof F[W]:"number";return!/^(?:boolean|number|string|undefined)$/.test(X)&&(X=="object"?!!F[W]:!0)}function k(F){return String(F).replace(/([ -])(?!$)/g,"$1?")}function B(F,W){var X=null;return P(F,function(re,oe){X=W(X,re,oe,F)}),X}function U(F){return String(F).replace(/^ +| +$/g,"")}function K(F){var W=h,X=F&&typeof F=="object"&&J(F)!="String";X&&(W=F,F=null);var re=W.navigator||{},oe=re.userAgent||"";F||(F=oe);var pe=X||b==y,ie=X?!!re.likeChrome:/\bChrome\b/.test(F)&&!/internal|\n/i.test(I.toString()),Ie="Object",ee=X?Ie:"ScriptBridgingProxyObject",de=X?Ie:"Environment",me=X&&W.java?"JavaPackage":J(W.java),xe=X?Ie:"RuntimeObject",ce=/\bJava/.test(me)&&W.java,le=ce&&J(W.environment)==de,ge=ce?"a":"\u03B1",Ce=ce?"b":"\u03B2",De=W.document||{},je=W.operamini||W.opera,fe=m.test(fe=X&&je?je["[[Class]]"]:J(je))?fe:je=null,Y,be=F,q=[],V=null,Q=F==oe,L=Q&&je&&typeof je.version=="function"&&je.version(),$,S=Pe([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),T=Ue(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),z=Qe([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ne=Oe({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),he=nt(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function Pe(Re){return B(Re,function(Be,_e){return Be||RegExp("\\b"+(_e.pattern||k(_e))+"\\b","i").exec(F)&&(_e.label||_e)})}function Oe(Re){return B(Re,function(Be,_e,Ve){return Be||(_e[z]||_e[/^[a-z]+(?: +[a-z]+\b)*/i.exec(z)]||RegExp("\\b"+k(Ve)+"(?:\\b|\\w*\\d)","i").exec(F))&&Ve})}function Ue(Re){return B(Re,function(Be,_e){return Be||RegExp("\\b"+(_e.pattern||k(_e))+"\\b","i").exec(F)&&(_e.label||_e)})}function nt(Re){return B(Re,function(Be,_e){var Ve=_e.pattern||k(_e);return!Be&&(Be=RegExp("\\b"+Ve+"(?:/[\\d.]+|[ \\w.]*)","i").exec(F))&&(Be=C(Be,Ve,_e.label||_e)),Be})}function Qe(Re){return B(Re,function(Be,_e){var Ve=_e.pattern||k(_e);return!Be&&(Be=RegExp("\\b"+Ve+" *\\d+[.\\w_]*","i").exec(F)||RegExp("\\b"+Ve+" *\\w+-[\\w]*","i").exec(F)||RegExp("\\b"+Ve+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(F))&&((Be=String(_e.label&&!RegExp(Ve,"i").test(_e.label)?_e.label:Be).split("/"))[1]&&!/[\d.]+/.test(Be[0])&&(Be[0]+=" "+Be[1]),_e=_e.label||_e,Be=Z(Be[0].replace(RegExp(Ve,"i"),_e).replace(RegExp("; *(?:"+_e+"[_-])?","i")," ").replace(RegExp("("+_e+")[-_.]?(\\w)","i"),"$1 $2"))),Be})}function rt(Re){return B(Re,function(Be,_e){return Be||(RegExp(_e+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(F)||0)[1]||null})}function We(){return this.description||""}if(S&&(S=[S]),/\bAndroid\b/.test(he)&&!z&&(Y=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(F))&&(z=U(Y[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ne&&!z?z=Qe([ne]):ne&&z&&(z=z.replace(RegExp("^("+k(ne)+")[-_.\\s]","i"),ne+" ").replace(RegExp("^("+k(ne)+")[-_.]?(\\w)","i"),ne+" $2")),(Y=/\bGoogle TV\b/.exec(z))&&(z=Y[0]),/\bSimulator\b/i.test(F)&&(z=(z?z+" ":"")+"Simulator"),T=="Opera Mini"&&/\bOPiOS\b/.test(F)&&q.push("running in Turbo/Uncompressed mode"),T=="IE"&&/\blike iPhone OS\b/.test(F)?(Y=K(F.replace(/like iPhone OS/,"")),ne=Y.manufacturer,z=Y.product):/^iP/.test(z)?(T||(T="Safari"),he="iOS"+((Y=/ OS ([\d_]+)/i.exec(F))?" "+Y[1].replace(/_/g,"."):"")):T=="Konqueror"&&/^Linux\b/i.test(he)?he="Kubuntu":ne&&ne!="Google"&&(/Chrome/.test(T)&&!/\bMobile Safari\b/i.test(F)||/\bVita\b/.test(z))||/\bAndroid\b/.test(he)&&/^Chrome/.test(T)&&/\bVersion\//i.test(F)?(T="Android Browser",he=/\bAndroid\b/.test(he)?he:"Android"):T=="Silk"?(/\bMobi/i.test(F)||(he="Android",q.unshift("desktop mode")),/Accelerated *= *true/i.test(F)&&q.unshift("accelerated")):T=="UC Browser"&&/\bUCWEB\b/.test(F)?q.push("speed mode"):T=="PaleMoon"&&(Y=/\bFirefox\/([\d.]+)\b/.exec(F))?q.push("identifying as Firefox "+Y[1]):T=="Firefox"&&(Y=/\b(Mobile|Tablet|TV)\b/i.exec(F))?(he||(he="Firefox OS"),z||(z=Y[1])):!T||(Y=!/\bMinefield\b/i.test(F)&&/\b(?:Firefox|Safari)\b/.exec(T))?(T&&!z&&/[\/,]|^[^(]+?\)/.test(F.slice(F.indexOf(Y+"/")+8))&&(T=null),(Y=z||ne||he)&&(z||ne||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(he))&&(T=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(he)?he:Y)+" Browser")):T=="Electron"&&(Y=(/\bChrome\/([\d.]+)\b/.exec(F)||0)[1])&&q.push("Chromium "+Y),L||(L=rt(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",k(T),"(?:Firefox|Minefield|NetFront)"])),(Y=S=="iCab"&&parseFloat(L)>3&&"WebKit"||/\bOpera\b/.test(T)&&(/\bOPR\b/.test(F)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(F)&&!/^(?:Trident|EdgeHTML)$/.test(S)&&"WebKit"||!S&&/\bMSIE\b/i.test(F)&&(he=="Mac OS"?"Tasman":"Trident")||S=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(T)&&"NetFront")&&(S=[Y]),T=="IE"&&(Y=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(F)||0)[1])?(T+=" Mobile",he="Windows Phone "+(/\+$/.test(Y)?Y:Y+".x"),q.unshift("desktop mode")):/\bWPDesktop\b/i.test(F)?(T="IE Mobile",he="Windows Phone 8.x",q.unshift("desktop mode"),L||(L=(/\brv:([\d.]+)/.exec(F)||0)[1])):T!="IE"&&S=="Trident"&&(Y=/\brv:([\d.]+)/.exec(F))&&(T&&q.push("identifying as "+T+(L?" "+L:"")),T="IE",L=Y[1]),Q){if(_(W,"global"))if(ce&&(Y=ce.lang.System,be=Y.getProperty("os.arch"),he=he||Y.getProperty("os.name")+" "+Y.getProperty("os.version")),le){try{L=W.require("ringo/engine").version.join("."),T="RingoJS"}catch(Re){(Y=W.system)&&Y.global.system==W.system&&(T="Narwhal",he||(he=Y[0].os||null))}T||(T="Rhino")}else typeof W.process=="object"&&!W.process.browser&&(Y=W.process)&&(typeof Y.versions=="object"&&(typeof Y.versions.electron=="string"?(q.push("Node "+Y.versions.node),T="Electron",L=Y.versions.electron):typeof Y.versions.nw=="string"&&(q.push("Chromium "+L,"Node "+Y.versions.node),T="NW.js",L=Y.versions.nw)),T||(T="Node.js",be=Y.arch,he=Y.platform,L=/[\d.]+/.exec(Y.version),L=L?L[0]:null));else J(Y=W.runtime)==ee?(T="Adobe AIR",he=Y.flash.system.Capabilities.os):J(Y=W.phantom)==xe?(T="PhantomJS",L=(Y=Y.version||null)&&Y.major+"."+Y.minor+"."+Y.patch):typeof De.documentMode=="number"&&(Y=/\bTrident\/(\d+)/i.exec(F))?(L=[L,De.documentMode],(Y=+Y[1]+4)!=L[1]&&(q.push("IE "+L[1]+" mode"),S&&(S[1]=""),L[1]=Y),L=T=="IE"?String(L[1].toFixed(1)):L[0]):typeof De.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(T)&&(q.push("masking as "+T+" "+L),T="IE",L="11.0",S=["Trident"],he="Windows");he=he&&Z(he)}if(L&&(Y=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(L)||/(?:alpha|beta)(?: ?\d)?/i.exec(F+";"+(Q&&re.appMinorVersion))||/\bMinefield\b/i.test(F)&&"a")&&(V=/b/i.test(Y)?"beta":"alpha",L=L.replace(RegExp(Y+"\\+?$"),"")+(V=="beta"?Ce:ge)+(/\d+\+?/.exec(Y)||"")),T=="Fennec"||T=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(he))T="Firefox Mobile";else if(T=="Maxthon"&&L)L=L.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(z))z=="Xbox 360"&&(he=null),z=="Xbox 360"&&/\bIEMobile\b/.test(F)&&q.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(T)||T&&!z&&!/Browser|Mobi/.test(T))&&(he=="Windows CE"||/Mobi/i.test(F)))T+=" Mobile";else if(T=="IE"&&Q)try{W.external===null&&q.unshift("platform preview")}catch(Re){q.unshift("embedded")}else(/\bBlackBerry\b/.test(z)||/\bBB10\b/.test(F))&&(Y=(RegExp(z.replace(/ +/g," *")+"/([.\\d]+)","i").exec(F)||0)[1]||L)?(Y=[Y,/BB10/.test(F)],he=(Y[1]?(z=null,ne="BlackBerry"):"Device Software")+" "+Y[0],L=null):this!=M&&z!="Wii"&&(Q&&je||/Opera/.test(T)&&/\b(?:MSIE|Firefox)\b/i.test(F)||T=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(he)||T=="IE"&&(he&&!/^Win/.test(he)&&L>5.5||/\bWindows XP\b/.test(he)&&L>8||L==8&&!/\bTrident\b/.test(F)))&&!m.test(Y=K.call(M,F.replace(m,"")+";"))&&Y.name&&(Y="ing as "+Y.name+((Y=Y.version)?" "+Y:""),m.test(T)?(/\bIE\b/.test(Y)&&he=="Mac OS"&&(he=null),Y="identify"+Y):(Y="mask"+Y,fe?T=Z(fe.replace(/([a-z])([A-Z])/g,"$1 $2")):T="Opera",/\bIE\b/.test(Y)&&(he=null),Q||(L=null)),S=["Presto"],q.push(Y));(Y=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(F)||0)[1])&&(Y=[parseFloat(Y.replace(/\.(\d)$/,".0$1")),Y],T=="Safari"&&Y[1].slice(-1)=="+"?(T="WebKit Nightly",V="alpha",L=Y[1].slice(0,-1)):(L==Y[1]||L==(Y[2]=(/\bSafari\/([\d.]+\+?)/i.exec(F)||0)[1]))&&(L=null),Y[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(F)||0)[1],Y[0]==537.36&&Y[2]==537.36&&parseFloat(Y[1])>=28&&S=="WebKit"&&(S=["Blink"]),!Q||!ie&&!Y[1]?(S&&(S[1]="like Safari"),Y=(Y=Y[0],Y<400?1:Y<500?2:Y<526?3:Y<533?4:Y<534?"4+":Y<535?5:Y<537?6:Y<538?7:Y<601?8:Y<602?9:Y<604?10:Y<606?11:Y<608?12:"12")):(S&&(S[1]="like Chrome"),Y=Y[1]||(Y=Y[0],Y<530?1:Y<532?2:Y<532.05?3:Y<533?4:Y<534.03?5:Y<534.07?6:Y<534.1?7:Y<534.13?8:Y<534.16?9:Y<534.24?10:Y<534.3?11:Y<535.01?12:Y<535.02?"13+":Y<535.07?15:Y<535.11?16:Y<535.19?17:Y<536.05?18:Y<536.1?19:Y<537.01?20:Y<537.11?"21+":Y<537.13?23:Y<537.18?24:Y<537.24?25:Y<537.36?26:S!="Blink"?"27":"28")),S&&(S[1]+=" "+(Y+=typeof Y=="number"?".x":/[.+]/.test(Y)?"":"+")),T=="Safari"&&(!L||parseInt(L)>45)?L=Y:T=="Chrome"&&/\bHeadlessChrome/i.test(F)&&q.unshift("headless")),T=="Opera"&&(Y=/\bzbov|zvav$/.exec(he))?(T+=" ",q.unshift("desktop mode"),Y=="zvav"?(T+="Mini",L=null):T+="Mobile",he=he.replace(RegExp(" *"+Y+"$"),"")):T=="Safari"&&/\bChrome\b/.exec(S&&S[1])?(q.unshift("desktop mode"),T="Chrome Mobile",L=null,/\bOS X\b/.test(he)?(ne="Apple",he="iOS 4.3+"):he=null):/\bSRWare Iron\b/.test(T)&&!L&&(L=rt("Chrome")),L&&L.indexOf(Y=/[\d.]+$/.exec(he))==0&&F.indexOf("/"+Y+"-")>-1&&(he=U(he.replace(Y,""))),he&&he.indexOf(T)!=-1&&!RegExp(T+" OS").test(he)&&(he=he.replace(RegExp(" *"+k(T)+" *"),"")),S&&!/\b(?:Avant|Nook)\b/.test(T)&&(/Browser|Lunascape|Maxthon/.test(T)||T!="Safari"&&/^iOS/.test(he)&&/\bSafari\b/.test(S[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(T)&&S[1])&&(Y=S[S.length-1])&&q.push(Y),q.length&&(q=["("+q.join("; ")+")"]),ne&&z&&z.indexOf(ne)<0&&q.push("on "+ne),z&&q.push((/^on /.test(q[q.length-1])?"":"on ")+z),he&&(Y=/ ([\d.+]+)$/.exec(he),$=Y&&he.charAt(he.length-Y[0].length-1)=="/",he={architecture:32,family:Y&&!$?he.replace(Y[0],""):he,version:Y?Y[1]:null,toString:function(){var Re=this.version;return this.family+(Re&&!$?" "+Re:"")+(this.architecture==64?" 64-bit":"")}}),(Y=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(be))&&!/\bi686\b/i.test(be)?(he&&(he.architecture=64,he.family=he.family.replace(RegExp(" *"+Y),"")),T&&(/\bWOW64\b/i.test(F)||Q&&/\w(?:86|32)$/.test(re.cpuClass||re.platform)&&!/\bWin64; x64\b/i.test(F))&&q.unshift("32-bit")):he&&/^OS X/.test(he.family)&&T=="Chrome"&&parseFloat(L)>=39&&(he.architecture=64),F||(F=null);var Je={};return Je.description=F,Je.layout=S&&S[0],Je.manufacturer=ne,Je.name=T,Je.prerelease=V,Je.product=z,Je.ua=F,Je.version=T&&L,Je.os=he||{architecture:null,family:null,version:null,toString:function(){return"null"}},Je.parse=K,Je.toString=We,Je.version&&q.unshift(L),Je.name&&q.unshift(T),he&&T&&!(he==String(he).split(" ")[0]&&(he==T.split(" ")[0]||z))&&q.push(z?"("+he+")":"on "+he),q.length&&(Je.description=q.join(" ")),Je}var G=K();typeof Se=="function"&&typeof Se.amd=="object"&&Se.amd?(h.platform=G,Se(function(){return G})):g&&w?M(G,function(F,W){g[W]=F}):h.platform=G}).call(this)}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(a,N,j){(function(p){(function(){"use strict";typeof p=="undefined"||!p.version||p.version.indexOf("v0.")===0||p.version.indexOf("v1.")===0&&p.version.indexOf("v1.8.")!==0?N.exports={nextTick:c}:N.exports=p;function c(h,y,g,w){if(typeof h!="function")throw new TypeError('"callback" argument must be a function');var f=arguments.length,v,m;switch(f){case 0:case 1:return p.nextTick(h);case 2:return p.nextTick(function(){h.call(null,y)});case 3:return p.nextTick(function(){h.call(null,y,g)});case 4:return p.nextTick(function(){h.call(null,y,g,w)});default:for(v=new Array(f-1),m=0;m<v.length;)v[m++]=arguments[m];return p.nextTick(function(){h.apply(null,v)})}}}).call(this)}).call(this,a("_process"))},{_process:467}],381:[function(a,N,j){var p=N.exports={},c,h;function y(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?c=setTimeout:c=y}catch(P){c=y}try{typeof clearTimeout=="function"?h=clearTimeout:h=g}catch(P){h=g}})();function w(P){if(c===setTimeout)return setTimeout(P,0);if((c===y||!c)&&setTimeout)return c=setTimeout,setTimeout(P,0);try{return c(P,0)}catch(Z){try{return c.call(null,P,0)}catch(M){return c.call(this,P,0)}}}function f(P){if(h===clearTimeout)return clearTimeout(P);if((h===g||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(P);try{return h(P)}catch(Z){try{return h.call(null,P)}catch(M){return h.call(this,P)}}}var v=[],m=!1,b,x=-1;function R(){!m||!b||(m=!1,b.length?v=b.concat(v):x=-1,v.length&&I())}function I(){if(!m){var P=w(R);m=!0;for(var Z=v.length;Z;){for(b=v,v=[];++x<Z;)b&&b[x].run();x=-1,Z=v.length}b=null,m=!1,f(P)}}p.nextTick=function(P){var Z=new Array(arguments.length-1);if(arguments.length>1)for(var M=1;M<arguments.length;M++)Z[M-1]=arguments[M];v.push(new E(P,Z)),v.length===1&&!m&&w(I)};function E(P,Z){this.fun=P,this.array=Z}E.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={};function C(){}p.on=C,p.addListener=C,p.once=C,p.off=C,p.removeListener=C,p.removeAllListeners=C,p.emit=C,p.prependListener=C,p.prependOnceListener=C,p.listeners=function(P){return[]},p.binding=function(P){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(P){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],382:[function(a,N,j){(function(p){(function(){(function(c){var h=typeof j=="object"&&j&&!j.nodeType&&j,y=typeof N=="object"&&N&&!N.nodeType&&N,g=typeof p=="object"&&p;(g.global===g||g.window===g||g.self===g)&&(c=g);var w,f=2147483647,v=36,m=1,b=26,x=38,R=700,I=72,E=128,C="-",P=/^xn--/,Z=/[^\x20-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,J={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=v-m,k=Math.floor,B=String.fromCharCode,U;function K(me){throw new RangeError(J[me])}function G(me,xe){for(var ce=me.length,le=[];ce--;)le[ce]=xe(me[ce]);return le}function F(me,xe){var ce=me.split("@"),le="";ce.length>1&&(le=ce[0]+"@",me=ce[1]),me=me.replace(M,".");var ge=me.split("."),Ce=G(ge,xe).join(".");return le+Ce}function W(me){for(var xe=[],ce=0,le=me.length,ge,Ce;ce<le;)ge=me.charCodeAt(ce++),ge>=55296&&ge<=56319&&ce<le?(Ce=me.charCodeAt(ce++),(Ce&64512)==56320?xe.push(((ge&1023)<<10)+(Ce&1023)+65536):(xe.push(ge),ce--)):xe.push(ge);return xe}function X(me){return G(me,function(xe){var ce="";return xe>65535&&(xe-=65536,ce+=B(xe>>>10&1023|55296),xe=56320|xe&1023),ce+=B(xe),ce}).join("")}function re(me){return me-48<10?me-22:me-65<26?me-65:me-97<26?me-97:v}function oe(me,xe){return me+22+75*(me<26)-((xe!=0)<<5)}function pe(me,xe,ce){var le=0;for(me=ce?k(me/R):me>>1,me+=k(me/xe);me>_*b>>1;le+=v)me=k(me/_);return k(le+(_+1)*me/(me+x))}function ie(me){var xe=[],ce=me.length,le,ge=0,Ce=E,De=I,je,fe,Y,be,q,V,Q,L,$;for(je=me.lastIndexOf(C),je<0&&(je=0),fe=0;fe<je;++fe)me.charCodeAt(fe)>=128&&K("not-basic"),xe.push(me.charCodeAt(fe));for(Y=je>0?je+1:0;Y<ce;){for(be=ge,q=1,V=v;Y>=ce&&K("invalid-input"),Q=re(me.charCodeAt(Y++)),(Q>=v||Q>k((f-ge)/q))&&K("overflow"),ge+=Q*q,L=V<=De?m:V>=De+b?b:V-De,!(Q<L);V+=v)$=v-L,q>k(f/$)&&K("overflow"),q*=$;le=xe.length+1,De=pe(ge-be,le,be==0),k(ge/le)>f-Ce&&K("overflow"),Ce+=k(ge/le),ge%=le,xe.splice(ge++,0,Ce)}return X(xe)}function Ie(me){var xe,ce,le,ge,Ce,De,je,fe,Y,be,q,V=[],Q,L,$,S;for(me=W(me),Q=me.length,xe=E,ce=0,Ce=I,De=0;De<Q;++De)q=me[De],q<128&&V.push(B(q));for(le=ge=V.length,ge&&V.push(C);le<Q;){for(je=f,De=0;De<Q;++De)q=me[De],q>=xe&&q<je&&(je=q);for(L=le+1,je-xe>k((f-ce)/L)&&K("overflow"),ce+=(je-xe)*L,xe=je,De=0;De<Q;++De)if(q=me[De],q<xe&&++ce>f&&K("overflow"),q==xe){for(fe=ce,Y=v;be=Y<=Ce?m:Y>=Ce+b?b:Y-Ce,!(fe<be);Y+=v)S=fe-be,$=v-be,V.push(B(oe(be+S%$,0))),fe=k(S/$);V.push(B(oe(fe,0))),Ce=pe(ce,L,le==ge),ce=0,++le}++ce,++xe}return V.join("")}function ee(me){return F(me,function(xe){return P.test(xe)?ie(xe.slice(4).toLowerCase()):xe})}function de(me){return F(me,function(xe){return Z.test(xe)?"xn--"+Ie(xe):xe})}if(w={version:"1.4.1",ucs2:{decode:W,encode:X},decode:ie,encode:Ie,toASCII:de,toUnicode:ee},typeof Se=="function"&&typeof Se.amd=="object"&&Se.amd)Se("punycode",function(){return w});else if(h&&y)if(N.exports==h)y.exports=w;else for(U in w)w.hasOwnProperty(U)&&(h[U]=w[U]);else c.punycode=w})(this)}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(a,N,j){"use strict";function p(h,y){return Object.prototype.hasOwnProperty.call(h,y)}N.exports=function(h,y,g,w){y=y||"&",g=g||"=";var f={};if(typeof h!="string"||h.length===0)return f;var v=/\+/g;h=h.split(y);var m=1e3;w&&typeof w.maxKeys=="number"&&(m=w.maxKeys);var b=h.length;m>0&&b>m&&(b=m);for(var x=0;x<b;++x){var R=h[x].replace(v,"%20"),I=R.indexOf(g),E,C,P,Z;I>=0?(E=R.substr(0,I),C=R.substr(I+1)):(E=R,C=""),P=decodeURIComponent(E),Z=decodeURIComponent(C),p(f,P)?c(f[P])?f[P].push(Z):f[P]=[f[P],Z]:f[P]=Z}return f};var c=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"}},{}],384:[function(a,N,j){"use strict";var p=function(g){switch(typeof g){case"string":return g;case"boolean":return g?"true":"false";case"number":return isFinite(g)?g:"";default:return""}};N.exports=function(g,w,f,v){return w=w||"&",f=f||"=",g===null&&(g=void 0),typeof g=="object"?h(y(g),function(m){var b=encodeURIComponent(p(m))+f;return c(g[m])?h(g[m],function(x){return b+encodeURIComponent(p(x))}).join(w):b+encodeURIComponent(p(g[m]))}).join(w):v?encodeURIComponent(p(v))+f+encodeURIComponent(p(g)):""};var c=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"};function h(g,w){if(g.map)return g.map(w);for(var f=[],v=0;v<g.length;v++)f.push(w(g[v],v));return f}var y=Object.keys||function(g){var w=[];for(var f in g)Object.prototype.hasOwnProperty.call(g,f)&&w.push(f);return w}},{}],385:[function(a,N,j){"use strict";j.decode=j.parse=a("./decode"),j.encode=j.stringify=a("./encode")},{"./decode":383,"./encode":384}],386:[function(a,N,j){"use strict";var p=a("process-nextick-args"),c=Object.keys||function(R){var I=[];for(var E in R)I.push(E);return I};N.exports=m;var h=Object.create(a("core-util-is"));h.inherits=a("inherits");var y=a("./_stream_readable"),g=a("./_stream_writable");h.inherits(m,y);for(var w=c(g.prototype),f=0;f<w.length;f++){var v=w[f];m.prototype[v]||(m.prototype[v]=g.prototype[v])}function m(R){if(!(this instanceof m))return new m(R);y.call(this,R),g.call(this,R),R&&R.readable===!1&&(this.readable=!1),R&&R.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,R&&R.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",b)}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function b(){this.allowHalfOpen||this._writableState.ended||p.nextTick(x,this)}function x(R){R.end()}Object.defineProperty(m.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(R){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=R,this._writableState.destroyed=R)}}),m.prototype._destroy=function(R,I){this.push(null),this.end(),p.nextTick(I,R)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(a,N,j){"use strict";N.exports=h;var p=a("./_stream_transform"),c=Object.create(a("core-util-is"));c.inherits=a("inherits"),c.inherits(h,p);function h(y){if(!(this instanceof h))return new h(y);p.call(this,y)}h.prototype._transform=function(y,g,w){w(null,y)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(a,N,j){(function(p,c){(function(){"use strict";var h=a("process-nextick-args");N.exports=B;var y=a("isarray"),g;B.ReadableState=k;var w=a("events").EventEmitter,f=function(q,V){return q.listeners(V).length},v=a("./internal/streams/stream"),m=a("safe-buffer").Buffer,b=c.Uint8Array||function(){};function x(q){return m.from(q)}function R(q){return m.isBuffer(q)||q instanceof b}var I=Object.create(a("core-util-is"));I.inherits=a("inherits");var E=a("util"),C=void 0;E&&E.debuglog?C=E.debuglog("stream"):C=function(){};var P=a("./internal/streams/BufferList"),Z=a("./internal/streams/destroy"),M;I.inherits(B,v);var J=["error","close","destroy","pause","resume"];function _(q,V,Q){if(typeof q.prependListener=="function")return q.prependListener(V,Q);!q._events||!q._events[V]?q.on(V,Q):y(q._events[V])?q._events[V].unshift(Q):q._events[V]=[Q,q._events[V]]}function k(q,V){g=g||a("./_stream_duplex"),q=q||{};var Q=V instanceof g;this.objectMode=!!q.objectMode,Q&&(this.objectMode=this.objectMode||!!q.readableObjectMode);var L=q.highWaterMark,$=q.readableHighWaterMark,S=this.objectMode?16:16*1024;L||L===0?this.highWaterMark=L:Q&&($||$===0)?this.highWaterMark=$:this.highWaterMark=S,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new P,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(M||(M=a("string_decoder/").StringDecoder),this.decoder=new M(q.encoding),this.encoding=q.encoding)}function B(q){if(g=g||a("./_stream_duplex"),!(this instanceof B))return new B(q);this._readableState=new k(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),v.call(this)}Object.defineProperty(B.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(q){this._readableState&&(this._readableState.destroyed=q)}}),B.prototype.destroy=Z.destroy,B.prototype._undestroy=Z.undestroy,B.prototype._destroy=function(q,V){this.push(null),V(q)},B.prototype.push=function(q,V){var Q=this._readableState,L;return Q.objectMode?L=!0:typeof q=="string"&&(V=V||Q.defaultEncoding,V!==Q.encoding&&(q=m.from(q,V),V=""),L=!0),U(this,q,V,!1,L)},B.prototype.unshift=function(q){return U(this,q,null,!0,!1)};function U(q,V,Q,L,$){var S=q._readableState;if(V===null)S.reading=!1,oe(q,S);else{var T;$||(T=G(S,V)),T?q.emit("error",T):S.objectMode||V&&V.length>0?(typeof V!="string"&&!S.objectMode&&Object.getPrototypeOf(V)!==m.prototype&&(V=x(V)),L?S.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):K(q,S,V,!0):S.ended?q.emit("error",new Error("stream.push() after EOF")):(S.reading=!1,S.decoder&&!Q?(V=S.decoder.write(V),S.objectMode||V.length!==0?K(q,S,V,!1):Ie(q,S)):K(q,S,V,!1))):L||(S.reading=!1)}return F(S)}function K(q,V,Q,L){V.flowing&&V.length===0&&!V.sync?(q.emit("data",Q),q.read(0)):(V.length+=V.objectMode?1:Q.length,L?V.buffer.unshift(Q):V.buffer.push(Q),V.needReadable&&pe(q)),Ie(q,V)}function G(q,V){var Q;return!R(V)&&typeof V!="string"&&V!==void 0&&!q.objectMode&&(Q=new TypeError("Invalid non-string/buffer chunk")),Q}function F(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(q){return M||(M=a("string_decoder/").StringDecoder),this._readableState.decoder=new M(q),this._readableState.encoding=q,this};var W=8388608;function X(q){return q>=W?q=W:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function re(q,V){return q<=0||V.length===0&&V.ended?0:V.objectMode?1:q!==q?V.flowing&&V.length?V.buffer.head.data.length:V.length:(q>V.highWaterMark&&(V.highWaterMark=X(q)),q<=V.length?q:V.ended?V.length:(V.needReadable=!0,0))}B.prototype.read=function(q){C("read",q),q=parseInt(q,10);var V=this._readableState,Q=q;if(q!==0&&(V.emittedReadable=!1),q===0&&V.needReadable&&(V.length>=V.highWaterMark||V.ended))return C("read: emitReadable",V.length,V.ended),V.length===0&&V.ended?fe(this):pe(this),null;if(q=re(q,V),q===0&&V.ended)return V.length===0&&fe(this),null;var L=V.needReadable;C("need readable",L),(V.length===0||V.length-q<V.highWaterMark)&&(L=!0,C("length less than watermark",L)),V.ended||V.reading?(L=!1,C("reading or ended",L)):L&&(C("do read"),V.reading=!0,V.sync=!0,V.length===0&&(V.needReadable=!0),this._read(V.highWaterMark),V.sync=!1,V.reading||(q=re(Q,V)));var $;return q>0?$=ge(q,V):$=null,$===null?(V.needReadable=!0,q=0):V.length-=q,V.length===0&&(V.ended||(V.needReadable=!0),Q!==q&&V.ended&&fe(this)),$!==null&&this.emit("data",$),$};function oe(q,V){if(!V.ended){if(V.decoder){var Q=V.decoder.end();Q&&Q.length&&(V.buffer.push(Q),V.length+=V.objectMode?1:Q.length)}V.ended=!0,pe(q)}}function pe(q){var V=q._readableState;V.needReadable=!1,V.emittedReadable||(C("emitReadable",V.flowing),V.emittedReadable=!0,V.sync?h.nextTick(ie,q):ie(q))}function ie(q){C("emit readable"),q.emit("readable"),le(q)}function Ie(q,V){V.readingMore||(V.readingMore=!0,h.nextTick(ee,q,V))}function ee(q,V){for(var Q=V.length;!V.reading&&!V.flowing&&!V.ended&&V.length<V.highWaterMark&&(C("maybeReadMore read 0"),q.read(0),Q!==V.length);)Q=V.length;V.readingMore=!1}B.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},B.prototype.pipe=function(q,V){var Q=this,L=this._readableState;switch(L.pipesCount){case 0:L.pipes=q;break;case 1:L.pipes=[L.pipes,q];break;default:L.pipes.push(q);break}L.pipesCount+=1,C("pipe count=%d opts=%j",L.pipesCount,V);var $=(!V||V.end!==!1)&&q!==p.stdout&&q!==p.stderr,S=$?z:We;L.endEmitted?h.nextTick(S):Q.once("end",S),q.on("unpipe",T);function T(Je,Re){C("onunpipe"),Je===Q&&Re&&Re.hasUnpiped===!1&&(Re.hasUnpiped=!0,Pe())}function z(){C("onend"),q.end()}var ne=de(Q);q.on("drain",ne);var he=!1;function Pe(){C("cleanup"),q.removeListener("close",Qe),q.removeListener("finish",rt),q.removeListener("drain",ne),q.removeListener("error",nt),q.removeListener("unpipe",T),Q.removeListener("end",z),Q.removeListener("end",We),Q.removeListener("data",Ue),he=!0,L.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&ne()}var Oe=!1;Q.on("data",Ue);function Ue(Je){C("ondata"),Oe=!1;var Re=q.write(Je);Re===!1&&!Oe&&((L.pipesCount===1&&L.pipes===q||L.pipesCount>1&&be(L.pipes,q)!==-1)&&!he&&(C("false write response, pause",Q._readableState.awaitDrain),Q._readableState.awaitDrain++,Oe=!0),Q.pause())}function nt(Je){C("onerror",Je),We(),q.removeListener("error",nt),f(q,"error")===0&&q.emit("error",Je)}_(q,"error",nt);function Qe(){q.removeListener("finish",rt),We()}q.once("close",Qe);function rt(){C("onfinish"),q.removeListener("close",Qe),We()}q.once("finish",rt);function We(){C("unpipe"),Q.unpipe(q)}return q.emit("pipe",Q),L.flowing||(C("pipe resume"),Q.resume()),q};function de(q){return function(){var V=q._readableState;C("pipeOnDrain",V.awaitDrain),V.awaitDrain&&V.awaitDrain--,V.awaitDrain===0&&f(q,"data")&&(V.flowing=!0,le(q))}}B.prototype.unpipe=function(q){var V=this._readableState,Q={hasUnpiped:!1};if(V.pipesCount===0)return this;if(V.pipesCount===1)return q&&q!==V.pipes?this:(q||(q=V.pipes),V.pipes=null,V.pipesCount=0,V.flowing=!1,q&&q.emit("unpipe",this,Q),this);if(!q){var L=V.pipes,$=V.pipesCount;V.pipes=null,V.pipesCount=0,V.flowing=!1;for(var S=0;S<$;S++)L[S].emit("unpipe",this,Q);return this}var T=be(V.pipes,q);return T===-1?this:(V.pipes.splice(T,1),V.pipesCount-=1,V.pipesCount===1&&(V.pipes=V.pipes[0]),q.emit("unpipe",this,Q),this)},B.prototype.on=function(q,V){var Q=v.prototype.on.call(this,q,V);if(q==="data")this._readableState.flowing!==!1&&this.resume();else if(q==="readable"){var L=this._readableState;!L.endEmitted&&!L.readableListening&&(L.readableListening=L.needReadable=!0,L.emittedReadable=!1,L.reading?L.length&&pe(this):h.nextTick(me,this))}return Q},B.prototype.addListener=B.prototype.on;function me(q){C("readable nexttick read 0"),q.read(0)}B.prototype.resume=function(){var q=this._readableState;return q.flowing||(C("resume"),q.flowing=!0,xe(this,q)),this};function xe(q,V){V.resumeScheduled||(V.resumeScheduled=!0,h.nextTick(ce,q,V))}function ce(q,V){V.reading||(C("resume read 0"),q.read(0)),V.resumeScheduled=!1,V.awaitDrain=0,q.emit("resume"),le(q),V.flowing&&!V.reading&&q.read(0)}B.prototype.pause=function(){return C("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(C("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function le(q){var V=q._readableState;for(C("flow",V.flowing);V.flowing&&q.read()!==null;);}B.prototype.wrap=function(q){var V=this,Q=this._readableState,L=!1;q.on("end",function(){if(C("wrapped end"),Q.decoder&&!Q.ended){var T=Q.decoder.end();T&&T.length&&V.push(T)}V.push(null)}),q.on("data",function(T){if(C("wrapped data"),Q.decoder&&(T=Q.decoder.write(T)),!(Q.objectMode&&T==null)&&!(!Q.objectMode&&(!T||!T.length))){var z=V.push(T);z||(L=!0,q.pause())}});for(var $ in q)this[$]===void 0&&typeof q[$]=="function"&&(this[$]=function(T){return function(){return q[T].apply(q,arguments)}}($));for(var S=0;S<J.length;S++)q.on(J[S],this.emit.bind(this,J[S]));return this._read=function(T){C("wrapped _read",T),L&&(L=!1,q.resume())},this},Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),B._fromList=ge;function ge(q,V){if(V.length===0)return null;var Q;return V.objectMode?Q=V.buffer.shift():!q||q>=V.length?(V.decoder?Q=V.buffer.join(""):V.buffer.length===1?Q=V.buffer.head.data:Q=V.buffer.concat(V.length),V.buffer.clear()):Q=Ce(q,V.buffer,V.decoder),Q}function Ce(q,V,Q){var L;return q<V.head.data.length?(L=V.head.data.slice(0,q),V.head.data=V.head.data.slice(q)):q===V.head.data.length?L=V.shift():L=Q?De(q,V):je(q,V),L}function De(q,V){var Q=V.head,L=1,$=Q.data;for(q-=$.length;Q=Q.next;){var S=Q.data,T=q>S.length?S.length:q;if(T===S.length?$+=S:$+=S.slice(0,q),q-=T,q===0){T===S.length?(++L,Q.next?V.head=Q.next:V.head=V.tail=null):(V.head=Q,Q.data=S.slice(T));break}++L}return V.length-=L,$}function je(q,V){var Q=m.allocUnsafe(q),L=V.head,$=1;for(L.data.copy(Q),q-=L.data.length;L=L.next;){var S=L.data,T=q>S.length?S.length:q;if(S.copy(Q,Q.length-q,0,T),q-=T,q===0){T===S.length?(++$,L.next?V.head=L.next:V.head=V.tail=null):(V.head=L,L.data=S.slice(T));break}++$}return V.length-=$,Q}function fe(q){var V=q._readableState;if(V.length>0)throw new Error('"endReadable()" called on non-empty stream');V.endEmitted||(V.ended=!0,h.nextTick(Y,V,q))}function Y(q,V){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,V.readable=!1,V.emit("end"))}function be(q,V){for(var Q=0,L=q.length;Q<L;Q++)if(q[Q]===V)return Q;return-1}}).call(this)}).call(this,a("_process"),typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(a,N,j){"use strict";N.exports=y;var p=a("./_stream_duplex"),c=Object.create(a("core-util-is"));c.inherits=a("inherits"),c.inherits(y,p);function h(f,v){var m=this._transformState;m.transforming=!1;var b=m.writecb;if(!b)return this.emit("error",new Error("write callback called multiple times"));m.writechunk=null,m.writecb=null,v!=null&&this.push(v),b(f);var x=this._readableState;x.reading=!1,(x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}function y(f){if(!(this instanceof y))return new y(f);p.call(this,f),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",g)}function g(){var f=this;typeof this._flush=="function"?this._flush(function(v,m){w(f,v,m)}):w(this,null,null)}y.prototype.push=function(f,v){return this._transformState.needTransform=!1,p.prototype.push.call(this,f,v)},y.prototype._transform=function(f,v,m){throw new Error("_transform() is not implemented")},y.prototype._write=function(f,v,m){var b=this._transformState;if(b.writecb=m,b.writechunk=f,b.writeencoding=v,!b.transforming){var x=this._readableState;(b.needTransform||x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}},y.prototype._read=function(f){var v=this._transformState;v.writechunk!==null&&v.writecb&&!v.transforming?(v.transforming=!0,this._transform(v.writechunk,v.writeencoding,v.afterTransform)):v.needTransform=!0},y.prototype._destroy=function(f,v){var m=this;p.prototype._destroy.call(this,f,function(b){v(b),m.emit("close")})};function w(f,v,m){if(v)return f.emit("error",v);if(m!=null&&f.push(m),f._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(f._transformState.transforming)throw new Error("Calling transform done when still transforming");return f.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(a,N,j){(function(p,c,h){(function(){"use strict";var y=a("process-nextick-args");N.exports=_;function g(ce,le,ge){this.chunk=ce,this.encoding=le,this.callback=ge,this.next=null}function w(ce){var le=this;this.next=null,this.entry=null,this.finish=function(){xe(le,ce)}}var f=!p.browser&&["v0.10","v0.9."].indexOf(p.version.slice(0,5))>-1?h:y.nextTick,v;_.WritableState=M;var m=Object.create(a("core-util-is"));m.inherits=a("inherits");var b={deprecate:a("util-deprecate")},x=a("./internal/streams/stream"),R=a("safe-buffer").Buffer,I=c.Uint8Array||function(){};function E(ce){return R.from(ce)}function C(ce){return R.isBuffer(ce)||ce instanceof I}var P=a("./internal/streams/destroy");m.inherits(_,x);function Z(){}function M(ce,le){v=v||a("./_stream_duplex"),ce=ce||{};var ge=le instanceof v;this.objectMode=!!ce.objectMode,ge&&(this.objectMode=this.objectMode||!!ce.writableObjectMode);var Ce=ce.highWaterMark,De=ce.writableHighWaterMark,je=this.objectMode?16:16*1024;Ce||Ce===0?this.highWaterMark=Ce:ge&&(De||De===0)?this.highWaterMark=De:this.highWaterMark=je,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var fe=ce.decodeStrings===!1;this.decodeStrings=!fe,this.defaultEncoding=ce.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){X(le,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}M.prototype.getBuffer=function(){for(var le=this.bufferedRequest,ge=[];le;)ge.push(le),le=le.next;return ge},function(){try{Object.defineProperty(M.prototype,"buffer",{get:b.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ce){}}();var J;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(J=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(ce){return J.call(this,ce)?!0:this!==_?!1:ce&&ce._writableState instanceof M}})):J=function(ce){return ce instanceof this};function _(ce){if(v=v||a("./_stream_duplex"),!J.call(_,this)&&!(this instanceof v))return new _(ce);this._writableState=new M(ce,this),this.writable=!0,ce&&(typeof ce.write=="function"&&(this._write=ce.write),typeof ce.writev=="function"&&(this._writev=ce.writev),typeof ce.destroy=="function"&&(this._destroy=ce.destroy),typeof ce.final=="function"&&(this._final=ce.final)),x.call(this)}_.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function k(ce,le){var ge=new Error("write after end");ce.emit("error",ge),y.nextTick(le,ge)}function B(ce,le,ge,Ce){var De=!0,je=!1;return ge===null?je=new TypeError("May not write null values to stream"):typeof ge!="string"&&ge!==void 0&&!le.objectMode&&(je=new TypeError("Invalid non-string/buffer chunk")),je&&(ce.emit("error",je),y.nextTick(Ce,je),De=!1),De}_.prototype.write=function(ce,le,ge){var Ce=this._writableState,De=!1,je=!Ce.objectMode&&C(ce);return je&&!R.isBuffer(ce)&&(ce=E(ce)),typeof le=="function"&&(ge=le,le=null),je?le="buffer":le||(le=Ce.defaultEncoding),typeof ge!="function"&&(ge=Z),Ce.ended?k(this,ge):(je||B(this,Ce,ce,ge))&&(Ce.pendingcb++,De=K(this,Ce,je,ce,le,ge)),De},_.prototype.cork=function(){var ce=this._writableState;ce.corked++},_.prototype.uncork=function(){var ce=this._writableState;ce.corked&&(ce.corked--,!ce.writing&&!ce.corked&&!ce.finished&&!ce.bufferProcessing&&ce.bufferedRequest&&pe(this,ce))},_.prototype.setDefaultEncoding=function(le){if(typeof le=="string"&&(le=le.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((le+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+le);return this._writableState.defaultEncoding=le,this};function U(ce,le,ge){return!ce.objectMode&&ce.decodeStrings!==!1&&typeof le=="string"&&(le=R.from(le,ge)),le}Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(ce,le,ge,Ce,De,je){if(!ge){var fe=U(le,Ce,De);Ce!==fe&&(ge=!0,De="buffer",Ce=fe)}var Y=le.objectMode?1:Ce.length;le.length+=Y;var be=le.length<le.highWaterMark;if(be||(le.needDrain=!0),le.writing||le.corked){var q=le.lastBufferedRequest;le.lastBufferedRequest={chunk:Ce,encoding:De,isBuf:ge,callback:je,next:null},q?q.next=le.lastBufferedRequest:le.bufferedRequest=le.lastBufferedRequest,le.bufferedRequestCount+=1}else G(ce,le,!1,Y,Ce,De,je);return be}function G(ce,le,ge,Ce,De,je,fe){le.writelen=Ce,le.writecb=fe,le.writing=!0,le.sync=!0,ge?ce._writev(De,le.onwrite):ce._write(De,je,le.onwrite),le.sync=!1}function F(ce,le,ge,Ce,De){--le.pendingcb,ge?(y.nextTick(De,Ce),y.nextTick(de,ce,le),ce._writableState.errorEmitted=!0,ce.emit("error",Ce)):(De(Ce),ce._writableState.errorEmitted=!0,ce.emit("error",Ce),de(ce,le))}function W(ce){ce.writing=!1,ce.writecb=null,ce.length-=ce.writelen,ce.writelen=0}function X(ce,le){var ge=ce._writableState,Ce=ge.sync,De=ge.writecb;if(W(ge),le)F(ce,ge,Ce,le,De);else{var je=ie(ge);!je&&!ge.corked&&!ge.bufferProcessing&&ge.bufferedRequest&&pe(ce,ge),Ce?f(re,ce,ge,je,De):re(ce,ge,je,De)}}function re(ce,le,ge,Ce){ge||oe(ce,le),le.pendingcb--,Ce(),de(ce,le)}function oe(ce,le){le.length===0&&le.needDrain&&(le.needDrain=!1,ce.emit("drain"))}function pe(ce,le){le.bufferProcessing=!0;var ge=le.bufferedRequest;if(ce._writev&&ge&&ge.next){var Ce=le.bufferedRequestCount,De=new Array(Ce),je=le.corkedRequestsFree;je.entry=ge;for(var fe=0,Y=!0;ge;)De[fe]=ge,ge.isBuf||(Y=!1),ge=ge.next,fe+=1;De.allBuffers=Y,G(ce,le,!0,le.length,De,"",je.finish),le.pendingcb++,le.lastBufferedRequest=null,je.next?(le.corkedRequestsFree=je.next,je.next=null):le.corkedRequestsFree=new w(le),le.bufferedRequestCount=0}else{for(;ge;){var be=ge.chunk,q=ge.encoding,V=ge.callback,Q=le.objectMode?1:be.length;if(G(ce,le,!1,Q,be,q,V),ge=ge.next,le.bufferedRequestCount--,le.writing)break}ge===null&&(le.lastBufferedRequest=null)}le.bufferedRequest=ge,le.bufferProcessing=!1}_.prototype._write=function(ce,le,ge){ge(new Error("_write() is not implemented"))},_.prototype._writev=null,_.prototype.end=function(ce,le,ge){var Ce=this._writableState;typeof ce=="function"?(ge=ce,ce=null,le=null):typeof le=="function"&&(ge=le,le=null),ce!=null&&this.write(ce,le),Ce.corked&&(Ce.corked=1,this.uncork()),!Ce.ending&&!Ce.finished&&me(this,Ce,ge)};function ie(ce){return ce.ending&&ce.length===0&&ce.bufferedRequest===null&&!ce.finished&&!ce.writing}function Ie(ce,le){ce._final(function(ge){le.pendingcb--,ge&&ce.emit("error",ge),le.prefinished=!0,ce.emit("prefinish"),de(ce,le)})}function ee(ce,le){!le.prefinished&&!le.finalCalled&&(typeof ce._final=="function"?(le.pendingcb++,le.finalCalled=!0,y.nextTick(Ie,ce,le)):(le.prefinished=!0,ce.emit("prefinish")))}function de(ce,le){var ge=ie(le);return ge&&(ee(ce,le),le.pendingcb===0&&(le.finished=!0,ce.emit("finish"))),ge}function me(ce,le,ge){le.ending=!0,de(ce,le),ge&&(le.finished?y.nextTick(ge):ce.once("finish",ge)),le.ended=!0,ce.writable=!1}function xe(ce,le,ge){var Ce=ce.entry;for(ce.entry=null;Ce;){var De=Ce.callback;le.pendingcb--,De(ge),Ce=Ce.next}le.corkedRequestsFree?le.corkedRequestsFree.next=ce:le.corkedRequestsFree=ce}Object.defineProperty(_.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ce){this._writableState&&(this._writableState.destroyed=ce)}}),_.prototype.destroy=P.destroy,_.prototype._undestroy=P.undestroy,_.prototype._destroy=function(ce,le){this.end(),le(ce)}}).call(this)}).call(this,a("_process"),typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{},a("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(a,N,j){"use strict";function p(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")}var c=a("safe-buffer").Buffer,h=a("util");function y(g,w,f){g.copy(w,f)}N.exports=function(){function g(){p(this,g),this.head=null,this.tail=null,this.length=0}return g.prototype.push=function(f){var v={data:f,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length},g.prototype.unshift=function(f){var v={data:f,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length},g.prototype.shift=function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}},g.prototype.clear=function(){this.head=this.tail=null,this.length=0},g.prototype.join=function(f){if(this.length===0)return"";for(var v=this.head,m=""+v.data;v=v.next;)m+=f+v.data;return m},g.prototype.concat=function(f){if(this.length===0)return c.alloc(0);if(this.length===1)return this.head.data;for(var v=c.allocUnsafe(f>>>0),m=this.head,b=0;m;)y(m.data,v,b),b+=m.data.length,m=m.next;return v},g}(),h&&h.inspect&&h.inspect.custom&&(N.exports.prototype[h.inspect.custom]=function(){var g=h.inspect({length:this.length});return this.constructor.name+" "+g})},{"safe-buffer":396,util:89}],392:[function(a,N,j){"use strict";var p=a("process-nextick-args");function c(g,w){var f=this,v=this._readableState&&this._readableState.destroyed,m=this._writableState&&this._writableState.destroyed;return v||m?(w?w(g):g&&(!this._writableState||!this._writableState.errorEmitted)&&p.nextTick(y,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(b){!w&&b?(p.nextTick(y,f,b),f._writableState&&(f._writableState.errorEmitted=!0)):w&&w(b)}),this)}function h(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function y(g,w){g.emit("error",w)}N.exports={destroy:c,undestroy:h}},{"process-nextick-args":380}],393:[function(a,N,j){N.exports=a("events").EventEmitter},{events:344}],394:[function(a,N,j){j=N.exports=a("./lib/_stream_readable.js"),j.Stream=j,j.Readable=j,j.Writable=a("./lib/_stream_writable.js"),j.Duplex=a("./lib/_stream_duplex.js"),j.Transform=a("./lib/_stream_transform.js"),j.PassThrough=a("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(a,N,j){var p=function(c){"use strict";var h=Object.prototype,y=h.hasOwnProperty,g,w=typeof Symbol=="function"?Symbol:{},f=w.iterator||"@@iterator",v=w.asyncIterator||"@@asyncIterator",m=w.toStringTag||"@@toStringTag";function b(ee,de,me){return Object.defineProperty(ee,de,{value:me,enumerable:!0,configurable:!0,writable:!0}),ee[de]}try{b({},"")}catch(ee){b=function(de,me,xe){return de[me]=xe}}function x(ee,de,me,xe){var ce=de&&de.prototype instanceof M?de:M,le=Object.create(ce.prototype),ge=new pe(xe||[]);return le._invoke=W(ee,me,ge),le}c.wrap=x;function R(ee,de,me){try{return{type:"normal",arg:ee.call(de,me)}}catch(xe){return{type:"throw",arg:xe}}}var I="suspendedStart",E="suspendedYield",C="executing",P="completed",Z={};function M(){}function J(){}function _(){}var k={};b(k,f,function(){return this});var B=Object.getPrototypeOf,U=B&&B(B(ie([])));U&&U!==h&&y.call(U,f)&&(k=U);var K=_.prototype=M.prototype=Object.create(k);J.prototype=_,b(K,"constructor",_),b(_,"constructor",J),J.displayName=b(_,m,"GeneratorFunction");function G(ee){["next","throw","return"].forEach(function(de){b(ee,de,function(me){return this._invoke(de,me)})})}c.isGeneratorFunction=function(ee){var de=typeof ee=="function"&&ee.constructor;return de?de===J||(de.displayName||de.name)==="GeneratorFunction":!1},c.mark=function(ee){return Object.setPrototypeOf?Object.setPrototypeOf(ee,_):(ee.__proto__=_,b(ee,m,"GeneratorFunction")),ee.prototype=Object.create(K),ee},c.awrap=function(ee){return{__await:ee}};function F(ee,de){function me(le,ge,Ce,De){var je=R(ee[le],ee,ge);if(je.type==="throw")De(je.arg);else{var fe=je.arg,Y=fe.value;return Y&&typeof Y=="object"&&y.call(Y,"__await")?de.resolve(Y.__await).then(function(be){me("next",be,Ce,De)},function(be){me("throw",be,Ce,De)}):de.resolve(Y).then(function(be){fe.value=be,Ce(fe)},function(be){return me("throw",be,Ce,De)})}}var xe;function ce(le,ge){function Ce(){return new de(function(De,je){me(le,ge,De,je)})}return xe=xe?xe.then(Ce,Ce):Ce()}this._invoke=ce}G(F.prototype),b(F.prototype,v,function(){return this}),c.AsyncIterator=F,c.async=function(ee,de,me,xe,ce){ce===void 0&&(ce=Promise);var le=new F(x(ee,de,me,xe),ce);return c.isGeneratorFunction(de)?le:le.next().then(function(ge){return ge.done?ge.value:le.next()})};function W(ee,de,me){var xe=I;return function(le,ge){if(xe===C)throw new Error("Generator is already running");if(xe===P){if(le==="throw")throw ge;return Ie()}for(me.method=le,me.arg=ge;;){var Ce=me.delegate;if(Ce){var De=X(Ce,me);if(De){if(De===Z)continue;return De}}if(me.method==="next")me.sent=me._sent=me.arg;else if(me.method==="throw"){if(xe===I)throw xe=P,me.arg;me.dispatchException(me.arg)}else me.method==="return"&&me.abrupt("return",me.arg);xe=C;var je=R(ee,de,me);if(je.type==="normal"){if(xe=me.done?P:E,je.arg===Z)continue;return{value:je.arg,done:me.done}}else je.type==="throw"&&(xe=P,me.method="throw",me.arg=je.arg)}}}function X(ee,de){var me=ee.iterator[de.method];if(me===g){if(de.delegate=null,de.method==="throw"){if(ee.iterator.return&&(de.method="return",de.arg=g,X(ee,de),de.method==="throw"))return Z;de.method="throw",de.arg=new TypeError("The iterator does not provide a 'throw' method")}return Z}var xe=R(me,ee.iterator,de.arg);if(xe.type==="throw")return de.method="throw",de.arg=xe.arg,de.delegate=null,Z;var ce=xe.arg;if(!ce)return de.method="throw",de.arg=new TypeError("iterator result is not an object"),de.delegate=null,Z;if(ce.done)de[ee.resultName]=ce.value,de.next=ee.nextLoc,de.method!=="return"&&(de.method="next",de.arg=g);else return ce;return de.delegate=null,Z}G(K),b(K,m,"Generator"),b(K,f,function(){return this}),b(K,"toString",function(){return"[object Generator]"});function re(ee){var de={tryLoc:ee[0]};1 in ee&&(de.catchLoc=ee[1]),2 in ee&&(de.finallyLoc=ee[2],de.afterLoc=ee[3]),this.tryEntries.push(de)}function oe(ee){var de=ee.completion||{};de.type="normal",delete de.arg,ee.completion=de}function pe(ee){this.tryEntries=[{tryLoc:"root"}],ee.forEach(re,this),this.reset(!0)}c.keys=function(ee){var de=[];for(var me in ee)de.push(me);return de.reverse(),function xe(){for(;de.length;){var ce=de.pop();if(ce in ee)return xe.value=ce,xe.done=!1,xe}return xe.done=!0,xe}};function ie(ee){if(ee){var de=ee[f];if(de)return de.call(ee);if(typeof ee.next=="function")return ee;if(!isNaN(ee.length)){var me=-1,xe=function ce(){for(;++me<ee.length;)if(y.call(ee,me))return ce.value=ee[me],ce.done=!1,ce;return ce.value=g,ce.done=!0,ce};return xe.next=xe}}return{next:Ie}}c.values=ie;function Ie(){return{value:g,done:!0}}return pe.prototype={constructor:pe,reset:function(ee){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(oe),!ee)for(var de in this)de.charAt(0)==="t"&&y.call(this,de)&&!isNaN(+de.slice(1))&&(this[de]=g)},stop:function(){this.done=!0;var ee=this.tryEntries[0],de=ee.completion;if(de.type==="throw")throw de.arg;return this.rval},dispatchException:function(ee){if(this.done)throw ee;var de=this;function me(De,je){return le.type="throw",le.arg=ee,de.next=De,je&&(de.method="next",de.arg=g),!!je}for(var xe=this.tryEntries.length-1;xe>=0;--xe){var ce=this.tryEntries[xe],le=ce.completion;if(ce.tryLoc==="root")return me("end");if(ce.tryLoc<=this.prev){var ge=y.call(ce,"catchLoc"),Ce=y.call(ce,"finallyLoc");if(ge&&Ce){if(this.prev<ce.catchLoc)return me(ce.catchLoc,!0);if(this.prev<ce.finallyLoc)return me(ce.finallyLoc)}else if(ge){if(this.prev<ce.catchLoc)return me(ce.catchLoc,!0)}else if(Ce){if(this.prev<ce.finallyLoc)return me(ce.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(ee,de){for(var me=this.tryEntries.length-1;me>=0;--me){var xe=this.tryEntries[me];if(xe.tryLoc<=this.prev&&y.call(xe,"finallyLoc")&&this.prev<xe.finallyLoc){var ce=xe;break}}ce&&(ee==="break"||ee==="continue")&&ce.tryLoc<=de&&de<=ce.finallyLoc&&(ce=null);var le=ce?ce.completion:{};return le.type=ee,le.arg=de,ce?(this.method="next",this.next=ce.finallyLoc,Z):this.complete(le)},complete:function(ee,de){if(ee.type==="throw")throw ee.arg;return ee.type==="break"||ee.type==="continue"?this.next=ee.arg:ee.type==="return"?(this.rval=this.arg=ee.arg,this.method="return",this.next="end"):ee.type==="normal"&&de&&(this.next=de),Z},finish:function(ee){for(var de=this.tryEntries.length-1;de>=0;--de){var me=this.tryEntries[de];if(me.finallyLoc===ee)return this.complete(me.completion,me.afterLoc),oe(me),Z}},catch:function(ee){for(var de=this.tryEntries.length-1;de>=0;--de){var me=this.tryEntries[de];if(me.tryLoc===ee){var xe=me.completion;if(xe.type==="throw"){var ce=xe.arg;oe(me)}return ce}}throw new Error("illegal catch attempt")},delegateYield:function(ee,de,me){return this.delegate={iterator:ie(ee),resultName:de,nextLoc:me},this.method==="next"&&(this.arg=g),Z}},c}(typeof N=="object"?N.exports:{});try{regeneratorRuntime=p}catch(c){typeof globalThis=="object"?globalThis.regeneratorRuntime=p:Function("r","regeneratorRuntime = r")(p)}},{}],396:[function(a,N,j){var p=a("buffer"),c=p.Buffer;function h(g,w){for(var f in g)w[f]=g[f]}c.from&&c.alloc&&c.allocUnsafe&&c.allocUnsafeSlow?N.exports=p:(h(p,j),j.Buffer=y);function y(g,w,f){return c(g,w,f)}h(c,y),y.from=function(g,w,f){if(typeof g=="number")throw new TypeError("Argument must not be a number");return c(g,w,f)},y.alloc=function(g,w,f){if(typeof g!="number")throw new TypeError("Argument must be a number");var v=c(g);return w!==void 0?typeof f=="string"?v.fill(w,f):v.fill(w):v.fill(0),v},y.allocUnsafe=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return c(g)},y.allocUnsafeSlow=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return p.SlowBuffer(g)}},{buffer:90}],397:[function(a,N,j){(function(p){(function(){(function(c){c.parser=function(fe,Y){return new y(fe,Y)},c.SAXParser=y,c.SAXStream=x,c.createStream=b,c.MAX_BUFFER_LENGTH=64*1024;var h=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];c.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function y(fe,Y){if(!(this instanceof y))return new y(fe,Y);var be=this;w(be),be.q=be.c="",be.bufferCheckPosition=c.MAX_BUFFER_LENGTH,be.opt=Y||{},be.opt.lowercase=be.opt.lowercase||be.opt.lowercasetags,be.looseCase=be.opt.lowercase?"toLowerCase":"toUpperCase",be.tags=[],be.closed=be.closedRoot=be.sawRoot=!1,be.tag=be.error=null,be.strict=!!fe,be.noscript=!!(fe||be.opt.noscript),be.state=F.BEGIN,be.strictEntities=be.opt.strictEntities,be.ENTITIES=be.strictEntities?Object.create(c.XML_ENTITIES):Object.create(c.ENTITIES),be.attribList=[],be.opt.xmlns&&(be.ns=Object.create(P)),be.trackPosition=be.opt.position!==!1,be.trackPosition&&(be.position=be.line=be.column=0),X(be,"onready")}Object.create||(Object.create=function(fe){function Y(){}Y.prototype=fe;var be=new Y;return be}),Object.keys||(Object.keys=function(fe){var Y=[];for(var be in fe)fe.hasOwnProperty(be)&&Y.push(be);return Y});function g(fe){for(var Y=Math.max(c.MAX_BUFFER_LENGTH,10),be=0,q=0,V=h.length;q<V;q++){var Q=fe[h[q]].length;if(Q>Y)switch(h[q]){case"textNode":oe(fe);break;case"cdata":re(fe,"oncdata",fe.cdata),fe.cdata="";break;case"script":re(fe,"onscript",fe.script),fe.script="";break;default:ie(fe,"Max buffer length exceeded: "+h[q])}be=Math.max(be,Q)}var L=c.MAX_BUFFER_LENGTH-be;fe.bufferCheckPosition=L+fe.position}function w(fe){for(var Y=0,be=h.length;Y<be;Y++)fe[h[Y]]=""}function f(fe){oe(fe),fe.cdata!==""&&(re(fe,"oncdata",fe.cdata),fe.cdata=""),fe.script!==""&&(re(fe,"onscript",fe.script),fe.script="")}y.prototype={end:function(){Ie(this)},write:je,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){f(this)}};var v;try{v=a("stream").Stream}catch(fe){v=function(){}}var m=c.EVENTS.filter(function(fe){return fe!=="error"&&fe!=="end"});function b(fe,Y){return new x(fe,Y)}function x(fe,Y){if(!(this instanceof x))return new x(fe,Y);v.apply(this),this._parser=new y(fe,Y),this.writable=!0,this.readable=!0;var be=this;this._parser.onend=function(){be.emit("end")},this._parser.onerror=function(q){be.emit("error",q),be._parser.error=null},this._decoder=null,m.forEach(function(q){Object.defineProperty(be,"on"+q,{get:function(){return be._parser["on"+q]},set:function(V){if(!V)return be.removeAllListeners(q),be._parser["on"+q]=V,V;be.on(q,V)},enumerable:!0,configurable:!1})})}x.prototype=Object.create(v.prototype,{constructor:{value:x}}),x.prototype.write=function(fe){if(typeof p=="function"&&typeof p.isBuffer=="function"&&p.isBuffer(fe)){if(!this._decoder){var Y=a("string_decoder").StringDecoder;this._decoder=new Y("utf8")}fe=this._decoder.write(fe)}return this._parser.write(fe.toString()),this.emit("data",fe),!0},x.prototype.end=function(fe){return fe&&fe.length&&this.write(fe),this._parser.end(),!0},x.prototype.on=function(fe,Y){var be=this;return!be._parser["on"+fe]&&m.indexOf(fe)!==-1&&(be._parser["on"+fe]=function(){var q=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);q.splice(0,0,fe),be.emit.apply(be,q)}),v.prototype.on.call(be,fe,Y)};var R="[CDATA[",I="DOCTYPE",E="http://www.w3.org/XML/1998/namespace",C="http://www.w3.org/2000/xmlns/",P={xml:E,xmlns:C},Z=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,M=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,J=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,_=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function k(fe){return fe===" "||fe===`
`||fe==="\r"||fe===" "}function B(fe){return fe==='"'||fe==="'"}function U(fe){return fe===">"||k(fe)}function K(fe,Y){return fe.test(Y)}function G(fe,Y){return!K(fe,Y)}var F=0;c.STATE={BEGIN:F++,BEGIN_WHITESPACE:F++,TEXT:F++,TEXT_ENTITY:F++,OPEN_WAKA:F++,SGML_DECL:F++,SGML_DECL_QUOTED:F++,DOCTYPE:F++,DOCTYPE_QUOTED:F++,DOCTYPE_DTD:F++,DOCTYPE_DTD_QUOTED:F++,COMMENT_STARTING:F++,COMMENT:F++,COMMENT_ENDING:F++,COMMENT_ENDED:F++,CDATA:F++,CDATA_ENDING:F++,CDATA_ENDING_2:F++,PROC_INST:F++,PROC_INST_BODY:F++,PROC_INST_ENDING:F++,OPEN_TAG:F++,OPEN_TAG_SLASH:F++,ATTRIB:F++,ATTRIB_NAME:F++,ATTRIB_NAME_SAW_WHITE:F++,ATTRIB_VALUE:F++,ATTRIB_VALUE_QUOTED:F++,ATTRIB_VALUE_CLOSED:F++,ATTRIB_VALUE_UNQUOTED:F++,ATTRIB_VALUE_ENTITY_Q:F++,ATTRIB_VALUE_ENTITY_U:F++,CLOSE_TAG:F++,CLOSE_TAG_SAW_WHITE:F++,SCRIPT:F++,SCRIPT_ENDING:F++},c.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},c.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(c.ENTITIES).forEach(function(fe){var Y=c.ENTITIES[fe],be=typeof Y=="number"?String.fromCharCode(Y):Y;c.ENTITIES[fe]=be});for(var W in c.STATE)c.STATE[c.STATE[W]]=W;F=c.STATE;function X(fe,Y,be){fe[Y]&&fe[Y](be)}function re(fe,Y,be){fe.textNode&&oe(fe),X(fe,Y,be)}function oe(fe){fe.textNode=pe(fe.opt,fe.textNode),fe.textNode&&X(fe,"ontext",fe.textNode),fe.textNode=""}function pe(fe,Y){return fe.trim&&(Y=Y.trim()),fe.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function ie(fe,Y){return oe(fe),fe.trackPosition&&(Y+=`
Line: `+fe.line+`
Column: `+fe.column+`
Char: `+fe.c),Y=new Error(Y),fe.error=Y,X(fe,"onerror",Y),fe}function Ie(fe){return fe.sawRoot&&!fe.closedRoot&&ee(fe,"Unclosed root tag"),fe.state!==F.BEGIN&&fe.state!==F.BEGIN_WHITESPACE&&fe.state!==F.TEXT&&ie(fe,"Unexpected end"),oe(fe),fe.c="",fe.closed=!0,X(fe,"onend"),y.call(fe,fe.strict,fe.opt),fe}function ee(fe,Y){if(typeof fe!="object"||!(fe instanceof y))throw new Error("bad call to strictFail");fe.strict&&ie(fe,Y)}function de(fe){fe.strict||(fe.tagName=fe.tagName[fe.looseCase]());var Y=fe.tags[fe.tags.length-1]||fe,be=fe.tag={name:fe.tagName,attributes:{}};fe.opt.xmlns&&(be.ns=Y.ns),fe.attribList.length=0,re(fe,"onopentagstart",be)}function me(fe,Y){var be=fe.indexOf(":"),q=be<0?["",fe]:fe.split(":"),V=q[0],Q=q[1];return Y&&fe==="xmlns"&&(V="xmlns",Q=""),{prefix:V,local:Q}}function xe(fe){if(fe.strict||(fe.attribName=fe.attribName[fe.looseCase]()),fe.attribList.indexOf(fe.attribName)!==-1||fe.tag.attributes.hasOwnProperty(fe.attribName)){fe.attribName=fe.attribValue="";return}if(fe.opt.xmlns){var Y=me(fe.attribName,!0),be=Y.prefix,q=Y.local;if(be==="xmlns")if(q==="xml"&&fe.attribValue!==E)ee(fe,"xml: prefix must be bound to "+E+`
Actual: `+fe.attribValue);else if(q==="xmlns"&&fe.attribValue!==C)ee(fe,"xmlns: prefix must be bound to "+C+`
Actual: `+fe.attribValue);else{var V=fe.tag,Q=fe.tags[fe.tags.length-1]||fe;V.ns===Q.ns&&(V.ns=Object.create(Q.ns)),V.ns[q]=fe.attribValue}fe.attribList.push([fe.attribName,fe.attribValue])}else fe.tag.attributes[fe.attribName]=fe.attribValue,re(fe,"onattribute",{name:fe.attribName,value:fe.attribValue});fe.attribName=fe.attribValue=""}function ce(fe,Y){if(fe.opt.xmlns){var be=fe.tag,q=me(fe.tagName);be.prefix=q.prefix,be.local=q.local,be.uri=be.ns[q.prefix]||"",be.prefix&&!be.uri&&(ee(fe,"Unbound namespace prefix: "+JSON.stringify(fe.tagName)),be.uri=q.prefix);var V=fe.tags[fe.tags.length-1]||fe;be.ns&&V.ns!==be.ns&&Object.keys(be.ns).forEach(function(Ue){re(fe,"onopennamespace",{prefix:Ue,uri:be.ns[Ue]})});for(var Q=0,L=fe.attribList.length;Q<L;Q++){var $=fe.attribList[Q],S=$[0],T=$[1],z=me(S,!0),ne=z.prefix,he=z.local,Pe=ne===""?"":be.ns[ne]||"",Oe={name:S,value:T,prefix:ne,local:he,uri:Pe};ne&&ne!=="xmlns"&&!Pe&&(ee(fe,"Unbound namespace prefix: "+JSON.stringify(ne)),Oe.uri=ne),fe.tag.attributes[S]=Oe,re(fe,"onattribute",Oe)}fe.attribList.length=0}fe.tag.isSelfClosing=!!Y,fe.sawRoot=!0,fe.tags.push(fe.tag),re(fe,"onopentag",fe.tag),Y||(!fe.noscript&&fe.tagName.toLowerCase()==="script"?fe.state=F.SCRIPT:fe.state=F.TEXT,fe.tag=null,fe.tagName=""),fe.attribName=fe.attribValue="",fe.attribList.length=0}function le(fe){if(!fe.tagName){ee(fe,"Weird empty close tag."),fe.textNode+="</>",fe.state=F.TEXT;return}if(fe.script){if(fe.tagName!=="script"){fe.script+="</"+fe.tagName+">",fe.tagName="",fe.state=F.SCRIPT;return}re(fe,"onscript",fe.script),fe.script=""}var Y=fe.tags.length,be=fe.tagName;fe.strict||(be=be[fe.looseCase]());for(var q=be;Y--;){var V=fe.tags[Y];if(V.name!==q)ee(fe,"Unexpected close tag");else break}if(Y<0){ee(fe,"Unmatched closing tag: "+fe.tagName),fe.textNode+="</"+fe.tagName+">",fe.state=F.TEXT;return}fe.tagName=be;for(var Q=fe.tags.length;Q-- >Y;){var L=fe.tag=fe.tags.pop();fe.tagName=fe.tag.name,re(fe,"onclosetag",fe.tagName);var $={};for(var S in L.ns)$[S]=L.ns[S];var T=fe.tags[fe.tags.length-1]||fe;fe.opt.xmlns&&L.ns!==T.ns&&Object.keys(L.ns).forEach(function(z){var ne=L.ns[z];re(fe,"onclosenamespace",{prefix:z,uri:ne})})}Y===0&&(fe.closedRoot=!0),fe.tagName=fe.attribValue=fe.attribName="",fe.attribList.length=0,fe.state=F.TEXT}function ge(fe){var Y=fe.entity,be=Y.toLowerCase(),q,V="";return fe.ENTITIES[Y]?fe.ENTITIES[Y]:fe.ENTITIES[be]?fe.ENTITIES[be]:(Y=be,Y.charAt(0)==="#"&&(Y.charAt(1)==="x"?(Y=Y.slice(2),q=parseInt(Y,16),V=q.toString(16)):(Y=Y.slice(1),q=parseInt(Y,10),V=q.toString(10))),Y=Y.replace(/^0+/,""),isNaN(q)||V.toLowerCase()!==Y?(ee(fe,"Invalid character entity"),"&"+fe.entity+";"):String.fromCodePoint(q))}function Ce(fe,Y){Y==="<"?(fe.state=F.OPEN_WAKA,fe.startTagPosition=fe.position):k(Y)||(ee(fe,"Non-whitespace before first tag."),fe.textNode=Y,fe.state=F.TEXT)}function De(fe,Y){var be="";return Y<fe.length&&(be=fe.charAt(Y)),be}function je(fe){var Y=this;if(this.error)throw this.error;if(Y.closed)return ie(Y,"Cannot write after close. Assign an onready handler.");if(fe===null)return Ie(Y);typeof fe=="object"&&(fe=fe.toString());for(var be=0,q="";q=De(fe,be++),Y.c=q,!!q;)switch(Y.trackPosition&&(Y.position++,q===`
`?(Y.line++,Y.column=0):Y.column++),Y.state){case F.BEGIN:if(Y.state=F.BEGIN_WHITESPACE,q==="\uFEFF")continue;Ce(Y,q);continue;case F.BEGIN_WHITESPACE:Ce(Y,q);continue;case F.TEXT:if(Y.sawRoot&&!Y.closedRoot){for(var V=be-1;q&&q!=="<"&&q!=="&";)q=De(fe,be++),q&&Y.trackPosition&&(Y.position++,q===`
`?(Y.line++,Y.column=0):Y.column++);Y.textNode+=fe.substring(V,be-1)}q==="<"&&!(Y.sawRoot&&Y.closedRoot&&!Y.strict)?(Y.state=F.OPEN_WAKA,Y.startTagPosition=Y.position):(!k(q)&&(!Y.sawRoot||Y.closedRoot)&&ee(Y,"Text data outside of root node."),q==="&"?Y.state=F.TEXT_ENTITY:Y.textNode+=q);continue;case F.SCRIPT:q==="<"?Y.state=F.SCRIPT_ENDING:Y.script+=q;continue;case F.SCRIPT_ENDING:q==="/"?Y.state=F.CLOSE_TAG:(Y.script+="<"+q,Y.state=F.SCRIPT);continue;case F.OPEN_WAKA:if(q==="!")Y.state=F.SGML_DECL,Y.sgmlDecl="";else if(!k(q))if(K(Z,q))Y.state=F.OPEN_TAG,Y.tagName=q;else if(q==="/")Y.state=F.CLOSE_TAG,Y.tagName="";else if(q==="?")Y.state=F.PROC_INST,Y.procInstName=Y.procInstBody="";else{if(ee(Y,"Unencoded <"),Y.startTagPosition+1<Y.position){var Q=Y.position-Y.startTagPosition;q=new Array(Q).join(" ")+q}Y.textNode+="<"+q,Y.state=F.TEXT}continue;case F.SGML_DECL:(Y.sgmlDecl+q).toUpperCase()===R?(re(Y,"onopencdata"),Y.state=F.CDATA,Y.sgmlDecl="",Y.cdata=""):Y.sgmlDecl+q==="--"?(Y.state=F.COMMENT,Y.comment="",Y.sgmlDecl=""):(Y.sgmlDecl+q).toUpperCase()===I?(Y.state=F.DOCTYPE,(Y.doctype||Y.sawRoot)&&ee(Y,"Inappropriately located doctype declaration"),Y.doctype="",Y.sgmlDecl=""):q===">"?(re(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=F.TEXT):(B(q)&&(Y.state=F.SGML_DECL_QUOTED),Y.sgmlDecl+=q);continue;case F.SGML_DECL_QUOTED:q===Y.q&&(Y.state=F.SGML_DECL,Y.q=""),Y.sgmlDecl+=q;continue;case F.DOCTYPE:q===">"?(Y.state=F.TEXT,re(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=q,q==="["?Y.state=F.DOCTYPE_DTD:B(q)&&(Y.state=F.DOCTYPE_QUOTED,Y.q=q));continue;case F.DOCTYPE_QUOTED:Y.doctype+=q,q===Y.q&&(Y.q="",Y.state=F.DOCTYPE);continue;case F.DOCTYPE_DTD:Y.doctype+=q,q==="]"?Y.state=F.DOCTYPE:B(q)&&(Y.state=F.DOCTYPE_DTD_QUOTED,Y.q=q);continue;case F.DOCTYPE_DTD_QUOTED:Y.doctype+=q,q===Y.q&&(Y.state=F.DOCTYPE_DTD,Y.q="");continue;case F.COMMENT:q==="-"?Y.state=F.COMMENT_ENDING:Y.comment+=q;continue;case F.COMMENT_ENDING:q==="-"?(Y.state=F.COMMENT_ENDED,Y.comment=pe(Y.opt,Y.comment),Y.comment&&re(Y,"oncomment",Y.comment),Y.comment=""):(Y.comment+="-"+q,Y.state=F.COMMENT);continue;case F.COMMENT_ENDED:q!==">"?(ee(Y,"Malformed comment"),Y.comment+="--"+q,Y.state=F.COMMENT):Y.state=F.TEXT;continue;case F.CDATA:q==="]"?Y.state=F.CDATA_ENDING:Y.cdata+=q;continue;case F.CDATA_ENDING:q==="]"?Y.state=F.CDATA_ENDING_2:(Y.cdata+="]"+q,Y.state=F.CDATA);continue;case F.CDATA_ENDING_2:q===">"?(Y.cdata&&re(Y,"oncdata",Y.cdata),re(Y,"onclosecdata"),Y.cdata="",Y.state=F.TEXT):q==="]"?Y.cdata+="]":(Y.cdata+="]]"+q,Y.state=F.CDATA);continue;case F.PROC_INST:q==="?"?Y.state=F.PROC_INST_ENDING:k(q)?Y.state=F.PROC_INST_BODY:Y.procInstName+=q;continue;case F.PROC_INST_BODY:if(!Y.procInstBody&&k(q))continue;q==="?"?Y.state=F.PROC_INST_ENDING:Y.procInstBody+=q;continue;case F.PROC_INST_ENDING:q===">"?(re(Y,"onprocessinginstruction",{name:Y.procInstName,body:Y.procInstBody}),Y.procInstName=Y.procInstBody="",Y.state=F.TEXT):(Y.procInstBody+="?"+q,Y.state=F.PROC_INST_BODY);continue;case F.OPEN_TAG:K(M,q)?Y.tagName+=q:(de(Y),q===">"?ce(Y):q==="/"?Y.state=F.OPEN_TAG_SLASH:(k(q)||ee(Y,"Invalid character in tag name"),Y.state=F.ATTRIB));continue;case F.OPEN_TAG_SLASH:q===">"?(ce(Y,!0),le(Y)):(ee(Y,"Forward-slash in opening tag not followed by >"),Y.state=F.ATTRIB);continue;case F.ATTRIB:if(k(q))continue;q===">"?ce(Y):q==="/"?Y.state=F.OPEN_TAG_SLASH:K(Z,q)?(Y.attribName=q,Y.attribValue="",Y.state=F.ATTRIB_NAME):ee(Y,"Invalid attribute name");continue;case F.ATTRIB_NAME:q==="="?Y.state=F.ATTRIB_VALUE:q===">"?(ee(Y,"Attribute without value"),Y.attribValue=Y.attribName,xe(Y),ce(Y)):k(q)?Y.state=F.ATTRIB_NAME_SAW_WHITE:K(M,q)?Y.attribName+=q:ee(Y,"Invalid attribute name");continue;case F.ATTRIB_NAME_SAW_WHITE:if(q==="=")Y.state=F.ATTRIB_VALUE;else{if(k(q))continue;ee(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",re(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",q===">"?ce(Y):K(Z,q)?(Y.attribName=q,Y.state=F.ATTRIB_NAME):(ee(Y,"Invalid attribute name"),Y.state=F.ATTRIB)}continue;case F.ATTRIB_VALUE:if(k(q))continue;B(q)?(Y.q=q,Y.state=F.ATTRIB_VALUE_QUOTED):(ee(Y,"Unquoted attribute value"),Y.state=F.ATTRIB_VALUE_UNQUOTED,Y.attribValue=q);continue;case F.ATTRIB_VALUE_QUOTED:if(q!==Y.q){q==="&"?Y.state=F.ATTRIB_VALUE_ENTITY_Q:Y.attribValue+=q;continue}xe(Y),Y.q="",Y.state=F.ATTRIB_VALUE_CLOSED;continue;case F.ATTRIB_VALUE_CLOSED:k(q)?Y.state=F.ATTRIB:q===">"?ce(Y):q==="/"?Y.state=F.OPEN_TAG_SLASH:K(Z,q)?(ee(Y,"No whitespace between attributes"),Y.attribName=q,Y.attribValue="",Y.state=F.ATTRIB_NAME):ee(Y,"Invalid attribute name");continue;case F.ATTRIB_VALUE_UNQUOTED:if(!U(q)){q==="&"?Y.state=F.ATTRIB_VALUE_ENTITY_U:Y.attribValue+=q;continue}xe(Y),q===">"?ce(Y):Y.state=F.ATTRIB;continue;case F.CLOSE_TAG:if(Y.tagName)q===">"?le(Y):K(M,q)?Y.tagName+=q:Y.script?(Y.script+="</"+Y.tagName,Y.tagName="",Y.state=F.SCRIPT):(k(q)||ee(Y,"Invalid tagname in closing tag"),Y.state=F.CLOSE_TAG_SAW_WHITE);else{if(k(q))continue;G(Z,q)?Y.script?(Y.script+="</"+q,Y.state=F.SCRIPT):ee(Y,"Invalid tagname in closing tag."):Y.tagName=q}continue;case F.CLOSE_TAG_SAW_WHITE:if(k(q))continue;q===">"?le(Y):ee(Y,"Invalid characters in closing tag");continue;case F.TEXT_ENTITY:case F.ATTRIB_VALUE_ENTITY_Q:case F.ATTRIB_VALUE_ENTITY_U:var L,$;switch(Y.state){case F.TEXT_ENTITY:L=F.TEXT,$="textNode";break;case F.ATTRIB_VALUE_ENTITY_Q:L=F.ATTRIB_VALUE_QUOTED,$="attribValue";break;case F.ATTRIB_VALUE_ENTITY_U:L=F.ATTRIB_VALUE_UNQUOTED,$="attribValue";break}q===";"?(Y[$]+=ge(Y),Y.entity="",Y.state=L):K(Y.entity.length?_:J,q)?Y.entity+=q:(ee(Y,"Invalid character in entity name"),Y[$]+="&"+Y.entity+q,Y.entity="",Y.state=L);continue;default:throw new Error(Y,"Unknown state: "+Y.state)}return Y.position>=Y.bufferCheckPosition&&g(Y),Y}String.fromCodePoint||function(){var fe=String.fromCharCode,Y=Math.floor,be=function(){var q=16384,V=[],Q,L,$=-1,S=arguments.length;if(!S)return"";for(var T="";++$<S;){var z=Number(arguments[$]);if(!isFinite(z)||z<0||z>1114111||Y(z)!==z)throw RangeError("Invalid code point: "+z);z<=65535?V.push(z):(z-=65536,Q=(z>>10)+55296,L=z%1024+56320,V.push(Q,L)),($+1===S||V.length>q)&&(T+=fe.apply(null,V),V.length=0)}return T};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:be,configurable:!0,writable:!0}):String.fromCodePoint=be}()})(typeof j=="undefined"?this.sax={}:j)}).call(this)}).call(this,a("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(a,N,j){N.exports=h;var p=a("events").EventEmitter,c=a("inherits");c(h,p),h.Readable=a("readable-stream/lib/_stream_readable.js"),h.Writable=a("readable-stream/lib/_stream_writable.js"),h.Duplex=a("readable-stream/lib/_stream_duplex.js"),h.Transform=a("readable-stream/lib/_stream_transform.js"),h.PassThrough=a("readable-stream/lib/_stream_passthrough.js"),h.finished=a("readable-stream/lib/internal/streams/end-of-stream.js"),h.pipeline=a("readable-stream/lib/internal/streams/pipeline.js"),h.Stream=h;function h(){p.call(this)}h.prototype.pipe=function(y,g){var w=this;function f(E){y.writable&&y.write(E)===!1&&w.pause&&w.pause()}w.on("data",f);function v(){w.readable&&w.resume&&w.resume()}y.on("drain",v),!y._isStdio&&(!g||g.end!==!1)&&(w.on("end",b),w.on("close",x));var m=!1;function b(){m||(m=!0,y.end())}function x(){m||(m=!0,typeof y.destroy=="function"&&y.destroy())}function R(E){if(I(),p.listenerCount(this,"error")===0)throw E}w.on("error",R),y.on("error",R);function I(){w.removeListener("data",f),y.removeListener("drain",v),w.removeListener("end",b),w.removeListener("close",x),w.removeListener("error",R),y.removeListener("error",R),w.removeListener("end",I),w.removeListener("close",I),y.removeListener("close",I)}return w.on("end",I),w.on("close",I),y.on("close",I),y.emit("pipe",w),y}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(a,N,j){"use strict";function p(v,m){v.prototype=Object.create(m.prototype),v.prototype.constructor=v,v.__proto__=m}var c={};function h(v,m,b){b||(b=Error);function x(I,E,C){return typeof m=="string"?m:m(I,E,C)}var R=function(I){p(E,I);function E(C,P,Z){return I.call(this,x(C,P,Z))||this}return E}(b);R.prototype.name=b.name,R.prototype.code=v,c[v]=R}function y(v,m){if(Array.isArray(v)){var b=v.length;return v=v.map(function(x){return String(x)}),b>2?"one of ".concat(m," ").concat(v.slice(0,b-1).join(", "),", or ")+v[b-1]:b===2?"one of ".concat(m," ").concat(v[0]," or ").concat(v[1]):"of ".concat(m," ").concat(v[0])}else return"of ".concat(m," ").concat(String(v))}function g(v,m,b){return v.substr(!b||b<0?0:+b,m.length)===m}function w(v,m,b){return(b===void 0||b>v.length)&&(b=v.length),v.substring(b-m.length,b)===m}function f(v,m,b){return typeof b!="number"&&(b=0),b+m.length>v.length?!1:v.indexOf(m,b)!==-1}h("ERR_INVALID_OPT_VALUE",function(v,m){return'The value "'+m+'" is invalid for option "'+v+'"'},TypeError),h("ERR_INVALID_ARG_TYPE",function(v,m,b){var x;typeof m=="string"&&g(m,"not ")?(x="must not be",m=m.replace(/^not /,"")):x="must be";var R;if(w(v," argument"))R="The ".concat(v," ").concat(x," ").concat(y(m,"type"));else{var I=f(v,".")?"property":"argument";R='The "'.concat(v,'" ').concat(I," ").concat(x," ").concat(y(m,"type"))}return R+=". Received type ".concat(typeof b),R},TypeError),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),h("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),h("ERR_STREAM_PREMATURE_CLOSE","Premature close"),h("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),h("ERR_STREAM_WRITE_AFTER_END","write after end"),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),N.exports.codes=c},{}],400:[function(a,N,j){(function(p){(function(){"use strict";var c=Object.keys||function(x){var R=[];for(var I in x)R.push(I);return R};N.exports=v;var h=a("./_stream_readable"),y=a("./_stream_writable");a("inherits")(v,h);for(var g=c(y.prototype),w=0;w<g.length;w++){var f=g[w];v.prototype[f]||(v.prototype[f]=y.prototype[f])}function v(x){if(!(this instanceof v))return new v(x);h.call(this,x),y.call(this,x),this.allowHalfOpen=!0,x&&(x.readable===!1&&(this.readable=!1),x.writable===!1&&(this.writable=!1),x.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",m)))}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(v.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(v.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function m(){this._writableState.ended||p.nextTick(b,this)}function b(x){x.end()}Object.defineProperty(v.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(R){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=R,this._writableState.destroyed=R)}})}).call(this)}).call(this,a("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(a,N,j){"use strict";N.exports=c;var p=a("./_stream_transform");a("inherits")(c,p);function c(h){if(!(this instanceof c))return new c(h);p.call(this,h)}c.prototype._transform=function(h,y,g){g(null,h)}},{"./_stream_transform":403,inherits:364}],402:[function(a,N,j){(function(p,c){(function(){"use strict";N.exports=re;var h;re.ReadableState=X;var y=a("events").EventEmitter,g=function(S,T){return S.listeners(T).length},w=a("./internal/streams/stream"),f=a("buffer").Buffer,v=(typeof c!="undefined"?c:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function m($){return f.from($)}function b($){return f.isBuffer($)||$ instanceof v}var x=a("util"),R;x&&x.debuglog?R=x.debuglog("stream"):R=function(){};var I=a("./internal/streams/buffer_list"),E=a("./internal/streams/destroy"),C=a("./internal/streams/state"),P=C.getHighWaterMark,Z=a("../errors").codes,M=Z.ERR_INVALID_ARG_TYPE,J=Z.ERR_STREAM_PUSH_AFTER_EOF,_=Z.ERR_METHOD_NOT_IMPLEMENTED,k=Z.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,B,U,K;a("inherits")(re,w);var G=E.errorOrDestroy,F=["error","close","destroy","pause","resume"];function W($,S,T){if(typeof $.prependListener=="function")return $.prependListener(S,T);!$._events||!$._events[S]?$.on(S,T):Array.isArray($._events[S])?$._events[S].unshift(T):$._events[S]=[T,$._events[S]]}function X($,S,T){h=h||a("./_stream_duplex"),$=$||{},typeof T!="boolean"&&(T=S instanceof h),this.objectMode=!!$.objectMode,T&&(this.objectMode=this.objectMode||!!$.readableObjectMode),this.highWaterMark=P(this,$,"readableHighWaterMark",T),this.buffer=new I,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding&&(B||(B=a("string_decoder/").StringDecoder),this.decoder=new B($.encoding),this.encoding=$.encoding)}function re($){if(h=h||a("./_stream_duplex"),!(this instanceof re))return new re($);var S=this instanceof h;this._readableState=new X($,this,S),this.readable=!0,$&&(typeof $.read=="function"&&(this._read=$.read),typeof $.destroy=="function"&&(this._destroy=$.destroy)),w.call(this)}Object.defineProperty(re.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(S){this._readableState&&(this._readableState.destroyed=S)}}),re.prototype.destroy=E.destroy,re.prototype._undestroy=E.undestroy,re.prototype._destroy=function($,S){S($)},re.prototype.push=function($,S){var T=this._readableState,z;return T.objectMode?z=!0:typeof $=="string"&&(S=S||T.defaultEncoding,S!==T.encoding&&($=f.from($,S),S=""),z=!0),oe(this,$,S,!1,z)},re.prototype.unshift=function($){return oe(this,$,null,!0,!1)};function oe($,S,T,z,ne){R("readableAddChunk",S);var he=$._readableState;if(S===null)he.reading=!1,me($,he);else{var Pe;if(ne||(Pe=ie(he,S)),Pe)G($,Pe);else if(he.objectMode||S&&S.length>0)if(typeof S!="string"&&!he.objectMode&&Object.getPrototypeOf(S)!==f.prototype&&(S=m(S)),z)he.endEmitted?G($,new k):pe($,he,S,!0);else if(he.ended)G($,new J);else{if(he.destroyed)return!1;he.reading=!1,he.decoder&&!T?(S=he.decoder.write(S),he.objectMode||S.length!==0?pe($,he,S,!1):le($,he)):pe($,he,S,!1)}else z||(he.reading=!1,le($,he))}return!he.ended&&(he.length<he.highWaterMark||he.length===0)}function pe($,S,T,z){S.flowing&&S.length===0&&!S.sync?(S.awaitDrain=0,$.emit("data",T)):(S.length+=S.objectMode?1:T.length,z?S.buffer.unshift(T):S.buffer.push(T),S.needReadable&&xe($)),le($,S)}function ie($,S){var T;return!b(S)&&typeof S!="string"&&S!==void 0&&!$.objectMode&&(T=new M("chunk",["string","Buffer","Uint8Array"],S)),T}re.prototype.isPaused=function(){return this._readableState.flowing===!1},re.prototype.setEncoding=function($){B||(B=a("string_decoder/").StringDecoder);var S=new B($);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;for(var T=this._readableState.buffer.head,z="";T!==null;)z+=S.write(T.data),T=T.next;return this._readableState.buffer.clear(),z!==""&&this._readableState.buffer.push(z),this._readableState.length=z.length,this};var Ie=1073741824;function ee($){return $>=Ie?$=Ie:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function de($,S){return $<=0||S.length===0&&S.ended?0:S.objectMode?1:$!==$?S.flowing&&S.length?S.buffer.head.data.length:S.length:($>S.highWaterMark&&(S.highWaterMark=ee($)),$<=S.length?$:S.ended?S.length:(S.needReadable=!0,0))}re.prototype.read=function($){R("read",$),$=parseInt($,10);var S=this._readableState,T=$;if($!==0&&(S.emittedReadable=!1),$===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return R("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?V(this):xe(this),null;if($=de($,S),$===0&&S.ended)return S.length===0&&V(this),null;var z=S.needReadable;R("need readable",z),(S.length===0||S.length-$<S.highWaterMark)&&(z=!0,R("length less than watermark",z)),S.ended||S.reading?(z=!1,R("reading or ended",z)):z&&(R("do read"),S.reading=!0,S.sync=!0,S.length===0&&(S.needReadable=!0),this._read(S.highWaterMark),S.sync=!1,S.reading||($=de(T,S)));var ne;return $>0?ne=q($,S):ne=null,ne===null?(S.needReadable=S.length<=S.highWaterMark,$=0):(S.length-=$,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),T!==$&&S.ended&&V(this)),ne!==null&&this.emit("data",ne),ne};function me($,S){if(R("onEofChunk"),!S.ended){if(S.decoder){var T=S.decoder.end();T&&T.length&&(S.buffer.push(T),S.length+=S.objectMode?1:T.length)}S.ended=!0,S.sync?xe($):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,ce($)))}}function xe($){var S=$._readableState;R("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(R("emitReadable",S.flowing),S.emittedReadable=!0,p.nextTick(ce,$))}function ce($){var S=$._readableState;R("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&($.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,be($)}function le($,S){S.readingMore||(S.readingMore=!0,p.nextTick(ge,$,S))}function ge($,S){for(;!S.reading&&!S.ended&&(S.length<S.highWaterMark||S.flowing&&S.length===0);){var T=S.length;if(R("maybeReadMore read 0"),$.read(0),T===S.length)break}S.readingMore=!1}re.prototype._read=function($){G(this,new _("_read()"))},re.prototype.pipe=function($,S){var T=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=$;break;case 1:z.pipes=[z.pipes,$];break;default:z.pipes.push($);break}z.pipesCount+=1,R("pipe count=%d opts=%j",z.pipesCount,S);var ne=(!S||S.end!==!1)&&$!==p.stdout&&$!==p.stderr,he=ne?Oe:Be;z.endEmitted?p.nextTick(he):T.once("end",he),$.on("unpipe",Pe);function Pe(_e,Ve){R("onunpipe"),_e===T&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Qe())}function Oe(){R("onend"),$.end()}var Ue=Ce(T);$.on("drain",Ue);var nt=!1;function Qe(){R("cleanup"),$.removeListener("close",Je),$.removeListener("finish",Re),$.removeListener("drain",Ue),$.removeListener("error",We),$.removeListener("unpipe",Pe),T.removeListener("end",Oe),T.removeListener("end",Be),T.removeListener("data",rt),nt=!0,z.awaitDrain&&(!$._writableState||$._writableState.needDrain)&&Ue()}T.on("data",rt);function rt(_e){R("ondata");var Ve=$.write(_e);R("dest.write",Ve),Ve===!1&&((z.pipesCount===1&&z.pipes===$||z.pipesCount>1&&L(z.pipes,$)!==-1)&&!nt&&(R("false write response, pause",z.awaitDrain),z.awaitDrain++),T.pause())}function We(_e){R("onerror",_e),Be(),$.removeListener("error",We),g($,"error")===0&&G($,_e)}W($,"error",We);function Je(){$.removeListener("finish",Re),Be()}$.once("close",Je);function Re(){R("onfinish"),$.removeListener("close",Je),Be()}$.once("finish",Re);function Be(){R("unpipe"),T.unpipe($)}return $.emit("pipe",T),z.flowing||(R("pipe resume"),T.resume()),$};function Ce($){return function(){var T=$._readableState;R("pipeOnDrain",T.awaitDrain),T.awaitDrain&&T.awaitDrain--,T.awaitDrain===0&&g($,"data")&&(T.flowing=!0,be($))}}re.prototype.unpipe=function($){var S=this._readableState,T={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return $&&$!==S.pipes?this:($||($=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,$&&$.emit("unpipe",this,T),this);if(!$){var z=S.pipes,ne=S.pipesCount;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var he=0;he<ne;he++)z[he].emit("unpipe",this,{hasUnpiped:!1});return this}var Pe=L(S.pipes,$);return Pe===-1?this:(S.pipes.splice(Pe,1),S.pipesCount-=1,S.pipesCount===1&&(S.pipes=S.pipes[0]),$.emit("unpipe",this,T),this)},re.prototype.on=function($,S){var T=w.prototype.on.call(this,$,S),z=this._readableState;return $==="data"?(z.readableListening=this.listenerCount("readable")>0,z.flowing!==!1&&this.resume()):$==="readable"&&!z.endEmitted&&!z.readableListening&&(z.readableListening=z.needReadable=!0,z.flowing=!1,z.emittedReadable=!1,R("on readable",z.length,z.reading),z.length?xe(this):z.reading||p.nextTick(je,this)),T},re.prototype.addListener=re.prototype.on,re.prototype.removeListener=function($,S){var T=w.prototype.removeListener.call(this,$,S);return $==="readable"&&p.nextTick(De,this),T},re.prototype.removeAllListeners=function($){var S=w.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&p.nextTick(De,this),S};function De($){var S=$._readableState;S.readableListening=$.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:$.listenerCount("data")>0&&$.resume()}function je($){R("readable nexttick read 0"),$.read(0)}re.prototype.resume=function(){var $=this._readableState;return $.flowing||(R("resume"),$.flowing=!$.readableListening,fe(this,$)),$.paused=!1,this};function fe($,S){S.resumeScheduled||(S.resumeScheduled=!0,p.nextTick(Y,$,S))}function Y($,S){R("resume",S.reading),S.reading||$.read(0),S.resumeScheduled=!1,$.emit("resume"),be($),S.flowing&&!S.reading&&$.read(0)}re.prototype.pause=function(){return R("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(R("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function be($){var S=$._readableState;for(R("flow",S.flowing);S.flowing&&$.read()!==null;);}re.prototype.wrap=function($){var S=this,T=this._readableState,z=!1;$.on("end",function(){if(R("wrapped end"),T.decoder&&!T.ended){var Pe=T.decoder.end();Pe&&Pe.length&&S.push(Pe)}S.push(null)}),$.on("data",function(Pe){if(R("wrapped data"),T.decoder&&(Pe=T.decoder.write(Pe)),!(T.objectMode&&Pe==null)&&!(!T.objectMode&&(!Pe||!Pe.length))){var Oe=S.push(Pe);Oe||(z=!0,$.pause())}});for(var ne in $)this[ne]===void 0&&typeof $[ne]=="function"&&(this[ne]=function(Oe){return function(){return $[Oe].apply($,arguments)}}(ne));for(var he=0;he<F.length;he++)$.on(F[he],this.emit.bind(this,F[he]));return this._read=function(Pe){R("wrapped _read",Pe),z&&(z=!1,$.resume())},this},typeof Symbol=="function"&&(re.prototype[Symbol.asyncIterator]=function(){return U===void 0&&(U=a("./internal/streams/async_iterator")),U(this)}),Object.defineProperty(re.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(re.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(re.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(S){this._readableState&&(this._readableState.flowing=S)}}),re._fromList=q,Object.defineProperty(re.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function q($,S){if(S.length===0)return null;var T;return S.objectMode?T=S.buffer.shift():!$||$>=S.length?(S.decoder?T=S.buffer.join(""):S.buffer.length===1?T=S.buffer.first():T=S.buffer.concat(S.length),S.buffer.clear()):T=S.buffer.consume($,S.decoder),T}function V($){var S=$._readableState;R("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,p.nextTick(Q,S,$))}function Q($,S){if(R("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,S.readable=!1,S.emit("end"),$.autoDestroy)){var T=S._writableState;(!T||T.autoDestroy&&T.finished)&&S.destroy()}}typeof Symbol=="function"&&(re.from=function($,S){return K===void 0&&(K=a("./internal/streams/from")),K(re,$,S)});function L($,S){for(var T=0,z=$.length;T<z;T++)if($[T]===S)return T;return-1}}).call(this)}).call(this,a("_process"),typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(a,N,j){"use strict";N.exports=v;var p=a("../errors").codes,c=p.ERR_METHOD_NOT_IMPLEMENTED,h=p.ERR_MULTIPLE_CALLBACK,y=p.ERR_TRANSFORM_ALREADY_TRANSFORMING,g=p.ERR_TRANSFORM_WITH_LENGTH_0,w=a("./_stream_duplex");a("inherits")(v,w);function f(x,R){var I=this._transformState;I.transforming=!1;var E=I.writecb;if(E===null)return this.emit("error",new h);I.writechunk=null,I.writecb=null,R!=null&&this.push(R),E(x);var C=this._readableState;C.reading=!1,(C.needReadable||C.length<C.highWaterMark)&&this._read(C.highWaterMark)}function v(x){if(!(this instanceof v))return new v(x);w.call(this,x),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,x&&(typeof x.transform=="function"&&(this._transform=x.transform),typeof x.flush=="function"&&(this._flush=x.flush)),this.on("prefinish",m)}function m(){var x=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(R,I){b(x,R,I)}):b(this,null,null)}v.prototype.push=function(x,R){return this._transformState.needTransform=!1,w.prototype.push.call(this,x,R)},v.prototype._transform=function(x,R,I){I(new c("_transform()"))},v.prototype._write=function(x,R,I){var E=this._transformState;if(E.writecb=I,E.writechunk=x,E.writeencoding=R,!E.transforming){var C=this._readableState;(E.needTransform||C.needReadable||C.length<C.highWaterMark)&&this._read(C.highWaterMark)}},v.prototype._read=function(x){var R=this._transformState;R.writechunk!==null&&!R.transforming?(R.transforming=!0,this._transform(R.writechunk,R.writeencoding,R.afterTransform)):R.needTransform=!0},v.prototype._destroy=function(x,R){w.prototype._destroy.call(this,x,function(I){R(I)})};function b(x,R,I){if(R)return x.emit("error",R);if(I!=null&&x.push(I),x._writableState.length)throw new g;if(x._transformState.transforming)throw new y;return x.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(a,N,j){(function(p,c){(function(){"use strict";N.exports=X;function h(be,q,V){this.chunk=be,this.encoding=q,this.callback=V,this.next=null}function y(be){var q=this;this.next=null,this.entry=null,this.finish=function(){Y(q,be)}}var g;X.WritableState=F;var w={deprecate:a("util-deprecate")},f=a("./internal/streams/stream"),v=a("buffer").Buffer,m=(typeof c!="undefined"?c:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function b(be){return v.from(be)}function x(be){return v.isBuffer(be)||be instanceof m}var R=a("./internal/streams/destroy"),I=a("./internal/streams/state"),E=I.getHighWaterMark,C=a("../errors").codes,P=C.ERR_INVALID_ARG_TYPE,Z=C.ERR_METHOD_NOT_IMPLEMENTED,M=C.ERR_MULTIPLE_CALLBACK,J=C.ERR_STREAM_CANNOT_PIPE,_=C.ERR_STREAM_DESTROYED,k=C.ERR_STREAM_NULL_VALUES,B=C.ERR_STREAM_WRITE_AFTER_END,U=C.ERR_UNKNOWN_ENCODING,K=R.errorOrDestroy;a("inherits")(X,f);function G(){}function F(be,q,V){g=g||a("./_stream_duplex"),be=be||{},typeof V!="boolean"&&(V=q instanceof g),this.objectMode=!!be.objectMode,V&&(this.objectMode=this.objectMode||!!be.writableObjectMode),this.highWaterMark=E(this,be,"writableHighWaterMark",V),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Q=be.decodeStrings===!1;this.decodeStrings=!Q,this.defaultEncoding=be.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){me(q,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=be.emitClose!==!1,this.autoDestroy=!!be.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new y(this)}F.prototype.getBuffer=function(){for(var q=this.bufferedRequest,V=[];q;)V.push(q),q=q.next;return V},function(){try{Object.defineProperty(F.prototype,"buffer",{get:w.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(be){}}();var W;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(W=Function.prototype[Symbol.hasInstance],Object.defineProperty(X,Symbol.hasInstance,{value:function(q){return W.call(this,q)?!0:this!==X?!1:q&&q._writableState instanceof F}})):W=function(q){return q instanceof this};function X(be){g=g||a("./_stream_duplex");var q=this instanceof g;if(!q&&!W.call(X,this))return new X(be);this._writableState=new F(be,this,q),this.writable=!0,be&&(typeof be.write=="function"&&(this._write=be.write),typeof be.writev=="function"&&(this._writev=be.writev),typeof be.destroy=="function"&&(this._destroy=be.destroy),typeof be.final=="function"&&(this._final=be.final)),f.call(this)}X.prototype.pipe=function(){K(this,new J)};function re(be,q){var V=new B;K(be,V),p.nextTick(q,V)}function oe(be,q,V,Q){var L;return V===null?L=new k:typeof V!="string"&&!q.objectMode&&(L=new P("chunk",["string","Buffer"],V)),L?(K(be,L),p.nextTick(Q,L),!1):!0}X.prototype.write=function(be,q,V){var Q=this._writableState,L=!1,$=!Q.objectMode&&x(be);return $&&!v.isBuffer(be)&&(be=b(be)),typeof q=="function"&&(V=q,q=null),$?q="buffer":q||(q=Q.defaultEncoding),typeof V!="function"&&(V=G),Q.ending?re(this,V):($||oe(this,Q,be,V))&&(Q.pendingcb++,L=ie(this,Q,$,be,q,V)),L},X.prototype.cork=function(){this._writableState.corked++},X.prototype.uncork=function(){var be=this._writableState;be.corked&&(be.corked--,!be.writing&&!be.corked&&!be.bufferProcessing&&be.bufferedRequest&&le(this,be))},X.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((q+"").toLowerCase())>-1))throw new U(q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(X.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function pe(be,q,V){return!be.objectMode&&be.decodeStrings!==!1&&typeof q=="string"&&(q=v.from(q,V)),q}Object.defineProperty(X.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ie(be,q,V,Q,L,$){if(!V){var S=pe(q,Q,L);Q!==S&&(V=!0,L="buffer",Q=S)}var T=q.objectMode?1:Q.length;q.length+=T;var z=q.length<q.highWaterMark;if(z||(q.needDrain=!0),q.writing||q.corked){var ne=q.lastBufferedRequest;q.lastBufferedRequest={chunk:Q,encoding:L,isBuf:V,callback:$,next:null},ne?ne.next=q.lastBufferedRequest:q.bufferedRequest=q.lastBufferedRequest,q.bufferedRequestCount+=1}else Ie(be,q,!1,T,Q,L,$);return z}function Ie(be,q,V,Q,L,$,S){q.writelen=Q,q.writecb=S,q.writing=!0,q.sync=!0,q.destroyed?q.onwrite(new _("write")):V?be._writev(L,q.onwrite):be._write(L,$,q.onwrite),q.sync=!1}function ee(be,q,V,Q,L){--q.pendingcb,V?(p.nextTick(L,Q),p.nextTick(je,be,q),be._writableState.errorEmitted=!0,K(be,Q)):(L(Q),be._writableState.errorEmitted=!0,K(be,Q),je(be,q))}function de(be){be.writing=!1,be.writecb=null,be.length-=be.writelen,be.writelen=0}function me(be,q){var V=be._writableState,Q=V.sync,L=V.writecb;if(typeof L!="function")throw new M;if(de(V),q)ee(be,V,Q,q,L);else{var $=ge(V)||be.destroyed;!$&&!V.corked&&!V.bufferProcessing&&V.bufferedRequest&&le(be,V),Q?p.nextTick(xe,be,V,$,L):xe(be,V,$,L)}}function xe(be,q,V,Q){V||ce(be,q),q.pendingcb--,Q(),je(be,q)}function ce(be,q){q.length===0&&q.needDrain&&(q.needDrain=!1,be.emit("drain"))}function le(be,q){q.bufferProcessing=!0;var V=q.bufferedRequest;if(be._writev&&V&&V.next){var Q=q.bufferedRequestCount,L=new Array(Q),$=q.corkedRequestsFree;$.entry=V;for(var S=0,T=!0;V;)L[S]=V,V.isBuf||(T=!1),V=V.next,S+=1;L.allBuffers=T,Ie(be,q,!0,q.length,L,"",$.finish),q.pendingcb++,q.lastBufferedRequest=null,$.next?(q.corkedRequestsFree=$.next,$.next=null):q.corkedRequestsFree=new y(q),q.bufferedRequestCount=0}else{for(;V;){var z=V.chunk,ne=V.encoding,he=V.callback,Pe=q.objectMode?1:z.length;if(Ie(be,q,!1,Pe,z,ne,he),V=V.next,q.bufferedRequestCount--,q.writing)break}V===null&&(q.lastBufferedRequest=null)}q.bufferedRequest=V,q.bufferProcessing=!1}X.prototype._write=function(be,q,V){V(new Z("_write()"))},X.prototype._writev=null,X.prototype.end=function(be,q,V){var Q=this._writableState;return typeof be=="function"?(V=be,be=null,q=null):typeof q=="function"&&(V=q,q=null),be!=null&&this.write(be,q),Q.corked&&(Q.corked=1,this.uncork()),Q.ending||fe(this,Q,V),this},Object.defineProperty(X.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ge(be){return be.ending&&be.length===0&&be.bufferedRequest===null&&!be.finished&&!be.writing}function Ce(be,q){be._final(function(V){q.pendingcb--,V&&K(be,V),q.prefinished=!0,be.emit("prefinish"),je(be,q)})}function De(be,q){!q.prefinished&&!q.finalCalled&&(typeof be._final=="function"&&!q.destroyed?(q.pendingcb++,q.finalCalled=!0,p.nextTick(Ce,be,q)):(q.prefinished=!0,be.emit("prefinish")))}function je(be,q){var V=ge(q);if(V&&(De(be,q),q.pendingcb===0&&(q.finished=!0,be.emit("finish"),q.autoDestroy))){var Q=be._readableState;(!Q||Q.autoDestroy&&Q.endEmitted)&&be.destroy()}return V}function fe(be,q,V){q.ending=!0,je(be,q),V&&(q.finished?p.nextTick(V):be.once("finish",V)),q.ended=!0,be.writable=!1}function Y(be,q,V){var Q=be.entry;for(be.entry=null;Q;){var L=Q.callback;q.pendingcb--,L(V),Q=Q.next}q.corkedRequestsFree.next=be}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),X.prototype.destroy=R.destroy,X.prototype._undestroy=R.undestroy,X.prototype._destroy=function(be,q){q(be)}}).call(this)}).call(this,a("_process"),typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(a,N,j){(function(p){(function(){"use strict";var c;function h(k,B,U){return B=y(B),B in k?Object.defineProperty(k,B,{value:U,enumerable:!0,configurable:!0,writable:!0}):k[B]=U,k}function y(k){var B=g(k,"string");return typeof B=="symbol"?B:String(B)}function g(k,B){if(typeof k!="object"||k===null)return k;var U=k[Symbol.toPrimitive];if(U!==void 0){var K=U.call(k,B||"default");if(typeof K!="object")return K;throw new TypeError("@@toPrimitive must return a primitive value.")}return(B==="string"?String:Number)(k)}var w=a("./end-of-stream"),f=Symbol("lastResolve"),v=Symbol("lastReject"),m=Symbol("error"),b=Symbol("ended"),x=Symbol("lastPromise"),R=Symbol("handlePromise"),I=Symbol("stream");function E(k,B){return{value:k,done:B}}function C(k){var B=k[f];if(B!==null){var U=k[I].read();U!==null&&(k[x]=null,k[f]=null,k[v]=null,B(E(U,!1)))}}function P(k){p.nextTick(C,k)}function Z(k,B){return function(U,K){k.then(function(){if(B[b]){U(E(void 0,!0));return}B[R](U,K)},K)}}var M=Object.getPrototypeOf(function(){}),J=Object.setPrototypeOf((c={get stream(){return this[I]},next:function(){var B=this,U=this[m];if(U!==null)return Promise.reject(U);if(this[b])return Promise.resolve(E(void 0,!0));if(this[I].destroyed)return new Promise(function(W,X){p.nextTick(function(){B[m]?X(B[m]):W(E(void 0,!0))})});var K=this[x],G;if(K)G=new Promise(Z(K,this));else{var F=this[I].read();if(F!==null)return Promise.resolve(E(F,!1));G=new Promise(this[R])}return this[x]=G,G}},h(c,Symbol.asyncIterator,function(){return this}),h(c,"return",function(){var B=this;return new Promise(function(U,K){B[I].destroy(null,function(G){if(G){K(G);return}U(E(void 0,!0))})})}),c),M),_=function(B){var U,K=Object.create(J,(U={},h(U,I,{value:B,writable:!0}),h(U,f,{value:null,writable:!0}),h(U,v,{value:null,writable:!0}),h(U,m,{value:null,writable:!0}),h(U,b,{value:B._readableState.endEmitted,writable:!0}),h(U,R,{value:function(F,W){var X=K[I].read();X?(K[x]=null,K[f]=null,K[v]=null,F(E(X,!1))):(K[f]=F,K[v]=W)},writable:!0}),U));return K[x]=null,w(B,function(G){if(G&&G.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=K[v];F!==null&&(K[x]=null,K[f]=null,K[v]=null,F(G)),K[m]=G;return}var W=K[f];W!==null&&(K[x]=null,K[f]=null,K[v]=null,W(E(void 0,!0))),K[b]=!0}),B.on("readable",P.bind(null,K)),K};N.exports=_}).call(this)}).call(this,a("_process"))},{"./end-of-stream":408,_process:467}],406:[function(a,N,j){"use strict";function p(C,P){var Z=Object.keys(C);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(C);P&&(M=M.filter(function(J){return Object.getOwnPropertyDescriptor(C,J).enumerable})),Z.push.apply(Z,M)}return Z}function c(C){for(var P=1;P<arguments.length;P++){var Z=arguments[P]!=null?arguments[P]:{};P%2?p(Object(Z),!0).forEach(function(M){h(C,M,Z[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(Z)):p(Object(Z)).forEach(function(M){Object.defineProperty(C,M,Object.getOwnPropertyDescriptor(Z,M))})}return C}function h(C,P,Z){return P=f(P),P in C?Object.defineProperty(C,P,{value:Z,enumerable:!0,configurable:!0,writable:!0}):C[P]=Z,C}function y(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function g(C,P){for(var Z=0;Z<P.length;Z++){var M=P[Z];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(C,f(M.key),M)}}function w(C,P,Z){return P&&g(C.prototype,P),Z&&g(C,Z),Object.defineProperty(C,"prototype",{writable:!1}),C}function f(C){var P=v(C,"string");return typeof P=="symbol"?P:String(P)}function v(C,P){if(typeof C!="object"||C===null)return C;var Z=C[Symbol.toPrimitive];if(Z!==void 0){var M=Z.call(C,P||"default");if(typeof M!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return(P==="string"?String:Number)(C)}var m=a("buffer"),b=m.Buffer,x=a("util"),R=x.inspect,I=R&&R.custom||"inspect";function E(C,P,Z){b.prototype.copy.call(C,P,Z)}N.exports=function(){function C(){y(this,C),this.head=null,this.tail=null,this.length=0}return w(C,[{key:"push",value:function(Z){var M={data:Z,next:null};this.length>0?this.tail.next=M:this.head=M,this.tail=M,++this.length}},{key:"unshift",value:function(Z){var M={data:Z,next:this.head};this.length===0&&(this.tail=M),this.head=M,++this.length}},{key:"shift",value:function(){if(this.length!==0){var Z=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,Z}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Z){if(this.length===0)return"";for(var M=this.head,J=""+M.data;M=M.next;)J+=Z+M.data;return J}},{key:"concat",value:function(Z){if(this.length===0)return b.alloc(0);for(var M=b.allocUnsafe(Z>>>0),J=this.head,_=0;J;)E(J.data,M,_),_+=J.data.length,J=J.next;return M}},{key:"consume",value:function(Z,M){var J;return Z<this.head.data.length?(J=this.head.data.slice(0,Z),this.head.data=this.head.data.slice(Z)):Z===this.head.data.length?J=this.shift():J=M?this._getString(Z):this._getBuffer(Z),J}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(Z){var M=this.head,J=1,_=M.data;for(Z-=_.length;M=M.next;){var k=M.data,B=Z>k.length?k.length:Z;if(B===k.length?_+=k:_+=k.slice(0,Z),Z-=B,Z===0){B===k.length?(++J,M.next?this.head=M.next:this.head=this.tail=null):(this.head=M,M.data=k.slice(B));break}++J}return this.length-=J,_}},{key:"_getBuffer",value:function(Z){var M=b.allocUnsafe(Z),J=this.head,_=1;for(J.data.copy(M),Z-=J.data.length;J=J.next;){var k=J.data,B=Z>k.length?k.length:Z;if(k.copy(M,M.length-Z,0,B),Z-=B,Z===0){B===k.length?(++_,J.next?this.head=J.next:this.head=this.tail=null):(this.head=J,J.data=k.slice(B));break}++_}return this.length-=_,M}},{key:I,value:function(Z,M){return R(this,c(c({},M),{},{depth:0,customInspect:!1}))}}]),C}()},{buffer:90,util:89}],407:[function(a,N,j){(function(p){(function(){"use strict";function c(v,m){var b=this,x=this._readableState&&this._readableState.destroyed,R=this._writableState&&this._writableState.destroyed;return x||R?(m?m(v):v&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,p.nextTick(w,this,v)):p.nextTick(w,this,v)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(v||null,function(I){!m&&I?b._writableState?b._writableState.errorEmitted?p.nextTick(y,b):(b._writableState.errorEmitted=!0,p.nextTick(h,b,I)):p.nextTick(h,b,I):m?(p.nextTick(y,b),m(I)):p.nextTick(y,b)}),this)}function h(v,m){w(v,m),y(v)}function y(v){v._writableState&&!v._writableState.emitClose||v._readableState&&!v._readableState.emitClose||v.emit("close")}function g(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function w(v,m){v.emit("error",m)}function f(v,m){var b=v._readableState,x=v._writableState;b&&b.autoDestroy||x&&x.autoDestroy?v.destroy(m):v.emit("error",m)}N.exports={destroy:c,undestroy:g,errorOrDestroy:f}}).call(this)}).call(this,a("_process"))},{_process:467}],408:[function(a,N,j){"use strict";var p=a("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function c(w){var f=!1;return function(){if(!f){f=!0;for(var v=arguments.length,m=new Array(v),b=0;b<v;b++)m[b]=arguments[b];w.apply(this,m)}}}function h(){}function y(w){return w.setHeader&&typeof w.abort=="function"}function g(w,f,v){if(typeof f=="function")return g(w,null,f);f||(f={}),v=c(v||h);var m=f.readable||f.readable!==!1&&w.readable,b=f.writable||f.writable!==!1&&w.writable,x=function(){w.writable||I()},R=w._writableState&&w._writableState.finished,I=function(){b=!1,R=!0,m||v.call(w)},E=w._readableState&&w._readableState.endEmitted,C=function(){m=!1,E=!0,b||v.call(w)},P=function(_){v.call(w,_)},Z=function(){var _;if(m&&!E)return(!w._readableState||!w._readableState.ended)&&(_=new p),v.call(w,_);if(b&&!R)return(!w._writableState||!w._writableState.ended)&&(_=new p),v.call(w,_)},M=function(){w.req.on("finish",I)};return y(w)?(w.on("complete",I),w.on("abort",Z),w.req?M():w.on("request",M)):b&&!w._writableState&&(w.on("end",x),w.on("close",x)),w.on("end",C),w.on("finish",I),f.error!==!1&&w.on("error",P),w.on("close",Z),function(){w.removeListener("complete",I),w.removeListener("abort",Z),w.removeListener("request",M),w.req&&w.req.removeListener("finish",I),w.removeListener("end",x),w.removeListener("close",x),w.removeListener("finish",I),w.removeListener("end",C),w.removeListener("error",P),w.removeListener("close",Z)}}N.exports=g},{"../../../errors":399}],409:[function(a,N,j){N.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(a,N,j){"use strict";var p;function c(I){var E=!1;return function(){E||(E=!0,I.apply(void 0,arguments))}}var h=a("../../../errors").codes,y=h.ERR_MISSING_ARGS,g=h.ERR_STREAM_DESTROYED;function w(I){if(I)throw I}function f(I){return I.setHeader&&typeof I.abort=="function"}function v(I,E,C,P){P=c(P);var Z=!1;I.on("close",function(){Z=!0}),p===void 0&&(p=a("./end-of-stream")),p(I,{readable:E,writable:C},function(J){if(J)return P(J);Z=!0,P()});var M=!1;return function(J){if(!Z&&!M){if(M=!0,f(I))return I.abort();if(typeof I.destroy=="function")return I.destroy();P(J||new g("pipe"))}}}function m(I){I()}function b(I,E){return I.pipe(E)}function x(I){return!I.length||typeof I[I.length-1]!="function"?w:I.pop()}function R(){for(var I=arguments.length,E=new Array(I),C=0;C<I;C++)E[C]=arguments[C];var P=x(E);if(Array.isArray(E[0])&&(E=E[0]),E.length<2)throw new y("streams");var Z,M=E.map(function(J,_){var k=_<E.length-1,B=_>0;return v(J,k,B,function(U){Z||(Z=U),U&&M.forEach(m),!k&&(M.forEach(m),P(Z))})});return E.reduce(b)}N.exports=R},{"../../../errors":399,"./end-of-stream":408}],411:[function(a,N,j){"use strict";var p=a("../../../errors").codes.ERR_INVALID_OPT_VALUE;function c(y,g,w){return y.highWaterMark!=null?y.highWaterMark:g?y[w]:null}function h(y,g,w,f){var v=c(g,f,w);if(v!=null){if(!(isFinite(v)&&Math.floor(v)===v)||v<0){var m=f?w:"highWaterMark";throw new p(m,v)}return Math.floor(v)}return y.objectMode?16:16*1024}N.exports={getHighWaterMark:h}},{"../../../errors":399}],412:[function(a,N,j){arguments[4][393][0].apply(j,arguments)},{dup:393,events:344}],413:[function(a,N,j){"use strict";var p=a("safe-buffer").Buffer,c=p.isEncoding||function(M){switch(M=""+M,M&&M.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function h(M){if(!M)return"utf8";for(var J;;)switch(M){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return M;default:if(J)return;M=(""+M).toLowerCase(),J=!0}}function y(M){var J=h(M);if(typeof J!="string"&&(p.isEncoding===c||!c(M)))throw new Error("Unknown encoding: "+M);return J||M}j.StringDecoder=g;function g(M){this.encoding=y(M);var J;switch(this.encoding){case"utf16le":this.text=R,this.end=I,J=4;break;case"utf8":this.fillLast=m,J=4;break;case"base64":this.text=E,this.end=C,J=3;break;default:this.write=P,this.end=Z;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=p.allocUnsafe(J)}g.prototype.write=function(M){if(M.length===0)return"";var J,_;if(this.lastNeed){if(J=this.fillLast(M),J===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<M.length?J?J+this.text(M,_):this.text(M,_):J||""},g.prototype.end=x,g.prototype.text=b,g.prototype.fillLast=function(M){if(this.lastNeed<=M.length)return M.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);M.copy(this.lastChar,this.lastTotal-this.lastNeed,0,M.length),this.lastNeed-=M.length};function w(M){return M<=127?0:M>>5===6?2:M>>4===14?3:M>>3===30?4:M>>6===2?-1:-2}function f(M,J,_){var k=J.length-1;if(k<_)return 0;var B=w(J[k]);return B>=0?(B>0&&(M.lastNeed=B-1),B):--k<_||B===-2?0:(B=w(J[k]),B>=0?(B>0&&(M.lastNeed=B-2),B):--k<_||B===-2?0:(B=w(J[k]),B>=0?(B>0&&(B===2?B=0:M.lastNeed=B-3),B):0))}function v(M,J,_){if((J[0]&192)!==128)return M.lastNeed=0,"\uFFFD";if(M.lastNeed>1&&J.length>1){if((J[1]&192)!==128)return M.lastNeed=1,"\uFFFD";if(M.lastNeed>2&&J.length>2&&(J[2]&192)!==128)return M.lastNeed=2,"\uFFFD"}}function m(M){var J=this.lastTotal-this.lastNeed,_=v(this,M,J);if(_!==void 0)return _;if(this.lastNeed<=M.length)return M.copy(this.lastChar,J,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);M.copy(this.lastChar,J,0,M.length),this.lastNeed-=M.length}function b(M,J){var _=f(this,M,J);if(!this.lastNeed)return M.toString("utf8",J);this.lastTotal=_;var k=M.length-(_-this.lastNeed);return M.copy(this.lastChar,0,k),M.toString("utf8",J,k)}function x(M){var J=M&&M.length?this.write(M):"";return this.lastNeed?J+"\uFFFD":J}function R(M,J){if((M.length-J)%2===0){var _=M.toString("utf16le",J);if(_){var k=_.charCodeAt(_.length-1);if(k>=55296&&k<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=M[M.length-1],M.toString("utf16le",J,M.length-1)}function I(M){var J=M&&M.length?this.write(M):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return J+this.lastChar.toString("utf16le",0,_)}return J}function E(M,J){var _=(M.length-J)%3;return _===0?M.toString("base64",J):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=M[M.length-1]:(this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1]),M.toString("base64",J,M.length-_))}function C(M){var J=M&&M.length?this.write(M):"";return this.lastNeed?J+this.lastChar.toString("base64",0,3-this.lastNeed):J}function P(M){return M.toString(this.encoding)}function Z(M){return M&&M.length?this.write(M):""}},{"safe-buffer":396}],414:[function(a,N,j){(function(p,c){(function(){var h=a("process/browser.js").nextTick,y=Function.prototype.apply,g=Array.prototype.slice,w={},f=0;j.setTimeout=function(){return new v(y.call(setTimeout,window,arguments),clearTimeout)},j.setInterval=function(){return new v(y.call(setInterval,window,arguments),clearInterval)},j.clearTimeout=j.clearInterval=function(m){m.close()};function v(m,b){this._id=m,this._clearFn=b}v.prototype.unref=v.prototype.ref=function(){},v.prototype.close=function(){this._clearFn.call(window,this._id)},j.enroll=function(m,b){clearTimeout(m._idleTimeoutId),m._idleTimeout=b},j.unenroll=function(m){clearTimeout(m._idleTimeoutId),m._idleTimeout=-1},j._unrefActive=j.active=function(m){clearTimeout(m._idleTimeoutId);var b=m._idleTimeout;b>=0&&(m._idleTimeoutId=setTimeout(function(){m._onTimeout&&m._onTimeout()},b))},j.setImmediate=typeof p=="function"?p:function(m){var b=f++,x=arguments.length<2?!1:g.call(arguments,1);return w[b]=!0,h(function(){w[b]&&(x?m.apply(null,x):m.call(null),j.clearImmediate(b))}),b},j.clearImmediate=typeof c=="function"?c:function(m){delete w[m]}}).call(this)}).call(this,a("timers").setImmediate,a("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(a,N,j){var p=a("buffer").Buffer;N.exports=function(c){if(c instanceof Uint8Array){if(c.byteOffset===0&&c.byteLength===c.buffer.byteLength)return c.buffer;if(typeof c.buffer.slice=="function")return c.buffer.slice(c.byteOffset,c.byteOffset+c.byteLength)}if(p.isBuffer(c)){for(var h=new Uint8Array(c.length),y=c.length,g=0;g<y;g++)h[g]=c[g];return h.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(a,N,j){(function(p){(function(){N.exports=c;function c(y,g){if(h("noDeprecation"))return y;var w=!1;function f(){if(!w){if(h("throwDeprecation"))throw new Error(g);h("traceDeprecation")?console.trace(g):console.warn(g),w=!0}return y.apply(this,arguments)}return f}function h(y){try{if(!p.localStorage)return!1}catch(w){return!1}var g=p.localStorage[y];return g==null?!1:String(g).toLowerCase()==="true"}}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(a,N,j){arguments[4][84][0].apply(j,arguments)},{dup:84}],418:[function(a,N,j){"use strict";var p=a("is-arguments"),c=a("is-generator-function"),h=a("which-typed-array"),y=a("is-typed-array");function g(ne){return ne.call.bind(ne)}var w=typeof BigInt!="undefined",f=typeof Symbol!="undefined",v=g(Object.prototype.toString),m=g(Number.prototype.valueOf),b=g(String.prototype.valueOf),x=g(Boolean.prototype.valueOf);if(w)var R=g(BigInt.prototype.valueOf);if(f)var I=g(Symbol.prototype.valueOf);function E(ne,he){if(typeof ne!="object")return!1;try{return he(ne),!0}catch(Pe){return!1}}j.isArgumentsObject=p,j.isGeneratorFunction=c,j.isTypedArray=y;function C(ne){return typeof Promise!="undefined"&&ne instanceof Promise||ne!==null&&typeof ne=="object"&&typeof ne.then=="function"&&typeof ne.catch=="function"}j.isPromise=C;function P(ne){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ne):y(ne)||le(ne)}j.isArrayBufferView=P;function Z(ne){return h(ne)==="Uint8Array"}j.isUint8Array=Z;function M(ne){return h(ne)==="Uint8ClampedArray"}j.isUint8ClampedArray=M;function J(ne){return h(ne)==="Uint16Array"}j.isUint16Array=J;function _(ne){return h(ne)==="Uint32Array"}j.isUint32Array=_;function k(ne){return h(ne)==="Int8Array"}j.isInt8Array=k;function B(ne){return h(ne)==="Int16Array"}j.isInt16Array=B;function U(ne){return h(ne)==="Int32Array"}j.isInt32Array=U;function K(ne){return h(ne)==="Float32Array"}j.isFloat32Array=K;function G(ne){return h(ne)==="Float64Array"}j.isFloat64Array=G;function F(ne){return h(ne)==="BigInt64Array"}j.isBigInt64Array=F;function W(ne){return h(ne)==="BigUint64Array"}j.isBigUint64Array=W;function X(ne){return v(ne)==="[object Map]"}X.working=typeof Map!="undefined"&&X(new Map);function re(ne){return typeof Map=="undefined"?!1:X.working?X(ne):ne instanceof Map}j.isMap=re;function oe(ne){return v(ne)==="[object Set]"}oe.working=typeof Set!="undefined"&&oe(new Set);function pe(ne){return typeof Set=="undefined"?!1:oe.working?oe(ne):ne instanceof Set}j.isSet=pe;function ie(ne){return v(ne)==="[object WeakMap]"}ie.working=typeof WeakMap!="undefined"&&ie(new WeakMap);function Ie(ne){return typeof WeakMap=="undefined"?!1:ie.working?ie(ne):ne instanceof WeakMap}j.isWeakMap=Ie;function ee(ne){return v(ne)==="[object WeakSet]"}ee.working=typeof WeakSet!="undefined"&&ee(new WeakSet);function de(ne){return ee(ne)}j.isWeakSet=de;function me(ne){return v(ne)==="[object ArrayBuffer]"}me.working=typeof ArrayBuffer!="undefined"&&me(new ArrayBuffer);function xe(ne){return typeof ArrayBuffer=="undefined"?!1:me.working?me(ne):ne instanceof ArrayBuffer}j.isArrayBuffer=xe;function ce(ne){return v(ne)==="[object DataView]"}ce.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&ce(new DataView(new ArrayBuffer(1),0,1));function le(ne){return typeof DataView=="undefined"?!1:ce.working?ce(ne):ne instanceof DataView}j.isDataView=le;var ge=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function Ce(ne){return v(ne)==="[object SharedArrayBuffer]"}function De(ne){return typeof ge=="undefined"?!1:(typeof Ce.working=="undefined"&&(Ce.working=Ce(new ge)),Ce.working?Ce(ne):ne instanceof ge)}j.isSharedArrayBuffer=De;function je(ne){return v(ne)==="[object AsyncFunction]"}j.isAsyncFunction=je;function fe(ne){return v(ne)==="[object Map Iterator]"}j.isMapIterator=fe;function Y(ne){return v(ne)==="[object Set Iterator]"}j.isSetIterator=Y;function be(ne){return v(ne)==="[object Generator]"}j.isGeneratorObject=be;function q(ne){return v(ne)==="[object WebAssembly.Module]"}j.isWebAssemblyCompiledModule=q;function V(ne){return E(ne,m)}j.isNumberObject=V;function Q(ne){return E(ne,b)}j.isStringObject=Q;function L(ne){return E(ne,x)}j.isBooleanObject=L;function $(ne){return w&&E(ne,R)}j.isBigIntObject=$;function S(ne){return f&&E(ne,I)}j.isSymbolObject=S;function T(ne){return V(ne)||Q(ne)||L(ne)||$(ne)||S(ne)}j.isBoxedPrimitive=T;function z(ne){return typeof Uint8Array!="undefined"&&(xe(ne)||De(ne))}j.isAnyArrayBuffer=z,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ne){Object.defineProperty(j,ne,{enumerable:!1,value:function(){throw new Error(ne+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(a,N,j){(function(p){(function(){var c=Object.getOwnPropertyDescriptors||function(ge){for(var Ce=Object.keys(ge),De={},je=0;je<Ce.length;je++)De[Ce[je]]=Object.getOwnPropertyDescriptor(ge,Ce[je]);return De},h=/%[sdj%]/g;j.format=function(le){if(!B(le)){for(var ge=[],Ce=0;Ce<arguments.length;Ce++)ge.push(f(arguments[Ce]));return ge.join(" ")}for(var Ce=1,De=arguments,je=De.length,fe=String(le).replace(h,function(be){if(be==="%%")return"%";if(Ce>=je)return be;switch(be){case"%s":return String(De[Ce++]);case"%d":return Number(De[Ce++]);case"%j":try{return JSON.stringify(De[Ce++])}catch(q){return"[Circular]"}default:return be}}),Y=De[Ce];Ce<je;Y=De[++Ce])J(Y)||!F(Y)?fe+=" "+Y:fe+=" "+f(Y);return fe},j.deprecate=function(le,ge){if(typeof p!="undefined"&&p.noDeprecation===!0)return le;if(typeof p=="undefined")return function(){return j.deprecate(le,ge).apply(this,arguments)};var Ce=!1;function De(){if(!Ce){if(p.throwDeprecation)throw new Error(ge);p.traceDeprecation?console.trace(ge):console.error(ge),Ce=!0}return le.apply(this,arguments)}return De};var y={},g=/^$/;if(p.env.NODE_DEBUG){var w=p.env.NODE_DEBUG;w=w.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),g=new RegExp("^"+w+"$","i")}j.debuglog=function(le){if(le=le.toUpperCase(),!y[le])if(g.test(le)){var ge=p.pid;y[le]=function(){var Ce=j.format.apply(j,arguments);console.error("%s %d: %s",le,ge,Ce)}}else y[le]=function(){};return y[le]};function f(le,ge){var Ce={seen:[],stylize:m};return arguments.length>=3&&(Ce.depth=arguments[2]),arguments.length>=4&&(Ce.colors=arguments[3]),M(ge)?Ce.showHidden=ge:ge&&j._extend(Ce,ge),K(Ce.showHidden)&&(Ce.showHidden=!1),K(Ce.depth)&&(Ce.depth=2),K(Ce.colors)&&(Ce.colors=!1),K(Ce.customInspect)&&(Ce.customInspect=!0),Ce.colors&&(Ce.stylize=v),x(Ce,le,Ce.depth)}j.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function v(le,ge){var Ce=f.styles[ge];return Ce?"\x1B["+f.colors[Ce][0]+"m"+le+"\x1B["+f.colors[Ce][1]+"m":le}function m(le,ge){return le}function b(le){var ge={};return le.forEach(function(Ce,De){ge[Ce]=!0}),ge}function x(le,ge,Ce){if(le.customInspect&&ge&&re(ge.inspect)&&ge.inspect!==j.inspect&&!(ge.constructor&&ge.constructor.prototype===ge)){var De=ge.inspect(Ce,le);return B(De)||(De=x(le,De,Ce)),De}var je=R(le,ge);if(je)return je;var fe=Object.keys(ge),Y=b(fe);if(le.showHidden&&(fe=Object.getOwnPropertyNames(ge)),X(ge)&&(fe.indexOf("message")>=0||fe.indexOf("description")>=0))return I(ge);if(fe.length===0){if(re(ge)){var be=ge.name?": "+ge.name:"";return le.stylize("[Function"+be+"]","special")}if(G(ge))return le.stylize(RegExp.prototype.toString.call(ge),"regexp");if(W(ge))return le.stylize(Date.prototype.toString.call(ge),"date");if(X(ge))return I(ge)}var q="",V=!1,Q=["{","}"];if(Z(ge)&&(V=!0,Q=["[","]"]),re(ge)){var L=ge.name?": "+ge.name:"";q=" [Function"+L+"]"}if(G(ge)&&(q=" "+RegExp.prototype.toString.call(ge)),W(ge)&&(q=" "+Date.prototype.toUTCString.call(ge)),X(ge)&&(q=" "+I(ge)),fe.length===0&&(!V||ge.length==0))return Q[0]+q+Q[1];if(Ce<0)return G(ge)?le.stylize(RegExp.prototype.toString.call(ge),"regexp"):le.stylize("[Object]","special");le.seen.push(ge);var $;return V?$=E(le,ge,Ce,Y,fe):$=fe.map(function(S){return C(le,ge,Ce,Y,S,V)}),le.seen.pop(),P($,q,Q)}function R(le,ge){if(K(ge))return le.stylize("undefined","undefined");if(B(ge)){var Ce="'"+JSON.stringify(ge).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return le.stylize(Ce,"string")}if(k(ge))return le.stylize(""+ge,"number");if(M(ge))return le.stylize(""+ge,"boolean");if(J(ge))return le.stylize("null","null")}function I(le){return"["+Error.prototype.toString.call(le)+"]"}function E(le,ge,Ce,De,je){for(var fe=[],Y=0,be=ge.length;Y<be;++Y)de(ge,String(Y))?fe.push(C(le,ge,Ce,De,String(Y),!0)):fe.push("");return je.forEach(function(q){q.match(/^\d+$/)||fe.push(C(le,ge,Ce,De,q,!0))}),fe}function C(le,ge,Ce,De,je,fe){var Y,be,q;if(q=Object.getOwnPropertyDescriptor(ge,je)||{value:ge[je]},q.get?q.set?be=le.stylize("[Getter/Setter]","special"):be=le.stylize("[Getter]","special"):q.set&&(be=le.stylize("[Setter]","special")),de(De,je)||(Y="["+je+"]"),be||(le.seen.indexOf(q.value)<0?(J(Ce)?be=x(le,q.value,null):be=x(le,q.value,Ce-1),be.indexOf(`
`)>-1&&(fe?be=be.split(`
`).map(function(V){return" "+V}).join(`
`).slice(2):be=`
`+be.split(`
`).map(function(V){return" "+V}).join(`
`))):be=le.stylize("[Circular]","special")),K(Y)){if(fe&&je.match(/^\d+$/))return be;Y=JSON.stringify(""+je),Y.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Y=Y.slice(1,-1),Y=le.stylize(Y,"name")):(Y=Y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Y=le.stylize(Y,"string"))}return Y+": "+be}function P(le,ge,Ce){var De=0,je=le.reduce(function(fe,Y){return De++,Y.indexOf(`
`)>=0&&De++,fe+Y.replace(/\u001b\[\d\d?m/g,"").length+1},0);return je>60?Ce[0]+(ge===""?"":ge+`
`)+" "+le.join(`,
`)+" "+Ce[1]:Ce[0]+ge+" "+le.join(", ")+" "+Ce[1]}j.types=a("./support/types");function Z(le){return Array.isArray(le)}j.isArray=Z;function M(le){return typeof le=="boolean"}j.isBoolean=M;function J(le){return le===null}j.isNull=J;function _(le){return le==null}j.isNullOrUndefined=_;function k(le){return typeof le=="number"}j.isNumber=k;function B(le){return typeof le=="string"}j.isString=B;function U(le){return typeof le=="symbol"}j.isSymbol=U;function K(le){return le===void 0}j.isUndefined=K;function G(le){return F(le)&&pe(le)==="[object RegExp]"}j.isRegExp=G,j.types.isRegExp=G;function F(le){return typeof le=="object"&&le!==null}j.isObject=F;function W(le){return F(le)&&pe(le)==="[object Date]"}j.isDate=W,j.types.isDate=W;function X(le){return F(le)&&(pe(le)==="[object Error]"||le instanceof Error)}j.isError=X,j.types.isNativeError=X;function re(le){return typeof le=="function"}j.isFunction=re;function oe(le){return le===null||typeof le=="boolean"||typeof le=="number"||typeof le=="string"||typeof le=="symbol"||typeof le=="undefined"}j.isPrimitive=oe,j.isBuffer=a("./support/isBuffer");function pe(le){return Object.prototype.toString.call(le)}function ie(le){return le<10?"0"+le.toString(10):le.toString(10)}var Ie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ee(){var le=new Date,ge=[ie(le.getHours()),ie(le.getMinutes()),ie(le.getSeconds())].join(":");return[le.getDate(),Ie[le.getMonth()],ge].join(" ")}j.log=function(){console.log("%s - %s",ee(),j.format.apply(j,arguments))},j.inherits=a("inherits"),j._extend=function(le,ge){if(!ge||!F(ge))return le;for(var Ce=Object.keys(ge),De=Ce.length;De--;)le[Ce[De]]=ge[Ce[De]];return le};function de(le,ge){return Object.prototype.hasOwnProperty.call(le,ge)}var me=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;j.promisify=function(ge){if(typeof ge!="function")throw new TypeError('The "original" argument must be of type Function');if(me&&ge[me]){var Ce=ge[me];if(typeof Ce!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Ce,me,{value:Ce,enumerable:!1,writable:!1,configurable:!0}),Ce}function Ce(){for(var De,je,fe=new Promise(function(q,V){De=q,je=V}),Y=[],be=0;be<arguments.length;be++)Y.push(arguments[be]);Y.push(function(q,V){q?je(q):De(V)});try{ge.apply(this,Y)}catch(q){je(q)}return fe}return Object.setPrototypeOf(Ce,Object.getPrototypeOf(ge)),me&&Object.defineProperty(Ce,me,{value:Ce,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Ce,c(ge))},j.promisify.custom=me;function xe(le,ge){if(!le){var Ce=new Error("Promise was rejected with a falsy value");Ce.reason=le,le=Ce}return ge(le)}function ce(le){if(typeof le!="function")throw new TypeError('The "original" argument must be of type Function');function ge(){for(var Ce=[],De=0;De<arguments.length;De++)Ce.push(arguments[De]);var je=Ce.pop();if(typeof je!="function")throw new TypeError("The last argument must be of type Function");var fe=this,Y=function(){return je.apply(fe,arguments)};le.apply(this,Ce).then(function(be){p.nextTick(Y.bind(null,null,be))},function(be){p.nextTick(xe.bind(null,be,Y))})}return Object.setPrototypeOf(ge,Object.getPrototypeOf(le)),Object.defineProperties(ge,c(le)),ge}j.callbackify=ce}).call(this)}).call(this,a("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(a,N,j){(function(p){(function(){"use strict";var c=a("for-each"),h=a("available-typed-arrays"),y=a("call-bind"),g=a("call-bind/callBound"),w=a("gopd"),f=g("Object.prototype.toString"),v=a("has-tostringtag/shams")(),m=typeof globalThis=="undefined"?p:globalThis,b=h(),x=g("String.prototype.slice"),R=Object.getPrototypeOf,I=g("Array.prototype.indexOf",!0)||function(M,J){for(var _=0;_<M.length;_+=1)if(M[_]===J)return _;return-1},E={__proto__:null};v&&w&&R?c(b,function(Z){var M=new m[Z];if(Symbol.toStringTag in M){var J=R(M),_=w(J,Symbol.toStringTag);if(!_){var k=R(J);_=w(k,Symbol.toStringTag)}E["$"+Z]=y(_.get)}}):c(b,function(Z){var M=new m[Z];E["$"+Z]=y(M.slice)});var C=function(M){var J=!1;return c(E,function(_,k){if(!J)try{"$"+_(M)===k&&(J=x(k,1))}catch(B){}}),J},P=function(M){var J=!1;return c(E,function(_,k){if(!J)try{_(M),J=x(k,1)}catch(B){}}),J};N.exports=function(M){if(!M||typeof M!="object")return!1;if(!v){var J=x(f(M),8,-1);return I(b,J)>-1?J:J!=="Object"?!1:P(M)}return w?C(M):null}}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(a,N,j){(function(){"use strict";j.stripBOM=function(p){return p[0]==="\uFEFF"?p.substring(1):p}}).call(this)},{}],422:[function(a,N,j){(function(){"use strict";var p,c,h,y,g,w={}.hasOwnProperty;p=a("xmlbuilder"),c=a("./defaults").defaults,y=function(f){return typeof f=="string"&&(f.indexOf("&")>=0||f.indexOf(">")>=0||f.indexOf("<")>=0)},g=function(f){return"<![CDATA["+h(f)+"]]>"},h=function(f){return f.replace("]]>","]]]]><![CDATA[>")},j.Builder=function(){function f(v){var m,b,x;this.options={},b=c["0.2"];for(m in b)w.call(b,m)&&(x=b[m],this.options[m]=x);for(m in v)w.call(v,m)&&(x=v[m],this.options[m]=x)}return f.prototype.buildObject=function(v){var m,b,x,R,I;return m=this.options.attrkey,b=this.options.charkey,Object.keys(v).length===1&&this.options.rootName===c["0.2"].rootName?(I=Object.keys(v)[0],v=v[I]):I=this.options.rootName,x=function(E){return function(C,P){var Z,M,J,_,k,B;if(typeof P!="object")E.options.cdata&&y(P)?C.raw(g(P)):C.txt(P);else if(Array.isArray(P)){for(_ in P)if(w.call(P,_)){M=P[_];for(k in M)J=M[k],C=x(C.ele(k),J).up()}}else for(k in P)if(w.call(P,k))if(M=P[k],k===m){if(typeof M=="object")for(Z in M)B=M[Z],C=C.att(Z,B)}else if(k===b)E.options.cdata&&y(M)?C=C.raw(g(M)):C=C.txt(M);else if(Array.isArray(M))for(_ in M)w.call(M,_)&&(J=M[_],typeof J=="string"?E.options.cdata&&y(J)?C=C.ele(k).raw(g(J)).up():C=C.ele(k,J).up():C=x(C.ele(k),J).up());else typeof M=="object"?C=x(C.ele(k),M).up():typeof M=="string"&&E.options.cdata&&y(M)?C=C.ele(k).raw(g(M)).up():(M==null&&(M=""),C=C.ele(k,M.toString()).up());return C}}(this),R=p.create(I,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),x(R,v).end(this.options.renderOpts)},f}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(a,N,j){(function(){j.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(a,N,j){(function(){"use strict";var p,c,h,y,g,w,f,v,m,b=function(I,E){return function(){return I.apply(E,arguments)}},x=function(I,E){for(var C in E)R.call(E,C)&&(I[C]=E[C]);function P(){this.constructor=I}return P.prototype=E.prototype,I.prototype=new P,I.__super__=E.prototype,I},R={}.hasOwnProperty;v=a("sax"),y=a("events"),p=a("./bom"),f=a("./processors"),m=a("timers").setImmediate,c=a("./defaults").defaults,g=function(I){return typeof I=="object"&&I!=null&&Object.keys(I).length===0},w=function(I,E,C){var P,Z,M;for(P=0,Z=I.length;P<Z;P++)M=I[P],E=M(E,C);return E},h=function(I,E,C){var P;return P=Object.create(null),P.value=C,P.writable=!0,P.enumerable=!0,P.configurable=!0,Object.defineProperty(I,E,P)},j.Parser=function(I){x(E,I);function E(C){this.parseStringPromise=b(this.parseStringPromise,this),this.parseString=b(this.parseString,this),this.reset=b(this.reset,this),this.assignOrPush=b(this.assignOrPush,this),this.processAsync=b(this.processAsync,this);var P,Z,M;if(!(this instanceof j.Parser))return new j.Parser(C);this.options={},Z=c["0.2"];for(P in Z)R.call(Z,P)&&(M=Z[P],this.options[P]=M);for(P in C)R.call(C,P)&&(M=C[P],this.options[P]=M);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(f.normalize)),this.reset()}return E.prototype.processAsync=function(){var C,P;try{return this.remaining.length<=this.options.chunkSize?(C=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(C),this.saxParser.close()):(C=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(C),m(this.processAsync))}catch(Z){if(P=Z,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(P)}},E.prototype.assignOrPush=function(C,P,Z){return P in C?(C[P]instanceof Array||h(C,P,[C[P]]),C[P].push(Z)):this.options.explicitArray?h(C,P,[Z]):h(C,P,Z)},E.prototype.reset=function(){var C,P,Z,M;return this.removeAllListeners(),this.saxParser=v.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(J){return function(_){if(J.saxParser.resume(),!J.saxParser.errThrown)return J.saxParser.errThrown=!0,J.emit("error",_)}}(this),this.saxParser.onend=function(J){return function(){if(!J.saxParser.ended)return J.saxParser.ended=!0,J.emit("end",J.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,M=[],C=this.options.attrkey,P=this.options.charkey,this.saxParser.onopentag=function(J){return function(_){var k,B,U,K,G;if(U={},U[P]="",!J.options.ignoreAttrs){G=_.attributes;for(k in G)R.call(G,k)&&(!(C in U)&&!J.options.mergeAttrs&&(U[C]={}),B=J.options.attrValueProcessors?w(J.options.attrValueProcessors,_.attributes[k],k):_.attributes[k],K=J.options.attrNameProcessors?w(J.options.attrNameProcessors,k):k,J.options.mergeAttrs?J.assignOrPush(U,K,B):h(U[C],K,B))}return U["#name"]=J.options.tagNameProcessors?w(J.options.tagNameProcessors,_.name):_.name,J.options.xmlns&&(U[J.options.xmlnskey]={uri:_.uri,local:_.local}),M.push(U)}}(this),this.saxParser.onclosetag=function(J){return function(){var _,k,B,U,K,G,F,W,X,re;if(G=M.pop(),K=G["#name"],(!J.options.explicitChildren||!J.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(_=G.cdata,delete G.cdata),X=M[M.length-1],G[P].match(/^\s*$/)&&!_?(k=G[P],delete G[P]):(J.options.trim&&(G[P]=G[P].trim()),J.options.normalize&&(G[P]=G[P].replace(/\s{2,}/g," ").trim()),G[P]=J.options.valueProcessors?w(J.options.valueProcessors,G[P],K):G[P],Object.keys(G).length===1&&P in G&&!J.EXPLICIT_CHARKEY&&(G=G[P])),g(G)&&(typeof J.options.emptyTag=="function"?G=J.options.emptyTag():G=J.options.emptyTag!==""?J.options.emptyTag:k),J.options.validator!=null&&(re="/"+function(){var oe,pe,ie;for(ie=[],oe=0,pe=M.length;oe<pe;oe++)U=M[oe],ie.push(U["#name"]);return ie}().concat(K).join("/"),function(){var oe;try{return G=J.options.validator(re,X&&X[K],G)}catch(pe){return oe=pe,J.emit("error",oe)}}()),J.options.explicitChildren&&!J.options.mergeAttrs&&typeof G=="object"){if(!J.options.preserveChildrenOrder)U={},J.options.attrkey in G&&(U[J.options.attrkey]=G[J.options.attrkey],delete G[J.options.attrkey]),!J.options.charsAsChildren&&J.options.charkey in G&&(U[J.options.charkey]=G[J.options.charkey],delete G[J.options.charkey]),Object.getOwnPropertyNames(G).length>0&&(U[J.options.childkey]=G),G=U;else if(X){X[J.options.childkey]=X[J.options.childkey]||[],F={};for(B in G)R.call(G,B)&&h(F,B,G[B]);X[J.options.childkey].push(F),delete G["#name"],Object.keys(G).length===1&&P in G&&!J.EXPLICIT_CHARKEY&&(G=G[P])}}return M.length>0?J.assignOrPush(X,K,G):(J.options.explicitRoot&&(W=G,G={},h(G,K,W)),J.resultObject=G,J.saxParser.ended=!0,J.emit("end",J.resultObject))}}(this),Z=function(J){return function(_){var k,B;if(B=M[M.length-1],B)return B[P]+=_,J.options.explicitChildren&&J.options.preserveChildrenOrder&&J.options.charsAsChildren&&(J.options.includeWhiteChars||_.replace(/\\n/g,"").trim()!=="")&&(B[J.options.childkey]=B[J.options.childkey]||[],k={"#name":"__text__"},k[P]=_,J.options.normalize&&(k[P]=k[P].replace(/\s{2,}/g," ").trim()),B[J.options.childkey].push(k)),B}}(this),this.saxParser.ontext=Z,this.saxParser.oncdata=function(J){return function(_){var k;if(k=Z(_),k)return k.cdata=!0}}(this)},E.prototype.parseString=function(C,P){var Z;P!=null&&typeof P=="function"&&(this.on("end",function(M){return this.reset(),P(null,M)}),this.on("error",function(M){return this.reset(),P(M)}));try{return C=C.toString(),C.trim()===""?(this.emit("end",null),!0):(C=p.stripBOM(C),this.options.async?(this.remaining=C,m(this.processAsync),this.saxParser):this.saxParser.write(C).close())}catch(M){if(Z=M,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Z}else return this.emit("error",Z),this.saxParser.errThrown=!0}},E.prototype.parseStringPromise=function(C){return new Promise(function(P){return function(Z,M){return P.parseString(C,function(J,_){return J?M(J):Z(_)})}}(this))},E}(y),j.parseString=function(I,E,C){var P,Z,M;return C!=null?(typeof C=="function"&&(P=C),typeof E=="object"&&(Z=E)):(typeof E=="function"&&(P=E),Z={}),M=new j.Parser(Z),M.parseString(I,P)},j.parseStringPromise=function(I,E){var C,P;return typeof E=="object"&&(C=E),P=new j.Parser(C),P.parseStringPromise(I)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(a,N,j){(function(){"use strict";var p;p=new RegExp(/(?!xmlns)^.*:/),j.normalize=function(c){return c.toLowerCase()},j.firstCharLowerCase=function(c){return c.charAt(0).toLowerCase()+c.slice(1)},j.stripPrefix=function(c){return c.replace(p,"")},j.parseNumbers=function(c){return isNaN(c)||(c=c%1===0?parseInt(c,10):parseFloat(c)),c},j.parseBooleans=function(c){return/^(?:true|false)$/i.test(c)&&(c=c.toLowerCase()==="true"),c}}).call(this)},{}],426:[function(a,N,j){(function(){"use strict";var p,c,h,y,g=function(f,v){for(var m in v)w.call(v,m)&&(f[m]=v[m]);function b(){this.constructor=f}return b.prototype=v.prototype,f.prototype=new b,f.__super__=v.prototype,f},w={}.hasOwnProperty;c=a("./defaults"),p=a("./builder"),h=a("./parser"),y=a("./processors"),j.defaults=c.defaults,j.processors=y,j.ValidationError=function(f){g(v,f);function v(m){this.message=m}return v}(Error),j.Builder=p.Builder,j.Parser=h.Parser,j.parseString=h.parseString,j.parseStringPromise=h.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(a,N,j){(function(){N.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(a,N,j){(function(){N.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(a,N,j){(function(){var p,c,h,y,g,w,f,v=[].slice,m={}.hasOwnProperty;p=function(){var b,x,R,I,E,C;if(C=arguments[0],E=2<=arguments.length?v.call(arguments,1):[],g(Object.assign))Object.assign.apply(null,arguments);else for(b=0,R=E.length;b<R;b++)if(I=E[b],I!=null)for(x in I)m.call(I,x)&&(C[x]=I[x]);return C},g=function(b){return!!b&&Object.prototype.toString.call(b)==="[object Function]"},w=function(b){var x;return!!b&&((x=typeof b)=="function"||x==="object")},h=function(b){return g(Array.isArray)?Array.isArray(b):Object.prototype.toString.call(b)==="[object Array]"},y=function(b){var x;if(h(b))return!b.length;for(x in b)if(m.call(b,x))return!1;return!0},f=function(b){var x,R;return w(b)&&(R=Object.getPrototypeOf(b))&&(x=R.constructor)&&typeof x=="function"&&x instanceof x&&Function.prototype.toString.call(x)===Function.prototype.toString.call(Object)},c=function(b){return g(b.valueOf)?b.valueOf():b},N.exports.assign=p,N.exports.isFunction=g,N.exports.isObject=w,N.exports.isArray=h,N.exports.isEmpty=y,N.exports.isPlainObject=f,N.exports.getValue=c}).call(this)},{}],430:[function(a,N,j){(function(){N.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(a,N,j){(function(){var p,c,h;p=a("./NodeType"),h=a("./XMLNode"),N.exports=c=function(){function y(g,w,f){if(this.parent=g,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),w==null)throw new Error("Missing attribute name. "+this.debugInfo(w));this.name=this.stringify.name(w),this.value=this.stringify.attValue(f),this.type=p.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(y.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(y.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(y.prototype,"textContent",{get:function(){return this.value},set:function(g){return this.value=g||""}}),Object.defineProperty(y.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(y.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(y.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"specified",{get:function(){return!0}}),y.prototype.clone=function(){return Object.create(this)},y.prototype.toString=function(g){return this.options.writer.attribute(this,this.options.writer.filterOptions(g))},y.prototype.debugInfo=function(g){return g=g||this.name,g==null?"parent: <"+this.parent.name+">":"attribute: {"+g+"}, parent: <"+this.parent.name+">"},y.prototype.isEqualNode=function(g){return!(g.namespaceURI!==this.namespaceURI||g.prefix!==this.prefix||g.localName!==this.localName||g.value!==this.value)},y}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(a,N,j){(function(){var p,c,h,y=function(w,f){for(var v in f)g.call(f,v)&&(w[v]=f[v]);function m(){this.constructor=w}return m.prototype=f.prototype,w.prototype=new m,w.__super__=f.prototype,w},g={}.hasOwnProperty;p=a("./NodeType"),h=a("./XMLCharacterData"),N.exports=c=function(w){y(f,w);function f(v,m){if(f.__super__.constructor.call(this,v),m==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=p.CData,this.value=this.stringify.cdata(m)}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(v){return this.options.writer.cdata(this,this.options.writer.filterOptions(v))},f}(h)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(a,N,j){(function(){var p,c,h=function(g,w){for(var f in w)y.call(w,f)&&(g[f]=w[f]);function v(){this.constructor=g}return v.prototype=w.prototype,g.prototype=new v,g.__super__=w.prototype,g},y={}.hasOwnProperty;c=a("./XMLNode"),N.exports=p=function(g){h(w,g);function w(f){w.__super__.constructor.call(this,f),this.value=""}return Object.defineProperty(w.prototype,"data",{get:function(){return this.value},set:function(f){return this.value=f||""}}),Object.defineProperty(w.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(w.prototype,"textContent",{get:function(){return this.value},set:function(f){return this.value=f||""}}),w.prototype.clone=function(){return Object.create(this)},w.prototype.substringData=function(f,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendData=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.insertData=function(f,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.deleteData=function(f,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.replaceData=function(f,v,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(f){return!(!w.__super__.isEqualNode.apply(this,arguments).isEqualNode(f)||f.data!==this.data)},w}(c)}).call(this)},{"./XMLNode":450}],434:[function(a,N,j){(function(){var p,c,h,y=function(w,f){for(var v in f)g.call(f,v)&&(w[v]=f[v]);function m(){this.constructor=w}return m.prototype=f.prototype,w.prototype=new m,w.__super__=f.prototype,w},g={}.hasOwnProperty;p=a("./NodeType"),c=a("./XMLCharacterData"),N.exports=h=function(w){y(f,w);function f(v,m){if(f.__super__.constructor.call(this,v),m==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=p.Comment,this.value=this.stringify.comment(m)}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(v){return this.options.writer.comment(this,this.options.writer.filterOptions(v))},f}(c)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(a,N,j){(function(){var p,c,h;c=a("./XMLDOMErrorHandler"),h=a("./XMLDOMStringList"),N.exports=p=function(){function y(){var g;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new c,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=g=Object.create(this.defaultParams)}return Object.defineProperty(y.prototype,"parameterNames",{get:function(){return new h(Object.keys(this.defaultParams))}}),y.prototype.getParameter=function(g){return this.params.hasOwnProperty(g)?this.params[g]:null},y.prototype.canSetParameter=function(g,w){return!0},y.prototype.setParameter=function(g,w){return w!=null?this.params[g]=w:delete this.params[g]},y}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(a,N,j){(function(){var p;N.exports=p=function(){function c(){}return c.prototype.handleError=function(h){throw new Error(h)},c}()}).call(this)},{}],437:[function(a,N,j){(function(){var p;N.exports=p=function(){function c(){}return c.prototype.hasFeature=function(h,y){return!0},c.prototype.createDocumentType=function(h,y,g){throw new Error("This DOM method is not implemented.")},c.prototype.createDocument=function(h,y,g){throw new Error("This DOM method is not implemented.")},c.prototype.createHTMLDocument=function(h){throw new Error("This DOM method is not implemented.")},c.prototype.getFeature=function(h,y){throw new Error("This DOM method is not implemented.")},c}()}).call(this)},{}],438:[function(a,N,j){(function(){var p;N.exports=p=function(){function c(h){this.arr=h||[]}return Object.defineProperty(c.prototype,"length",{get:function(){return this.arr.length}}),c.prototype.item=function(h){return this.arr[h]||null},c.prototype.contains=function(h){return this.arr.indexOf(h)!==-1},c}()}).call(this)},{}],439:[function(a,N,j){(function(){var p,c,h,y=function(w,f){for(var v in f)g.call(f,v)&&(w[v]=f[v]);function m(){this.constructor=w}return m.prototype=f.prototype,w.prototype=new m,w.__super__=f.prototype,w},g={}.hasOwnProperty;h=a("./XMLNode"),p=a("./NodeType"),N.exports=c=function(w){y(f,w);function f(v,m,b,x,R,I){if(f.__super__.constructor.call(this,v),m==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(b==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(m));if(!x)throw new Error("Missing DTD attribute type. "+this.debugInfo(m));if(!R)throw new Error("Missing DTD attribute default. "+this.debugInfo(m));if(R.indexOf("#")!==0&&(R="#"+R),!R.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(m));if(I&&!R.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(m));this.elementName=this.stringify.name(m),this.type=p.AttributeDeclaration,this.attributeName=this.stringify.name(b),this.attributeType=this.stringify.dtdAttType(x),I&&(this.defaultValue=this.stringify.dtdAttDefault(I)),this.defaultValueType=R}return f.prototype.toString=function(v){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(v))},f}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(a,N,j){(function(){var p,c,h,y=function(w,f){for(var v in f)g.call(f,v)&&(w[v]=f[v]);function m(){this.constructor=w}return m.prototype=f.prototype,w.prototype=new m,w.__super__=f.prototype,w},g={}.hasOwnProperty;h=a("./XMLNode"),p=a("./NodeType"),N.exports=c=function(w){y(f,w);function f(v,m,b){if(f.__super__.constructor.call(this,v),m==null)throw new Error("Missing DTD element name. "+this.debugInfo());b||(b="(#PCDATA)"),Array.isArray(b)&&(b="("+b.join(",")+")"),this.name=this.stringify.name(m),this.type=p.ElementDeclaration,this.value=this.stringify.dtdElementValue(b)}return f.prototype.toString=function(v){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(v))},f}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(a,N,j){(function(){var p,c,h,y,g=function(f,v){for(var m in v)w.call(v,m)&&(f[m]=v[m]);function b(){this.constructor=f}return b.prototype=v.prototype,f.prototype=new b,f.__super__=v.prototype,f},w={}.hasOwnProperty;y=a("./Utility").isObject,h=a("./XMLNode"),p=a("./NodeType"),N.exports=c=function(f){g(v,f);function v(m,b,x,R){if(v.__super__.constructor.call(this,m),x==null)throw new Error("Missing DTD entity name. "+this.debugInfo(x));if(R==null)throw new Error("Missing DTD entity value. "+this.debugInfo(x));if(this.pe=!!b,this.name=this.stringify.name(x),this.type=p.EntityDeclaration,!y(R))this.value=this.stringify.dtdEntityValue(R),this.internal=!0;else{if(!R.pubID&&!R.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(x));if(R.pubID&&!R.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(x));if(this.internal=!1,R.pubID!=null&&(this.pubID=this.stringify.dtdPubID(R.pubID)),R.sysID!=null&&(this.sysID=this.stringify.dtdSysID(R.sysID)),R.nData!=null&&(this.nData=this.stringify.dtdNData(R.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(x))}}return Object.defineProperty(v.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(v.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(v.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(v.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(v.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(v.prototype,"xmlVersion",{get:function(){return null}}),v.prototype.toString=function(m){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(m))},v}(h)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(a,N,j){(function(){var p,c,h,y=function(w,f){for(var v in f)g.call(f,v)&&(w[v]=f[v]);function m(){this.constructor=w}return m.prototype=f.prototype,w.prototype=new m,w.__super__=f.prototype,w},g={}.hasOwnProperty;h=a("./XMLNode"),p=a("./NodeType"),N.exports=c=function(w){y(f,w);function f(v,m,b){if(f.__super__.constructor.call(this,v),m==null)throw new Error("Missing DTD notation name. "+this.debugInfo(m));if(!b.pubID&&!b.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(m));this.name=this.stringify.name(m),this.type=p.NotationDeclaration,b.pubID!=null&&(this.pubID=this.stringify.dtdPubID(b.pubID)),b.sysID!=null&&(this.sysID=this.stringify.dtdSysID(b.sysID))}return Object.defineProperty(f.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(f.prototype,"systemId",{get:function(){return this.sysID}}),f.prototype.toString=function(v){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(v))},f}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(a,N,j){(function(){var p,c,h,y,g=function(f,v){for(var m in v)w.call(v,m)&&(f[m]=v[m]);function b(){this.constructor=f}return b.prototype=v.prototype,f.prototype=new b,f.__super__=v.prototype,f},w={}.hasOwnProperty;y=a("./Utility").isObject,h=a("./XMLNode"),p=a("./NodeType"),N.exports=c=function(f){g(v,f);function v(m,b,x,R){var I;v.__super__.constructor.call(this,m),y(b)&&(I=b,b=I.version,x=I.encoding,R=I.standalone),b||(b="1.0"),this.type=p.Declaration,this.version=this.stringify.xmlVersion(b),x!=null&&(this.encoding=this.stringify.xmlEncoding(x)),R!=null&&(this.standalone=this.stringify.xmlStandalone(R))}return v.prototype.toString=function(m){return this.options.writer.declaration(this,this.options.writer.filterOptions(m))},v}(h)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(a,N,j){(function(){var p,c,h,y,g,w,f,v,m,b=function(R,I){for(var E in I)x.call(I,E)&&(R[E]=I[E]);function C(){this.constructor=R}return C.prototype=I.prototype,R.prototype=new C,R.__super__=I.prototype,R},x={}.hasOwnProperty;m=a("./Utility").isObject,v=a("./XMLNode"),p=a("./NodeType"),c=a("./XMLDTDAttList"),y=a("./XMLDTDEntity"),h=a("./XMLDTDElement"),g=a("./XMLDTDNotation"),f=a("./XMLNamedNodeMap"),N.exports=w=function(R){b(I,R);function I(E,C,P){var Z,M,J,_,k,B;if(I.__super__.constructor.call(this,E),this.type=p.DocType,E.children){for(_=E.children,M=0,J=_.length;M<J;M++)if(Z=_[M],Z.type===p.Element){this.name=Z.name;break}}this.documentObject=E,m(C)&&(k=C,C=k.pubID,P=k.sysID),P==null&&(B=[C,P],P=B[0],C=B[1]),C!=null&&(this.pubID=this.stringify.dtdPubID(C)),P!=null&&(this.sysID=this.stringify.dtdSysID(P))}return Object.defineProperty(I.prototype,"entities",{get:function(){var E,C,P,Z,M;for(Z={},M=this.children,C=0,P=M.length;C<P;C++)E=M[C],E.type===p.EntityDeclaration&&!E.pe&&(Z[E.name]=E);return new f(Z)}}),Object.defineProperty(I.prototype,"notations",{get:function(){var E,C,P,Z,M;for(Z={},M=this.children,C=0,P=M.length;C<P;C++)E=M[C],E.type===p.NotationDeclaration&&(Z[E.name]=E);return new f(Z)}}),Object.defineProperty(I.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(I.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(I.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),I.prototype.element=function(E,C){var P;return P=new h(this,E,C),this.children.push(P),this},I.prototype.attList=function(E,C,P,Z,M){var J;return J=new c(this,E,C,P,Z,M),this.children.push(J),this},I.prototype.entity=function(E,C){var P;return P=new y(this,!1,E,C),this.children.push(P),this},I.prototype.pEntity=function(E,C){var P;return P=new y(this,!0,E,C),this.children.push(P),this},I.prototype.notation=function(E,C){var P;return P=new g(this,E,C),this.children.push(P),this},I.prototype.toString=function(E){return this.options.writer.docType(this,this.options.writer.filterOptions(E))},I.prototype.ele=function(E,C){return this.element(E,C)},I.prototype.att=function(E,C,P,Z,M){return this.attList(E,C,P,Z,M)},I.prototype.ent=function(E,C){return this.entity(E,C)},I.prototype.pent=function(E,C){return this.pEntity(E,C)},I.prototype.not=function(E,C){return this.notation(E,C)},I.prototype.up=function(){return this.root()||this.documentObject},I.prototype.isEqualNode=function(E){return!(!I.__super__.isEqualNode.apply(this,arguments).isEqualNode(E)||E.name!==this.name||E.publicId!==this.publicId||E.systemId!==this.systemId)},I}(v)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(a,N,j){(function(){var p,c,h,y,g,w,f,v,m=function(x,R){for(var I in R)b.call(R,I)&&(x[I]=R[I]);function E(){this.constructor=x}return E.prototype=R.prototype,x.prototype=new E,x.__super__=R.prototype,x},b={}.hasOwnProperty;v=a("./Utility").isPlainObject,h=a("./XMLDOMImplementation"),c=a("./XMLDOMConfiguration"),g=a("./XMLNode"),p=a("./NodeType"),f=a("./XMLStringifier"),w=a("./XMLStringWriter"),N.exports=y=function(x){m(R,x);function R(I){R.__super__.constructor.call(this,null),this.name="#document",this.type=p.Document,this.documentURI=null,this.domConfig=new c,I||(I={}),I.writer||(I.writer=new w),this.options=I,this.stringify=new f(I)}return Object.defineProperty(R.prototype,"implementation",{value:new h}),Object.defineProperty(R.prototype,"doctype",{get:function(){var I,E,C,P;for(P=this.children,E=0,C=P.length;E<C;E++)if(I=P[E],I.type===p.DocType)return I;return null}}),Object.defineProperty(R.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(R.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(R.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(R.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===p.Declaration?this.children[0].encoding:null}}),Object.defineProperty(R.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===p.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(R.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===p.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(R.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(R.prototype,"origin",{get:function(){return null}}),Object.defineProperty(R.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(R.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(R.prototype,"contentType",{get:function(){return null}}),R.prototype.end=function(I){var E;return E={},I?v(I)&&(E=I,I=this.options.writer):I=this.options.writer,I.document(this,I.filterOptions(E))},R.prototype.toString=function(I){return this.options.writer.document(this,this.options.writer.filterOptions(I))},R.prototype.createElement=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createTextNode=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createComment=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createCDATASection=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createProcessingInstruction=function(I,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createAttribute=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createEntityReference=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.getElementsByTagName=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.importNode=function(I,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createElementNS=function(I,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createAttributeNS=function(I,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.getElementsByTagNameNS=function(I,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.getElementById=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.adoptNode=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.renameNode=function(I,E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.getElementsByClassName=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createEvent=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createNodeIterator=function(I,E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.createTreeWalker=function(I,E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},R}(g)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(a,N,j){(function(){var p,c,h,y,g,w,f,v,m,b,x,R,I,E,C,P,Z,M,J,_,k,B,U,K,G={}.hasOwnProperty;K=a("./Utility"),B=K.isObject,k=K.isFunction,U=K.isPlainObject,_=K.getValue,p=a("./NodeType"),R=a("./XMLDocument"),E=a("./XMLElement"),y=a("./XMLCData"),g=a("./XMLComment"),P=a("./XMLRaw"),J=a("./XMLText"),C=a("./XMLProcessingInstruction"),b=a("./XMLDeclaration"),x=a("./XMLDocType"),w=a("./XMLDTDAttList"),v=a("./XMLDTDEntity"),f=a("./XMLDTDElement"),m=a("./XMLDTDNotation"),h=a("./XMLAttribute"),M=a("./XMLStringifier"),Z=a("./XMLStringWriter"),c=a("./WriterState"),N.exports=I=function(){function F(W,X,re){var oe;this.name="?xml",this.type=p.Document,W||(W={}),oe={},W.writer?U(W.writer)&&(oe=W.writer,W.writer=new Z):W.writer=new Z,this.options=W,this.writer=W.writer,this.writerOptions=this.writer.filterOptions(oe),this.stringify=new M(W),this.onDataCallback=X||function(){},this.onEndCallback=re||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return F.prototype.createChildNode=function(W){var X,re,oe,pe,ie,Ie,ee,de;switch(W.type){case p.CData:this.cdata(W.value);break;case p.Comment:this.comment(W.value);break;case p.Element:oe={},ee=W.attribs;for(re in ee)G.call(ee,re)&&(X=ee[re],oe[re]=X.value);this.node(W.name,oe);break;case p.Dummy:this.dummy();break;case p.Raw:this.raw(W.value);break;case p.Text:this.text(W.value);break;case p.ProcessingInstruction:this.instruction(W.target,W.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+W.constructor.name)}for(de=W.children,ie=0,Ie=de.length;ie<Ie;ie++)pe=de[ie],this.createChildNode(pe),pe.type===p.Element&&this.up();return this},F.prototype.dummy=function(){return this},F.prototype.node=function(W,X,re){var oe;if(W==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(W));return this.openCurrent(),W=_(W),X==null&&(X={}),X=_(X),B(X)||(oe=[X,re],re=oe[0],X=oe[1]),this.currentNode=new E(this,W,X),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,re!=null&&this.text(re),this},F.prototype.element=function(W,X,re){var oe,pe,ie,Ie,ee,de;if(this.currentNode&&this.currentNode.type===p.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(W)||B(W)||k(W))for(Ie=this.options.noValidation,this.options.noValidation=!0,de=new R(this.options).element("TEMP_ROOT"),de.element(W),this.options.noValidation=Ie,ee=de.children,pe=0,ie=ee.length;pe<ie;pe++)oe=ee[pe],this.createChildNode(oe),oe.type===p.Element&&this.up();else this.node(W,X,re);return this},F.prototype.attribute=function(W,X){var re,oe;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(W));if(W!=null&&(W=_(W)),B(W))for(re in W)G.call(W,re)&&(oe=W[re],this.attribute(re,oe));else k(X)&&(X=X.apply()),this.options.keepNullAttributes&&X==null?this.currentNode.attribs[W]=new h(this,W,""):X!=null&&(this.currentNode.attribs[W]=new h(this,W,X));return this},F.prototype.text=function(W){var X;return this.openCurrent(),X=new J(this,W),this.onData(this.writer.text(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.cdata=function(W){var X;return this.openCurrent(),X=new y(this,W),this.onData(this.writer.cdata(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.comment=function(W){var X;return this.openCurrent(),X=new g(this,W),this.onData(this.writer.comment(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.raw=function(W){var X;return this.openCurrent(),X=new P(this,W),this.onData(this.writer.raw(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.instruction=function(W,X){var re,oe,pe,ie,Ie;if(this.openCurrent(),W!=null&&(W=_(W)),X!=null&&(X=_(X)),Array.isArray(W))for(re=0,ie=W.length;re<ie;re++)oe=W[re],this.instruction(oe);else if(B(W))for(oe in W)G.call(W,oe)&&(pe=W[oe],this.instruction(oe,pe));else k(X)&&(X=X.apply()),Ie=new C(this,W,X),this.onData(this.writer.processingInstruction(Ie,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},F.prototype.declaration=function(W,X,re){var oe;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return oe=new b(this,W,X,re),this.onData(this.writer.declaration(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.doctype=function(W,X,re){if(this.openCurrent(),W==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new x(this,X,re),this.currentNode.rootNodeName=W,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},F.prototype.dtdElement=function(W,X){var re;return this.openCurrent(),re=new f(this,W,X),this.onData(this.writer.dtdElement(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.attList=function(W,X,re,oe,pe){var ie;return this.openCurrent(),ie=new w(this,W,X,re,oe,pe),this.onData(this.writer.dtdAttList(ie,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.entity=function(W,X){var re;return this.openCurrent(),re=new v(this,!1,W,X),this.onData(this.writer.dtdEntity(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.pEntity=function(W,X){var re;return this.openCurrent(),re=new v(this,!0,W,X),this.onData(this.writer.dtdEntity(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.notation=function(W,X){var re;return this.openCurrent(),re=new m(this,W,X),this.onData(this.writer.dtdNotation(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},F.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},F.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},F.prototype.openNode=function(W){var X,re,oe,pe;if(!W.isOpen){if(!this.root&&this.currentLevel===0&&W.type===p.Element&&(this.root=W),re="",W.type===p.Element){this.writerOptions.state=c.OpenTag,re=this.writer.indent(W,this.writerOptions,this.currentLevel)+"<"+W.name,pe=W.attribs;for(oe in pe)G.call(pe,oe)&&(X=pe[oe],re+=this.writer.attribute(X,this.writerOptions,this.currentLevel));re+=(W.children?">":"/>")+this.writer.endline(W,this.writerOptions,this.currentLevel),this.writerOptions.state=c.InsideTag}else this.writerOptions.state=c.OpenTag,re=this.writer.indent(W,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+W.rootNodeName,W.pubID&&W.sysID?re+=' PUBLIC "'+W.pubID+'" "'+W.sysID+'"':W.sysID&&(re+=' SYSTEM "'+W.sysID+'"'),W.children?(re+=" [",this.writerOptions.state=c.InsideTag):(this.writerOptions.state=c.CloseTag,re+=">"),re+=this.writer.endline(W,this.writerOptions,this.currentLevel);return this.onData(re,this.currentLevel),W.isOpen=!0}},F.prototype.closeNode=function(W){var X;if(!W.isClosed)return X="",this.writerOptions.state=c.CloseTag,W.type===p.Element?X=this.writer.indent(W,this.writerOptions,this.currentLevel)+"</"+W.name+">"+this.writer.endline(W,this.writerOptions,this.currentLevel):X=this.writer.indent(W,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(W,this.writerOptions,this.currentLevel),this.writerOptions.state=c.None,this.onData(X,this.currentLevel),W.isClosed=!0},F.prototype.onData=function(W,X){return this.documentStarted=!0,this.onDataCallback(W,X+1)},F.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},F.prototype.debugInfo=function(W){return W==null?"":"node: <"+W+">"},F.prototype.ele=function(){return this.element.apply(this,arguments)},F.prototype.nod=function(W,X,re){return this.node(W,X,re)},F.prototype.txt=function(W){return this.text(W)},F.prototype.dat=function(W){return this.cdata(W)},F.prototype.com=function(W){return this.comment(W)},F.prototype.ins=function(W,X){return this.instruction(W,X)},F.prototype.dec=function(W,X,re){return this.declaration(W,X,re)},F.prototype.dtd=function(W,X,re){return this.doctype(W,X,re)},F.prototype.e=function(W,X,re){return this.element(W,X,re)},F.prototype.n=function(W,X,re){return this.node(W,X,re)},F.prototype.t=function(W){return this.text(W)},F.prototype.d=function(W){return this.cdata(W)},F.prototype.c=function(W){return this.comment(W)},F.prototype.r=function(W){return this.raw(W)},F.prototype.i=function(W,X){return this.instruction(W,X)},F.prototype.att=function(){return this.currentNode&&this.currentNode.type===p.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},F.prototype.a=function(){return this.currentNode&&this.currentNode.type===p.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},F.prototype.ent=function(W,X){return this.entity(W,X)},F.prototype.pent=function(W,X){return this.pEntity(W,X)},F.prototype.not=function(W,X){return this.notation(W,X)},F}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(a,N,j){(function(){var p,c,h,y=function(w,f){for(var v in f)g.call(f,v)&&(w[v]=f[v]);function m(){this.constructor=w}return m.prototype=f.prototype,w.prototype=new m,w.__super__=f.prototype,w},g={}.hasOwnProperty;h=a("./XMLNode"),p=a("./NodeType"),N.exports=c=function(w){y(f,w);function f(v){f.__super__.constructor.call(this,v),this.type=p.Dummy}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(v){return""},f}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(a,N,j){(function(){var p,c,h,y,g,w,f,v,m,b=function(R,I){for(var E in I)x.call(I,E)&&(R[E]=I[E]);function C(){this.constructor=R}return C.prototype=I.prototype,R.prototype=new C,R.__super__=I.prototype,R},x={}.hasOwnProperty;m=a("./Utility"),v=m.isObject,f=m.isFunction,w=m.getValue,g=a("./XMLNode"),p=a("./NodeType"),c=a("./XMLAttribute"),y=a("./XMLNamedNodeMap"),N.exports=h=function(R){b(I,R);function I(E,C,P){var Z,M,J,_;if(I.__super__.constructor.call(this,E),C==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(C),this.type=p.Element,this.attribs={},this.schemaTypeInfo=null,P!=null&&this.attribute(P),E.type===p.Document&&(this.isRoot=!0,this.documentObject=E,E.rootObject=this,E.children)){for(_=E.children,M=0,J=_.length;M<J;M++)if(Z=_[M],Z.type===p.DocType){Z.name=this.name;break}}}return Object.defineProperty(I.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(I.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(I.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(I.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(I.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(I.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(I.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(I.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new y(this.attribs)),this.attributeMap}}),I.prototype.clone=function(){var E,C,P,Z;P=Object.create(this),P.isRoot&&(P.documentObject=null),P.attribs={},Z=this.attribs;for(C in Z)x.call(Z,C)&&(E=Z[C],P.attribs[C]=E.clone());return P.children=[],this.children.forEach(function(M){var J;return J=M.clone(),J.parent=P,P.children.push(J)}),P},I.prototype.attribute=function(E,C){var P,Z;if(E!=null&&(E=w(E)),v(E))for(P in E)x.call(E,P)&&(Z=E[P],this.attribute(P,Z));else f(C)&&(C=C.apply()),this.options.keepNullAttributes&&C==null?this.attribs[E]=new c(this,E,""):C!=null&&(this.attribs[E]=new c(this,E,C));return this},I.prototype.removeAttribute=function(E){var C,P,Z;if(E==null)throw new Error("Missing attribute name. "+this.debugInfo());if(E=w(E),Array.isArray(E))for(P=0,Z=E.length;P<Z;P++)C=E[P],delete this.attribs[C];else delete this.attribs[E];return this},I.prototype.toString=function(E){return this.options.writer.element(this,this.options.writer.filterOptions(E))},I.prototype.att=function(E,C){return this.attribute(E,C)},I.prototype.a=function(E,C){return this.attribute(E,C)},I.prototype.getAttribute=function(E){return this.attribs.hasOwnProperty(E)?this.attribs[E].value:null},I.prototype.setAttribute=function(E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getAttributeNode=function(E){return this.attribs.hasOwnProperty(E)?this.attribs[E]:null},I.prototype.setAttributeNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.removeAttributeNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByTagName=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getAttributeNS=function(E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.setAttributeNS=function(E,C,P){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.removeAttributeNS=function(E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getAttributeNodeNS=function(E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.setAttributeNodeNS=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByTagNameNS=function(E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.hasAttribute=function(E){return this.attribs.hasOwnProperty(E)},I.prototype.hasAttributeNS=function(E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.setIdAttribute=function(E,C){return this.attribs.hasOwnProperty(E)?this.attribs[E].isId:C},I.prototype.setIdAttributeNS=function(E,C,P){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.setIdAttributeNode=function(E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByTagName=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByTagNameNS=function(E,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByClassName=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.isEqualNode=function(E){var C,P,Z;if(!I.__super__.isEqualNode.apply(this,arguments).isEqualNode(E)||E.namespaceURI!==this.namespaceURI||E.prefix!==this.prefix||E.localName!==this.localName||E.attribs.length!==this.attribs.length)return!1;for(C=P=0,Z=this.attribs.length-1;0<=Z?P<=Z:P>=Z;C=0<=Z?++P:--P)if(!this.attribs[C].isEqualNode(E.attribs[C]))return!1;return!0},I}(g)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(a,N,j){(function(){var p;N.exports=p=function(){function c(h){this.nodes=h}return Object.defineProperty(c.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),c.prototype.clone=function(){return this.nodes=null},c.prototype.getNamedItem=function(h){return this.nodes[h]},c.prototype.setNamedItem=function(h){var y;return y=this.nodes[h.nodeName],this.nodes[h.nodeName]=h,y||null},c.prototype.removeNamedItem=function(h){var y;return y=this.nodes[h],delete this.nodes[h],y||null},c.prototype.item=function(h){return this.nodes[Object.keys(this.nodes)[h]]||null},c.prototype.getNamedItemNS=function(h,y){throw new Error("This DOM method is not implemented.")},c.prototype.setNamedItemNS=function(h){throw new Error("This DOM method is not implemented.")},c.prototype.removeNamedItemNS=function(h,y){throw new Error("This DOM method is not implemented.")},c}()}).call(this)},{}],450:[function(a,N,j){(function(){var p,c,h,y,g,w,f,v,m,b,x,R,I,E,C,P,Z,M,J,_={}.hasOwnProperty;J=a("./Utility"),M=J.isObject,Z=J.isFunction,P=J.isEmpty,C=J.getValue,v=null,h=null,y=null,g=null,w=null,I=null,E=null,R=null,f=null,c=null,x=null,m=null,p=null,N.exports=b=function(){function k(B){this.parent=B,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,v||(v=a("./XMLElement"),h=a("./XMLCData"),y=a("./XMLComment"),g=a("./XMLDeclaration"),w=a("./XMLDocType"),I=a("./XMLRaw"),E=a("./XMLText"),R=a("./XMLProcessingInstruction"),f=a("./XMLDummy"),c=a("./NodeType"),x=a("./XMLNodeList"),m=a("./XMLNamedNodeMap"),p=a("./DocumentPosition"))}return Object.defineProperty(k.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(k.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(k.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(k.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(k.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new x(this.children)),this.childNodeList}}),Object.defineProperty(k.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(k.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(k.prototype,"previousSibling",{get:function(){var B;return B=this.parent.children.indexOf(this),this.parent.children[B-1]||null}}),Object.defineProperty(k.prototype,"nextSibling",{get:function(){var B;return B=this.parent.children.indexOf(this),this.parent.children[B+1]||null}}),Object.defineProperty(k.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(k.prototype,"textContent",{get:function(){var B,U,K,G,F;if(this.nodeType===c.Element||this.nodeType===c.DocumentFragment){for(F="",G=this.children,U=0,K=G.length;U<K;U++)B=G[U],B.textContent&&(F+=B.textContent);return F}else return null},set:function(B){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),k.prototype.setParent=function(B){var U,K,G,F,W;for(this.parent=B,B&&(this.options=B.options,this.stringify=B.stringify),F=this.children,W=[],K=0,G=F.length;K<G;K++)U=F[K],W.push(U.setParent(this));return W},k.prototype.element=function(B,U,K){var G,F,W,X,re,oe,pe,ie,Ie,ee,de;if(oe=null,U===null&&K==null&&(Ie=[{},null],U=Ie[0],K=Ie[1]),U==null&&(U={}),U=C(U),M(U)||(ee=[U,K],K=ee[0],U=ee[1]),B!=null&&(B=C(B)),Array.isArray(B))for(W=0,pe=B.length;W<pe;W++)F=B[W],oe=this.element(F);else if(Z(B))oe=this.element(B.apply());else if(M(B)){for(re in B)if(_.call(B,re))if(de=B[re],Z(de)&&(de=de.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&re.indexOf(this.stringify.convertAttKey)===0)oe=this.attribute(re.substr(this.stringify.convertAttKey.length),de);else if(!this.options.separateArrayItems&&Array.isArray(de)&&P(de))oe=this.dummy();else if(M(de)&&P(de))oe=this.element(re);else if(!this.options.keepNullNodes&&de==null)oe=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(de))for(X=0,ie=de.length;X<ie;X++)F=de[X],G={},G[re]=F,oe=this.element(G);else M(de)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&re.indexOf(this.stringify.convertTextKey)===0?oe=this.element(de):(oe=this.element(re),oe.element(de)):oe=this.element(re,de)}else!this.options.keepNullNodes&&K===null?oe=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&B.indexOf(this.stringify.convertTextKey)===0?oe=this.text(K):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&B.indexOf(this.stringify.convertCDataKey)===0?oe=this.cdata(K):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&B.indexOf(this.stringify.convertCommentKey)===0?oe=this.comment(K):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&B.indexOf(this.stringify.convertRawKey)===0?oe=this.raw(K):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&B.indexOf(this.stringify.convertPIKey)===0?oe=this.instruction(B.substr(this.stringify.convertPIKey.length),K):oe=this.node(B,U,K);if(oe==null)throw new Error("Could not create any elements with: "+B+". "+this.debugInfo());return oe},k.prototype.insertBefore=function(B,U,K){var G,F,W,X,re;if(B!=null&&B.type)return W=B,X=U,W.setParent(this),X?(F=children.indexOf(X),re=children.splice(F),children.push(W),Array.prototype.push.apply(children,re)):children.push(W),W;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(B));return F=this.parent.children.indexOf(this),re=this.parent.children.splice(F),G=this.parent.element(B,U,K),Array.prototype.push.apply(this.parent.children,re),G},k.prototype.insertAfter=function(B,U,K){var G,F,W;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(B));return F=this.parent.children.indexOf(this),W=this.parent.children.splice(F+1),G=this.parent.element(B,U,K),Array.prototype.push.apply(this.parent.children,W),G},k.prototype.remove=function(){var B,U;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return B=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[B,B-B+1].concat(U=[])),this.parent},k.prototype.node=function(B,U,K){var G,F;return B!=null&&(B=C(B)),U||(U={}),U=C(U),M(U)||(F=[U,K],K=F[0],U=F[1]),G=new v(this,B,U),K!=null&&G.text(K),this.children.push(G),G},k.prototype.text=function(B){var U;return M(B)&&this.element(B),U=new E(this,B),this.children.push(U),this},k.prototype.cdata=function(B){var U;return U=new h(this,B),this.children.push(U),this},k.prototype.comment=function(B){var U;return U=new y(this,B),this.children.push(U),this},k.prototype.commentBefore=function(B){var U,K,G;return K=this.parent.children.indexOf(this),G=this.parent.children.splice(K),U=this.parent.comment(B),Array.prototype.push.apply(this.parent.children,G),this},k.prototype.commentAfter=function(B){var U,K,G;return K=this.parent.children.indexOf(this),G=this.parent.children.splice(K+1),U=this.parent.comment(B),Array.prototype.push.apply(this.parent.children,G),this},k.prototype.raw=function(B){var U;return U=new I(this,B),this.children.push(U),this},k.prototype.dummy=function(){var B;return B=new f(this),B},k.prototype.instruction=function(B,U){var K,G,F,W,X;if(B!=null&&(B=C(B)),U!=null&&(U=C(U)),Array.isArray(B))for(W=0,X=B.length;W<X;W++)K=B[W],this.instruction(K);else if(M(B))for(K in B)_.call(B,K)&&(G=B[K],this.instruction(K,G));else Z(U)&&(U=U.apply()),F=new R(this,B,U),this.children.push(F);return this},k.prototype.instructionBefore=function(B,U){var K,G,F;return G=this.parent.children.indexOf(this),F=this.parent.children.splice(G),K=this.parent.instruction(B,U),Array.prototype.push.apply(this.parent.children,F),this},k.prototype.instructionAfter=function(B,U){var K,G,F;return G=this.parent.children.indexOf(this),F=this.parent.children.splice(G+1),K=this.parent.instruction(B,U),Array.prototype.push.apply(this.parent.children,F),this},k.prototype.declaration=function(B,U,K){var G,F;return G=this.document(),F=new g(G,B,U,K),G.children.length===0?G.children.unshift(F):G.children[0].type===c.Declaration?G.children[0]=F:G.children.unshift(F),G.root()||G},k.prototype.dtd=function(B,U){var K,G,F,W,X,re,oe,pe,ie,Ie;for(G=this.document(),F=new w(G,B,U),ie=G.children,W=X=0,oe=ie.length;X<oe;W=++X)if(K=ie[W],K.type===c.DocType)return G.children[W]=F,F;for(Ie=G.children,W=re=0,pe=Ie.length;re<pe;W=++re)if(K=Ie[W],K.isRoot)return G.children.splice(W,0,F),F;return G.children.push(F),F},k.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},k.prototype.root=function(){var B;for(B=this;B;){if(B.type===c.Document)return B.rootObject;if(B.isRoot)return B;B=B.parent}},k.prototype.document=function(){var B;for(B=this;B;){if(B.type===c.Document)return B;B=B.parent}},k.prototype.end=function(B){return this.document().end(B)},k.prototype.prev=function(){var B;if(B=this.parent.children.indexOf(this),B<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[B-1]},k.prototype.next=function(){var B;if(B=this.parent.children.indexOf(this),B===-1||B===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[B+1]},k.prototype.importDocument=function(B){var U;return U=B.root().clone(),U.parent=this,U.isRoot=!1,this.children.push(U),this},k.prototype.debugInfo=function(B){var U,K;return B=B||this.name,B==null&&!((U=this.parent)!=null&&U.name)?"":B==null?"parent: <"+this.parent.name+">":(K=this.parent)!=null&&K.name?"node: <"+B+">, parent: <"+this.parent.name+">":"node: <"+B+">"},k.prototype.ele=function(B,U,K){return this.element(B,U,K)},k.prototype.nod=function(B,U,K){return this.node(B,U,K)},k.prototype.txt=function(B){return this.text(B)},k.prototype.dat=function(B){return this.cdata(B)},k.prototype.com=function(B){return this.comment(B)},k.prototype.ins=function(B,U){return this.instruction(B,U)},k.prototype.doc=function(){return this.document()},k.prototype.dec=function(B,U,K){return this.declaration(B,U,K)},k.prototype.e=function(B,U,K){return this.element(B,U,K)},k.prototype.n=function(B,U,K){return this.node(B,U,K)},k.prototype.t=function(B){return this.text(B)},k.prototype.d=function(B){return this.cdata(B)},k.prototype.c=function(B){return this.comment(B)},k.prototype.r=function(B){return this.raw(B)},k.prototype.i=function(B,U){return this.instruction(B,U)},k.prototype.u=function(){return this.up()},k.prototype.importXMLBuilder=function(B){return this.importDocument(B)},k.prototype.replaceChild=function(B,U){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.removeChild=function(B){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.appendChild=function(B){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.hasChildNodes=function(){return this.children.length!==0},k.prototype.cloneNode=function(B){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.isSupported=function(B,U){return!0},k.prototype.hasAttributes=function(){return this.attribs.length!==0},k.prototype.compareDocumentPosition=function(B){var U,K;return U=this,U===B?0:this.document()!==B.document()?(K=p.Disconnected|p.ImplementationSpecific,Math.random()<.5?K|=p.Preceding:K|=p.Following,K):U.isAncestor(B)?p.Contains|p.Preceding:U.isDescendant(B)?p.Contains|p.Following:U.isPreceding(B)?p.Preceding:p.Following},k.prototype.isSameNode=function(B){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.lookupPrefix=function(B){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.isDefaultNamespace=function(B){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.lookupNamespaceURI=function(B){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.isEqualNode=function(B){var U,K,G;if(B.nodeType!==this.nodeType||B.children.length!==this.children.length)return!1;for(U=K=0,G=this.children.length-1;0<=G?K<=G:K>=G;U=0<=G?++K:--K)if(!this.children[U].isEqualNode(B.children[U]))return!1;return!0},k.prototype.getFeature=function(B,U){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.setUserData=function(B,U,K){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.getUserData=function(B){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.contains=function(B){return B?B===this||this.isDescendant(B):!1},k.prototype.isDescendant=function(B){var U,K,G,F,W;for(W=this.children,G=0,F=W.length;G<F;G++)if(U=W[G],B===U||(K=U.isDescendant(B),K))return!0;return!1},k.prototype.isAncestor=function(B){return B.isDescendant(this)},k.prototype.isPreceding=function(B){var U,K;return U=this.treePosition(B),K=this.treePosition(this),U===-1||K===-1?!1:U<K},k.prototype.isFollowing=function(B){var U,K;return U=this.treePosition(B),K=this.treePosition(this),U===-1||K===-1?!1:U>K},k.prototype.treePosition=function(B){var U,K;return K=0,U=!1,this.foreachTreeNode(this.document(),function(G){if(K++,!U&&G===B)return U=!0}),U?K:-1},k.prototype.foreachTreeNode=function(B,U){var K,G,F,W,X;for(B||(B=this.document()),W=B.children,G=0,F=W.length;G<F;G++){if(K=W[G],X=U(K))return X;if(X=this.foreachTreeNode(K,U),X)return X}},k}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(a,N,j){(function(){var p;N.exports=p=function(){function c(h){this.nodes=h}return Object.defineProperty(c.prototype,"length",{get:function(){return this.nodes.length||0}}),c.prototype.clone=function(){return this.nodes=null},c.prototype.item=function(h){return this.nodes[h]||null},c}()}).call(this)},{}],452:[function(a,N,j){(function(){var p,c,h,y=function(w,f){for(var v in f)g.call(f,v)&&(w[v]=f[v]);function m(){this.constructor=w}return m.prototype=f.prototype,w.prototype=new m,w.__super__=f.prototype,w},g={}.hasOwnProperty;p=a("./NodeType"),c=a("./XMLCharacterData"),N.exports=h=function(w){y(f,w);function f(v,m,b){if(f.__super__.constructor.call(this,v),m==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=p.ProcessingInstruction,this.target=this.stringify.insTarget(m),this.name=this.target,b&&(this.value=this.stringify.insValue(b))}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(v){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(v))},f.prototype.isEqualNode=function(v){return!(!f.__super__.isEqualNode.apply(this,arguments).isEqualNode(v)||v.target!==this.target)},f}(c)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(a,N,j){(function(){var p,c,h,y=function(w,f){for(var v in f)g.call(f,v)&&(w[v]=f[v]);function m(){this.constructor=w}return m.prototype=f.prototype,w.prototype=new m,w.__super__=f.prototype,w},g={}.hasOwnProperty;p=a("./NodeType"),c=a("./XMLNode"),N.exports=h=function(w){y(f,w);function f(v,m){if(f.__super__.constructor.call(this,v),m==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=p.Raw,this.value=this.stringify.raw(m)}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(v){return this.options.writer.raw(this,this.options.writer.filterOptions(v))},f}(c)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(a,N,j){(function(){var p,c,h,y,g=function(f,v){for(var m in v)w.call(v,m)&&(f[m]=v[m]);function b(){this.constructor=f}return b.prototype=v.prototype,f.prototype=new b,f.__super__=v.prototype,f},w={}.hasOwnProperty;p=a("./NodeType"),y=a("./XMLWriterBase"),c=a("./WriterState"),N.exports=h=function(f){g(v,f);function v(m,b){this.stream=m,v.__super__.constructor.call(this,b)}return v.prototype.endline=function(m,b,x){return m.isLastRootNode&&b.state===c.CloseTag?"":v.__super__.endline.call(this,m,b,x)},v.prototype.document=function(m,b){var x,R,I,E,C,P,Z,M,J;for(Z=m.children,R=I=0,C=Z.length;I<C;R=++I)x=Z[R],x.isLastRootNode=R===m.children.length-1;for(b=this.filterOptions(b),M=m.children,J=[],E=0,P=M.length;E<P;E++)x=M[E],J.push(this.writeChildNode(x,b,0));return J},v.prototype.attribute=function(m,b,x){return this.stream.write(v.__super__.attribute.call(this,m,b,x))},v.prototype.cdata=function(m,b,x){return this.stream.write(v.__super__.cdata.call(this,m,b,x))},v.prototype.comment=function(m,b,x){return this.stream.write(v.__super__.comment.call(this,m,b,x))},v.prototype.declaration=function(m,b,x){return this.stream.write(v.__super__.declaration.call(this,m,b,x))},v.prototype.docType=function(m,b,x){var R,I,E,C;if(x||(x=0),this.openNode(m,b,x),b.state=c.OpenTag,this.stream.write(this.indent(m,b,x)),this.stream.write("<!DOCTYPE "+m.root().name),m.pubID&&m.sysID?this.stream.write(' PUBLIC "'+m.pubID+'" "'+m.sysID+'"'):m.sysID&&this.stream.write(' SYSTEM "'+m.sysID+'"'),m.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(m,b,x)),b.state=c.InsideTag,C=m.children,I=0,E=C.length;I<E;I++)R=C[I],this.writeChildNode(R,b,x+1);b.state=c.CloseTag,this.stream.write("]")}return b.state=c.CloseTag,this.stream.write(b.spaceBeforeSlash+">"),this.stream.write(this.endline(m,b,x)),b.state=c.None,this.closeNode(m,b,x)},v.prototype.element=function(m,b,x){var R,I,E,C,P,Z,M,J,_,k;x||(x=0),this.openNode(m,b,x),b.state=c.OpenTag,this.stream.write(this.indent(m,b,x)+"<"+m.name),_=m.attribs;for(M in _)w.call(_,M)&&(R=_[M],this.attribute(R,b,x));if(E=m.children.length,C=E===0?null:m.children[0],E===0||m.children.every(function(B){return(B.type===p.Text||B.type===p.Raw)&&B.value===""}))b.allowEmpty?(this.stream.write(">"),b.state=c.CloseTag,this.stream.write("</"+m.name+">")):(b.state=c.CloseTag,this.stream.write(b.spaceBeforeSlash+"/>"));else if(b.pretty&&E===1&&(C.type===p.Text||C.type===p.Raw)&&C.value!=null)this.stream.write(">"),b.state=c.InsideTag,b.suppressPrettyCount++,J=!0,this.writeChildNode(C,b,x+1),b.suppressPrettyCount--,J=!1,b.state=c.CloseTag,this.stream.write("</"+m.name+">");else{for(this.stream.write(">"+this.endline(m,b,x)),b.state=c.InsideTag,k=m.children,P=0,Z=k.length;P<Z;P++)I=k[P],this.writeChildNode(I,b,x+1);b.state=c.CloseTag,this.stream.write(this.indent(m,b,x)+"</"+m.name+">")}return this.stream.write(this.endline(m,b,x)),b.state=c.None,this.closeNode(m,b,x)},v.prototype.processingInstruction=function(m,b,x){return this.stream.write(v.__super__.processingInstruction.call(this,m,b,x))},v.prototype.raw=function(m,b,x){return this.stream.write(v.__super__.raw.call(this,m,b,x))},v.prototype.text=function(m,b,x){return this.stream.write(v.__super__.text.call(this,m,b,x))},v.prototype.dtdAttList=function(m,b,x){return this.stream.write(v.__super__.dtdAttList.call(this,m,b,x))},v.prototype.dtdElement=function(m,b,x){return this.stream.write(v.__super__.dtdElement.call(this,m,b,x))},v.prototype.dtdEntity=function(m,b,x){return this.stream.write(v.__super__.dtdEntity.call(this,m,b,x))},v.prototype.dtdNotation=function(m,b,x){return this.stream.write(v.__super__.dtdNotation.call(this,m,b,x))},v}(y)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(a,N,j){(function(){var p,c,h=function(g,w){for(var f in w)y.call(w,f)&&(g[f]=w[f]);function v(){this.constructor=g}return v.prototype=w.prototype,g.prototype=new v,g.__super__=w.prototype,g},y={}.hasOwnProperty;c=a("./XMLWriterBase"),N.exports=p=function(g){h(w,g);function w(f){w.__super__.constructor.call(this,f)}return w.prototype.document=function(f,v){var m,b,x,R,I;for(v=this.filterOptions(v),R="",I=f.children,b=0,x=I.length;b<x;b++)m=I[b],R+=this.writeChildNode(m,v,0);return v.pretty&&R.slice(-v.newline.length)===v.newline&&(R=R.slice(0,-v.newline.length)),R},w}(c)}).call(this)},{"./XMLWriterBase":458}],456:[function(a,N,j){(function(){var p,c=function(y,g){return function(){return y.apply(g,arguments)}},h={}.hasOwnProperty;N.exports=p=function(){function y(g){this.assertLegalName=c(this.assertLegalName,this),this.assertLegalChar=c(this.assertLegalChar,this);var w,f,v;g||(g={}),this.options=g,this.options.version||(this.options.version="1.0"),f=g.stringify||{};for(w in f)h.call(f,w)&&(v=f[w],this[w]=v)}return y.prototype.name=function(g){return this.options.noValidation?g:this.assertLegalName(""+g||"")},y.prototype.text=function(g){return this.options.noValidation?g:this.assertLegalChar(this.textEscape(""+g||""))},y.prototype.cdata=function(g){return this.options.noValidation?g:(g=""+g||"",g=g.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(g))},y.prototype.comment=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+g);return this.assertLegalChar(g)},y.prototype.raw=function(g){return this.options.noValidation?g:""+g||""},y.prototype.attValue=function(g){return this.options.noValidation?g:this.assertLegalChar(this.attEscape(g=""+g||""))},y.prototype.insTarget=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.insValue=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/\?>/))throw new Error("Invalid processing instruction value: "+g);return this.assertLegalChar(g)},y.prototype.xmlVersion=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+g);return g},y.prototype.xmlEncoding=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+g);return this.assertLegalChar(g)},y.prototype.xmlStandalone=function(g){return this.options.noValidation?g:g?"yes":"no"},y.prototype.dtdPubID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdSysID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdElementValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdAttType=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdAttDefault=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdEntityValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdNData=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.convertAttKey="@",y.prototype.convertPIKey="?",y.prototype.convertTextKey="#text",y.prototype.convertCDataKey="#cdata",y.prototype.convertCommentKey="#comment",y.prototype.convertRawKey="#raw",y.prototype.assertLegalChar=function(g){var w,f;if(this.options.noValidation)return g;if(w="",this.options.version==="1.0"){if(w=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=g.match(w))throw new Error("Invalid character in string: "+g+" at index "+f.index)}else if(this.options.version==="1.1"&&(w=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=g.match(w)))throw new Error("Invalid character in string: "+g+" at index "+f.index);return g},y.prototype.assertLegalName=function(g){var w;if(this.options.noValidation)return g;if(this.assertLegalChar(g),w=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!g.match(w))throw new Error("Invalid character in name");return g},y.prototype.textEscape=function(g){var w;return this.options.noValidation?g:(w=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(w,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},y.prototype.attEscape=function(g){var w;return this.options.noValidation?g:(w=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(w,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},y}()}).call(this)},{}],457:[function(a,N,j){(function(){var p,c,h,y=function(w,f){for(var v in f)g.call(f,v)&&(w[v]=f[v]);function m(){this.constructor=w}return m.prototype=f.prototype,w.prototype=new m,w.__super__=f.prototype,w},g={}.hasOwnProperty;p=a("./NodeType"),c=a("./XMLCharacterData"),N.exports=h=function(w){y(f,w);function f(v,m){if(f.__super__.constructor.call(this,v),m==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=p.Text,this.value=this.stringify.text(m)}return Object.defineProperty(f.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(f.prototype,"wholeText",{get:function(){var v,m,b;for(b="",m=this.previousSibling;m;)b=m.data+b,m=m.previousSibling;for(b+=this.data,v=this.nextSibling;v;)b=b+v.data,v=v.nextSibling;return b}}),f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(v){return this.options.writer.text(this,this.options.writer.filterOptions(v))},f.prototype.splitText=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.replaceWholeText=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},f}(c)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(a,N,j){(function(){var p,c,h,y,g,w,f,v,m,b,x,R,I,E,C,P,Z,M={}.hasOwnProperty;Z=a("./Utility").assign,p=a("./NodeType"),m=a("./XMLDeclaration"),b=a("./XMLDocType"),h=a("./XMLCData"),y=a("./XMLComment"),R=a("./XMLElement"),E=a("./XMLRaw"),C=a("./XMLText"),I=a("./XMLProcessingInstruction"),x=a("./XMLDummy"),g=a("./XMLDTDAttList"),w=a("./XMLDTDElement"),f=a("./XMLDTDEntity"),v=a("./XMLDTDNotation"),c=a("./WriterState"),N.exports=P=function(){function J(_){var k,B,U;_||(_={}),this.options=_,B=_.writer||{};for(k in B)M.call(B,k)&&(U=B[k],this["_"+k]=this[k],this[k]=U)}return J.prototype.filterOptions=function(_){var k,B,U,K,G,F,W,X;return _||(_={}),_=Z({},this.options,_),k={writer:this},k.pretty=_.pretty||!1,k.allowEmpty=_.allowEmpty||!1,k.indent=(B=_.indent)!=null?B:" ",k.newline=(U=_.newline)!=null?U:`
`,k.offset=(K=_.offset)!=null?K:0,k.dontPrettyTextNodes=(G=(F=_.dontPrettyTextNodes)!=null?F:_.dontprettytextnodes)!=null?G:0,k.spaceBeforeSlash=(W=(X=_.spaceBeforeSlash)!=null?X:_.spacebeforeslash)!=null?W:"",k.spaceBeforeSlash===!0&&(k.spaceBeforeSlash=" "),k.suppressPrettyCount=0,k.user={},k.state=c.None,k},J.prototype.indent=function(_,k,B){var U;return!k.pretty||k.suppressPrettyCount?"":k.pretty&&(U=(B||0)+k.offset+1,U>0)?new Array(U).join(k.indent):""},J.prototype.endline=function(_,k,B){return!k.pretty||k.suppressPrettyCount?"":k.newline},J.prototype.attribute=function(_,k,B){var U;return this.openAttribute(_,k,B),U=" "+_.name+'="'+_.value+'"',this.closeAttribute(_,k,B),U},J.prototype.cdata=function(_,k,B){var U;return this.openNode(_,k,B),k.state=c.OpenTag,U=this.indent(_,k,B)+"<![CDATA[",k.state=c.InsideTag,U+=_.value,k.state=c.CloseTag,U+="]]>"+this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),U},J.prototype.comment=function(_,k,B){var U;return this.openNode(_,k,B),k.state=c.OpenTag,U=this.indent(_,k,B)+"<!-- ",k.state=c.InsideTag,U+=_.value,k.state=c.CloseTag,U+=" -->"+this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),U},J.prototype.declaration=function(_,k,B){var U;return this.openNode(_,k,B),k.state=c.OpenTag,U=this.indent(_,k,B)+"<?xml",k.state=c.InsideTag,U+=' version="'+_.version+'"',_.encoding!=null&&(U+=' encoding="'+_.encoding+'"'),_.standalone!=null&&(U+=' standalone="'+_.standalone+'"'),k.state=c.CloseTag,U+=k.spaceBeforeSlash+"?>",U+=this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),U},J.prototype.docType=function(_,k,B){var U,K,G,F,W;if(B||(B=0),this.openNode(_,k,B),k.state=c.OpenTag,F=this.indent(_,k,B),F+="<!DOCTYPE "+_.root().name,_.pubID&&_.sysID?F+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.sysID&&(F+=' SYSTEM "'+_.sysID+'"'),_.children.length>0){for(F+=" [",F+=this.endline(_,k,B),k.state=c.InsideTag,W=_.children,K=0,G=W.length;K<G;K++)U=W[K],F+=this.writeChildNode(U,k,B+1);k.state=c.CloseTag,F+="]"}return k.state=c.CloseTag,F+=k.spaceBeforeSlash+">",F+=this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),F},J.prototype.element=function(_,k,B){var U,K,G,F,W,X,re,oe,pe,ie,Ie,ee,de,me;B||(B=0),ie=!1,Ie="",this.openNode(_,k,B),k.state=c.OpenTag,Ie+=this.indent(_,k,B)+"<"+_.name,ee=_.attribs;for(pe in ee)M.call(ee,pe)&&(U=ee[pe],Ie+=this.attribute(U,k,B));if(G=_.children.length,F=G===0?null:_.children[0],G===0||_.children.every(function(xe){return(xe.type===p.Text||xe.type===p.Raw)&&xe.value===""}))k.allowEmpty?(Ie+=">",k.state=c.CloseTag,Ie+="</"+_.name+">"+this.endline(_,k,B)):(k.state=c.CloseTag,Ie+=k.spaceBeforeSlash+"/>"+this.endline(_,k,B));else if(k.pretty&&G===1&&(F.type===p.Text||F.type===p.Raw)&&F.value!=null)Ie+=">",k.state=c.InsideTag,k.suppressPrettyCount++,ie=!0,Ie+=this.writeChildNode(F,k,B+1),k.suppressPrettyCount--,ie=!1,k.state=c.CloseTag,Ie+="</"+_.name+">"+this.endline(_,k,B);else{if(k.dontPrettyTextNodes){for(de=_.children,W=0,re=de.length;W<re;W++)if(K=de[W],(K.type===p.Text||K.type===p.Raw)&&K.value!=null){k.suppressPrettyCount++,ie=!0;break}}for(Ie+=">"+this.endline(_,k,B),k.state=c.InsideTag,me=_.children,X=0,oe=me.length;X<oe;X++)K=me[X],Ie+=this.writeChildNode(K,k,B+1);k.state=c.CloseTag,Ie+=this.indent(_,k,B)+"</"+_.name+">",ie&&k.suppressPrettyCount--,Ie+=this.endline(_,k,B),k.state=c.None}return this.closeNode(_,k,B),Ie},J.prototype.writeChildNode=function(_,k,B){switch(_.type){case p.CData:return this.cdata(_,k,B);case p.Comment:return this.comment(_,k,B);case p.Element:return this.element(_,k,B);case p.Raw:return this.raw(_,k,B);case p.Text:return this.text(_,k,B);case p.ProcessingInstruction:return this.processingInstruction(_,k,B);case p.Dummy:return"";case p.Declaration:return this.declaration(_,k,B);case p.DocType:return this.docType(_,k,B);case p.AttributeDeclaration:return this.dtdAttList(_,k,B);case p.ElementDeclaration:return this.dtdElement(_,k,B);case p.EntityDeclaration:return this.dtdEntity(_,k,B);case p.NotationDeclaration:return this.dtdNotation(_,k,B);default:throw new Error("Unknown XML node type: "+_.constructor.name)}},J.prototype.processingInstruction=function(_,k,B){var U;return this.openNode(_,k,B),k.state=c.OpenTag,U=this.indent(_,k,B)+"<?",k.state=c.InsideTag,U+=_.target,_.value&&(U+=" "+_.value),k.state=c.CloseTag,U+=k.spaceBeforeSlash+"?>",U+=this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),U},J.prototype.raw=function(_,k,B){var U;return this.openNode(_,k,B),k.state=c.OpenTag,U=this.indent(_,k,B),k.state=c.InsideTag,U+=_.value,k.state=c.CloseTag,U+=this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),U},J.prototype.text=function(_,k,B){var U;return this.openNode(_,k,B),k.state=c.OpenTag,U=this.indent(_,k,B),k.state=c.InsideTag,U+=_.value,k.state=c.CloseTag,U+=this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),U},J.prototype.dtdAttList=function(_,k,B){var U;return this.openNode(_,k,B),k.state=c.OpenTag,U=this.indent(_,k,B)+"<!ATTLIST",k.state=c.InsideTag,U+=" "+_.elementName+" "+_.attributeName+" "+_.attributeType,_.defaultValueType!=="#DEFAULT"&&(U+=" "+_.defaultValueType),_.defaultValue&&(U+=' "'+_.defaultValue+'"'),k.state=c.CloseTag,U+=k.spaceBeforeSlash+">"+this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),U},J.prototype.dtdElement=function(_,k,B){var U;return this.openNode(_,k,B),k.state=c.OpenTag,U=this.indent(_,k,B)+"<!ELEMENT",k.state=c.InsideTag,U+=" "+_.name+" "+_.value,k.state=c.CloseTag,U+=k.spaceBeforeSlash+">"+this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),U},J.prototype.dtdEntity=function(_,k,B){var U;return this.openNode(_,k,B),k.state=c.OpenTag,U=this.indent(_,k,B)+"<!ENTITY",k.state=c.InsideTag,_.pe&&(U+=" %"),U+=" "+_.name,_.value?U+=' "'+_.value+'"':(_.pubID&&_.sysID?U+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.sysID&&(U+=' SYSTEM "'+_.sysID+'"'),_.nData&&(U+=" NDATA "+_.nData)),k.state=c.CloseTag,U+=k.spaceBeforeSlash+">"+this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),U},J.prototype.dtdNotation=function(_,k,B){var U;return this.openNode(_,k,B),k.state=c.OpenTag,U=this.indent(_,k,B)+"<!NOTATION",k.state=c.InsideTag,U+=" "+_.name,_.pubID&&_.sysID?U+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.pubID?U+=' PUBLIC "'+_.pubID+'"':_.sysID&&(U+=' SYSTEM "'+_.sysID+'"'),k.state=c.CloseTag,U+=k.spaceBeforeSlash+">"+this.endline(_,k,B),k.state=c.None,this.closeNode(_,k,B),U},J.prototype.openNode=function(_,k,B){},J.prototype.closeNode=function(_,k,B){},J.prototype.openAttribute=function(_,k,B){},J.prototype.closeAttribute=function(_,k,B){},J}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(a,N,j){(function(){var p,c,h,y,g,w,f,v,m,b;b=a("./Utility"),v=b.assign,m=b.isFunction,h=a("./XMLDOMImplementation"),y=a("./XMLDocument"),g=a("./XMLDocumentCB"),f=a("./XMLStringWriter"),w=a("./XMLStreamWriter"),p=a("./NodeType"),c=a("./WriterState"),N.exports.create=function(x,R,I,E){var C,P;if(x==null)throw new Error("Root element needs a name.");return E=v({},R,I,E),C=new y(E),P=C.element(x),E.headless||(C.declaration(E),(E.pubID!=null||E.sysID!=null)&&C.dtd(E)),P},N.exports.begin=function(x,R,I){var E;return m(x)&&(E=[x,R],R=E[0],I=E[1],x={}),R?new g(x,R,I):new y(x)},N.exports.stringWriter=function(x){return new f(x)},N.exports.streamWriter=function(x,R){return new w(x,R)},N.exports.implementation=new h,N.exports.nodeType=p,N.exports.writerState=c}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(a,N,j){N.exports=c;var p=Object.prototype.hasOwnProperty;function c(){for(var h={},y=0;y<arguments.length;y++){var g=arguments[y];for(var w in g)p.call(g,w)&&(h[w]=g[w])}return h}},{}],461:[function(a,N,j){"use strict";a("core-js/modules/es.array.fill.js"),a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.regexp.to-string.js"),a("core-js/modules/es.array.join.js"),a("core-js/modules/es.array.slice.js");var p=a("buffer").Buffer,c=a("./sha"),h=a("./md5"),y={sha1:c,md5:h},g=64,w=p.alloc(g);w.fill(0);function f(b,x,R){p.isBuffer(x)||(x=p.from(x)),p.isBuffer(R)||(R=p.from(R)),x.length>g?x=b(x):x.length<g&&(x=p.concat([x,w],g));for(var I=p.alloc(g),E=p.alloc(g),C=0;C<g;C++)I[C]=x[C]^54,E[C]=x[C]^92;var P=b(p.concat([I,R]));return b(p.concat([E,P]))}function v(b,x){b=b||"sha1";var R=y[b],I=[],E=0;return R||m("algorithm:",b,"is not yet supported"),{update:function(P){return p.isBuffer(P)||(P=p.from(P)),I.push(P),E+=P.length,this},digest:function(P){var Z=p.concat(I),M=x?f(R,x,Z):R(Z);return I=null,P?M.toString(P):M}}}function m(){var b=[].slice.call(arguments).join(" ");throw new Error([b,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}j.createHash=function(b){return v(b)},j.createHmac=function(b,x){return v(b,x)},j.createCredentials=function(){m("sorry,createCredentials is not implemented yet")},j.createCipher=function(){m("sorry,createCipher is not implemented yet")},j.createCipheriv=function(){m("sorry,createCipheriv is not implemented yet")},j.createDecipher=function(){m("sorry,createDecipher is not implemented yet")},j.createDecipheriv=function(){m("sorry,createDecipheriv is not implemented yet")},j.createSign=function(){m("sorry,createSign is not implemented yet")},j.createVerify=function(){m("sorry,createVerify is not implemented yet")},j.createDiffieHellman=function(){m("sorry,createDiffieHellman is not implemented yet")},j.pbkdf2=function(){m("sorry,pbkdf2 is not implemented yet")}},{"./md5":463,"./sha":464,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],462:[function(a,N,j){"use strict";a("core-js/modules/es.array.fill.js"),a("core-js/modules/es.array.concat.js");var p=a("buffer").Buffer,c=4,h=p.alloc(c);h.fill(0);var y=8;function g(v,m){if(v.length%c!==0){var b=v.length+(c-v.length%c);v=p.concat([v,h],b)}for(var x=[],R=m?v.readInt32BE:v.readInt32LE,I=0;I<v.length;I+=c)x.push(R.call(v,I));return x}function w(v,m,b){for(var x=p.alloc(m),R=b?x.writeInt32BE:x.writeInt32LE,I=0;I<v.length;I++)R.call(x,v[I],I*4,!0);return x}function f(v,m,b,x){p.isBuffer(v)||(v=p.from(v));var R=m(g(v,x),v.length*y);return w(R,b,x)}N.exports={hash:f}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(a,N,j){"use strict";var p=a("./helpers");function c(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function h(x,R){x[R>>5]|=128<<R%32,x[(R+64>>>9<<4)+14]=R;for(var I=1732584193,E=-271733879,C=-1732584194,P=271733878,Z=0;Z<x.length;Z+=16){var M=I,J=E,_=C,k=P;I=g(I,E,C,P,x[Z+0],7,-680876936),P=g(P,I,E,C,x[Z+1],12,-389564586),C=g(C,P,I,E,x[Z+2],17,606105819),E=g(E,C,P,I,x[Z+3],22,-1044525330),I=g(I,E,C,P,x[Z+4],7,-176418897),P=g(P,I,E,C,x[Z+5],12,1200080426),C=g(C,P,I,E,x[Z+6],17,-1473231341),E=g(E,C,P,I,x[Z+7],22,-45705983),I=g(I,E,C,P,x[Z+8],7,1770035416),P=g(P,I,E,C,x[Z+9],12,-1958414417),C=g(C,P,I,E,x[Z+10],17,-42063),E=g(E,C,P,I,x[Z+11],22,-1990404162),I=g(I,E,C,P,x[Z+12],7,1804603682),P=g(P,I,E,C,x[Z+13],12,-40341101),C=g(C,P,I,E,x[Z+14],17,-1502002290),E=g(E,C,P,I,x[Z+15],22,1236535329),I=w(I,E,C,P,x[Z+1],5,-165796510),P=w(P,I,E,C,x[Z+6],9,-1069501632),C=w(C,P,I,E,x[Z+11],14,643717713),E=w(E,C,P,I,x[Z+0],20,-373897302),I=w(I,E,C,P,x[Z+5],5,-701558691),P=w(P,I,E,C,x[Z+10],9,38016083),C=w(C,P,I,E,x[Z+15],14,-660478335),E=w(E,C,P,I,x[Z+4],20,-405537848),I=w(I,E,C,P,x[Z+9],5,568446438),P=w(P,I,E,C,x[Z+14],9,-1019803690),C=w(C,P,I,E,x[Z+3],14,-187363961),E=w(E,C,P,I,x[Z+8],20,1163531501),I=w(I,E,C,P,x[Z+13],5,-1444681467),P=w(P,I,E,C,x[Z+2],9,-51403784),C=w(C,P,I,E,x[Z+7],14,1735328473),E=w(E,C,P,I,x[Z+12],20,-1926607734),I=f(I,E,C,P,x[Z+5],4,-378558),P=f(P,I,E,C,x[Z+8],11,-2022574463),C=f(C,P,I,E,x[Z+11],16,1839030562),E=f(E,C,P,I,x[Z+14],23,-35309556),I=f(I,E,C,P,x[Z+1],4,-1530992060),P=f(P,I,E,C,x[Z+4],11,1272893353),C=f(C,P,I,E,x[Z+7],16,-155497632),E=f(E,C,P,I,x[Z+10],23,-1094730640),I=f(I,E,C,P,x[Z+13],4,681279174),P=f(P,I,E,C,x[Z+0],11,-358537222),C=f(C,P,I,E,x[Z+3],16,-722521979),E=f(E,C,P,I,x[Z+6],23,76029189),I=f(I,E,C,P,x[Z+9],4,-640364487),P=f(P,I,E,C,x[Z+12],11,-421815835),C=f(C,P,I,E,x[Z+15],16,530742520),E=f(E,C,P,I,x[Z+2],23,-995338651),I=v(I,E,C,P,x[Z+0],6,-198630844),P=v(P,I,E,C,x[Z+7],10,1126891415),C=v(C,P,I,E,x[Z+14],15,-1416354905),E=v(E,C,P,I,x[Z+5],21,-57434055),I=v(I,E,C,P,x[Z+12],6,1700485571),P=v(P,I,E,C,x[Z+3],10,-1894986606),C=v(C,P,I,E,x[Z+10],15,-1051523),E=v(E,C,P,I,x[Z+1],21,-2054922799),I=v(I,E,C,P,x[Z+8],6,1873313359),P=v(P,I,E,C,x[Z+15],10,-30611744),C=v(C,P,I,E,x[Z+6],15,-1560198380),E=v(E,C,P,I,x[Z+13],21,1309151649),I=v(I,E,C,P,x[Z+4],6,-145523070),P=v(P,I,E,C,x[Z+11],10,-1120210379),C=v(C,P,I,E,x[Z+2],15,718787259),E=v(E,C,P,I,x[Z+9],21,-343485551),I=m(I,M),E=m(E,J),C=m(C,_),P=m(P,k)}return Array(I,E,C,P)}function y(x,R,I,E,C,P){return m(b(m(m(R,x),m(E,P)),C),I)}function g(x,R,I,E,C,P,Z){return y(R&I|~R&E,x,R,C,P,Z)}function w(x,R,I,E,C,P,Z){return y(R&E|I&~E,x,R,C,P,Z)}function f(x,R,I,E,C,P,Z){return y(R^I^E,x,R,C,P,Z)}function v(x,R,I,E,C,P,Z){return y(I^(R|~E),x,R,C,P,Z)}function m(x,R){var I=(x&65535)+(R&65535),E=(x>>16)+(R>>16)+(I>>16);return E<<16|I&65535}function b(x,R){return x<<R|x>>>32-R}N.exports=function(R){return p.hash(R,h,16)}},{"./helpers":462}],464:[function(a,N,j){"use strict";var p=a("./helpers");function c(f,v){f[v>>5]|=128<<24-v%32,f[(v+64>>9<<4)+15]=v;for(var m=Array(80),b=1732584193,x=-271733879,R=-1732584194,I=271733878,E=-1009589776,C=0;C<f.length;C+=16){for(var P=b,Z=x,M=R,J=I,_=E,k=0;k<80;k++){k<16?m[k]=f[C+k]:m[k]=w(m[k-3]^m[k-8]^m[k-14]^m[k-16],1);var B=g(g(w(b,5),h(k,x,R,I)),g(g(E,m[k]),y(k)));E=I,I=R,R=w(x,30),x=b,b=B}b=g(b,P),x=g(x,Z),R=g(R,M),I=g(I,J),E=g(E,_)}return Array(b,x,R,I,E)}function h(f,v,m,b){return f<20?v&m|~v&b:f<40?v^m^b:f<60?v&m|v&b|m&b:v^m^b}function y(f){return f<20?1518500249:f<40?1859775393:f<60?-1894007588:-899497514}function g(f,v){var m=(f&65535)+(v&65535),b=(f>>16)+(v>>16)+(m>>16);return b<<16|m&65535}function w(f,v){return f<<v|f>>>32-v}N.exports=function(v){return p.hash(v,c,20,!0)}},{"./helpers":462}],465:[function(a,N,j){"use strict";N.exports=function(){return function(){}}},{}],466:[function(a,N,j){(function(p){(function(){"use strict";var c=a("@babel/runtime/helpers/interopRequireDefault"),h=c(a("@babel/runtime/helpers/typeof")),y=a("stream"),g=y.Stream,w=a("../lib/common/utils/isArray"),f=w.isArray;N.exports.string=function(b){return typeof b=="string"},N.exports.array=f,N.exports.buffer=p.isBuffer;function v(m){return m instanceof g}N.exports.writableStream=function(b){return v(b)&&typeof b._write=="function"&&(0,h.default)(b._writableState)==="object"}}).call(this)}).call(this,{isBuffer:a("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(a,N,j){"use strict";var p=a("immediate"),c=N.exports={};c.nextTick=p,c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={};function h(){}c.on=h,c.addListener=h,c.once=h,c.off=h,c.removeListener=h,c.removeAllListeners=h,c.emit=h,c.prependListener=h,c.prependOnceListener=h,c.listeners=function(y){return[]},c.binding=function(y){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(y){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{immediate:358}],468:[function(a,N,j){(function(p){(function(){"use strict";a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.search.js");var c=a("./lib/request"),h=a("./lib/response"),y=a("xtend"),g=a("builtin-status-codes"),w=a("url"),f=j;f.request=function(v,m){typeof v=="string"?v=w.parse(v):v=y(v);var b=p.location.protocol.search(/^https?:$/)===-1?"http:":"",x=v.protocol||b,R=v.hostname||v.host,I=v.port,E=v.path||"/";R&&R.indexOf(":")!==-1&&(R="["+R+"]"),v.url=(R?x+"//"+R:"")+(I?":"+I:"")+E,v.method=(v.method||"GET").toUpperCase(),v.headers=v.headers||{};var C=new c(v);return m&&C.on("response",m),C},f.get=function(m,b){var x=f.request(m,b);return x.end(),x},f.ClientRequest=c,f.IncomingMessage=h.IncomingMessage,f.Agent=function(){},f.Agent.defaultMaxSockets=4,f.globalAgent=new f.Agent,f.STATUS_CODES=g,f.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(a,N,j){(function(p){(function(){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.promise.js"),a("core-js/modules/es.array-buffer.constructor.js"),a("core-js/modules/es.array-buffer.slice.js"),a("core-js/modules/es.array.slice.js"),j.fetch=f(p.fetch)&&f(p.ReadableStream),j.writableStream=f(p.WritableStream),j.abortController=f(p.AbortController),j.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),j.blobConstructor=!0}catch(v){}var c;function h(){if(c!==void 0)return c;if(p.XMLHttpRequest){c=new p.XMLHttpRequest;try{c.open("GET",p.XDomainRequest?"/":"https://example.com")}catch(v){c=null}}else c=null;return c}function y(v){var m=h();if(!m)return!1;try{return m.responseType=v,m.responseType===v}catch(b){}return!1}var g=typeof p.ArrayBuffer!="undefined",w=g&&f(p.ArrayBuffer.prototype.slice);j.arraybuffer=j.fetch||g&&y("arraybuffer"),j.msstream=!j.fetch&&w&&y("ms-stream"),j.mozchunkedarraybuffer=!j.fetch&&g&&y("moz-chunked-arraybuffer"),j.overrideMimeType=j.fetch||(h()?f(h().overrideMimeType):!1),j.vbArray=f(p.VBArray);function f(v){return typeof v=="function"}c=null}).call(this)}).call(this,typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(a,N,j){(function(p,c,h){(function(){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.regexp.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.object.keys.js"),a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.array.map.js"),a("core-js/modules/es.function.name.js"),a("core-js/modules/es.promise.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.split.js");var y=a("./capability"),g=a("inherits"),w=a("./response"),f=a("readable-stream"),v=a("to-arraybuffer"),m=w.IncomingMessage,b=w.readyStates;function x(C,P){return y.fetch&&P?"fetch":y.mozchunkedarraybuffer?"moz-chunked-arraybuffer":y.msstream?"ms-stream":y.arraybuffer&&C?"arraybuffer":y.vbArray&&C?"text:vbarray":"text"}var R=N.exports=function(C){var P=this;f.Writable.call(P),P._opts=C,P._body=[],P._headers={},C.auth&&P.setHeader("Authorization","Basic "+new h(C.auth).toString("base64")),Object.keys(C.headers).forEach(function(J){P.setHeader(J,C.headers[J])});var Z,M=!0;if(C.mode==="disable-fetch"||"requestTimeout"in C&&!y.abortController)M=!1,Z=!0;else if(C.mode==="prefer-streaming")Z=!1;else if(C.mode==="allow-wrong-content-type")Z=!y.overrideMimeType;else if(!C.mode||C.mode==="default"||C.mode==="prefer-fast")Z=!0;else throw new Error("Invalid value for opts.mode");P._mode=x(Z,M),P._fetchTimer=null,P.on("finish",function(){P._onFinish()})};g(R,f.Writable),R.prototype.setHeader=function(C,P){var Z=this,M=C.toLowerCase();E.indexOf(M)===-1&&(Z._headers[M]={name:C,value:P})},R.prototype.getHeader=function(C){var P=this._headers[C.toLowerCase()];return P?P.value:null},R.prototype.removeHeader=function(C){var P=this;delete P._headers[C.toLowerCase()]},R.prototype._onFinish=function(){var C=this;if(!C._destroyed){var P=C._opts,Z=C._headers,M=null;P.method!=="GET"&&P.method!=="HEAD"&&(y.arraybuffer?M=v(h.concat(C._body)):y.blobConstructor?M=new c.Blob(C._body.map(function(K){return v(K)}),{type:(Z["content-type"]||{}).value||""}):M=h.concat(C._body).toString());var J=[];if(Object.keys(Z).forEach(function(K){var G=Z[K].name,F=Z[K].value;Array.isArray(F)?F.forEach(function(W){J.push([G,W])}):J.push([G,F])}),C._mode==="fetch"){var _=null,k=null;if(y.abortController){var B=new AbortController;_=B.signal,C._fetchAbortController=B,"requestTimeout"in P&&P.requestTimeout!==0&&(C._fetchTimer=c.setTimeout(function(){C.emit("requestTimeout"),C._fetchAbortController&&C._fetchAbortController.abort()},P.requestTimeout))}c.fetch(C._opts.url,{method:C._opts.method,headers:J,body:M||void 0,mode:"cors",credentials:P.withCredentials?"include":"same-origin",signal:_}).then(function(K){C._fetchResponse=K,C._connect()},function(K){c.clearTimeout(C._fetchTimer),C._destroyed||C.emit("error",K)})}else{var U=C._xhr=new c.XMLHttpRequest;try{U.open(C._opts.method,C._opts.url,!0)}catch(K){p.nextTick(function(){C.emit("error",K)});return}"responseType"in U&&(U.responseType=C._mode.split(":")[0]),"withCredentials"in U&&(U.withCredentials=!!P.withCredentials),C._mode==="text"&&"overrideMimeType"in U&&U.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in P&&(U.timeout=P.requestTimeout,U.ontimeout=function(){C.emit("requestTimeout")}),J.forEach(function(K){U.setRequestHeader(K[0],K[1])}),C._response=null,U.onreadystatechange=function(){switch(U.readyState){case b.LOADING:case b.DONE:C._onXHRProgress();break}},C._mode==="moz-chunked-arraybuffer"&&(U.onprogress=function(){C._onXHRProgress()}),U.onerror=function(){C._destroyed||C.emit("error",new Error("XHR error"))};try{U.send(M)}catch(K){p.nextTick(function(){C.emit("error",K)});return}}}};function I(C){try{var P=C.status;return P!==null&&P!==0}catch(Z){return!1}}R.prototype._onXHRProgress=function(){var C=this;!I(C._xhr)||C._destroyed||(C._response||C._connect(),C._response._onXHRProgress())},R.prototype._connect=function(){var C=this;C._destroyed||(C._response=new m(C._xhr,C._fetchResponse,C._mode,C._fetchTimer),C._response.on("error",function(P){C.emit("error",P)}),C.emit("response",C._response))},R.prototype._write=function(C,P,Z){var M=this;M._body.push(C),Z()},R.prototype.abort=R.prototype.destroy=function(){var C=this;C._destroyed=!0,c.clearTimeout(C._fetchTimer),C._response&&(C._response._destroyed=!0),C._xhr?C._xhr.abort():C._fetchAbortController&&C._fetchAbortController.abort()},R.prototype.end=function(C,P,Z){var M=this;typeof C=="function"&&(Z=C,C=void 0),f.Writable.prototype.end.call(M,C,P,Z)},R.prototype.flushHeaders=function(){},R.prototype.setTimeout=function(){},R.prototype.setNoDelay=function(){},R.prototype.setSocketKeepAlive=function(){};var E=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,a("_process"),typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{},a("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(a,N,j){(function(p,c,h){(function(){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/web.dom-collections.for-each.js"),a("core-js/modules/es.promise.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.split.js"),a("core-js/modules/es.string.match.js"),a("core-js/modules/es.array.iterator.js"),a("core-js/modules/es.array-buffer.slice.js"),a("core-js/modules/es.typed-array.uint8-array.js"),a("core-js/modules/es.typed-array.copy-within.js"),a("core-js/modules/es.typed-array.every.js"),a("core-js/modules/es.typed-array.fill.js"),a("core-js/modules/es.typed-array.filter.js"),a("core-js/modules/es.typed-array.find.js"),a("core-js/modules/es.typed-array.find-index.js"),a("core-js/modules/es.typed-array.for-each.js"),a("core-js/modules/es.typed-array.includes.js"),a("core-js/modules/es.typed-array.index-of.js"),a("core-js/modules/es.typed-array.iterator.js"),a("core-js/modules/es.typed-array.join.js"),a("core-js/modules/es.typed-array.last-index-of.js"),a("core-js/modules/es.typed-array.map.js"),a("core-js/modules/es.typed-array.reduce.js"),a("core-js/modules/es.typed-array.reduce-right.js"),a("core-js/modules/es.typed-array.reverse.js"),a("core-js/modules/es.typed-array.set.js"),a("core-js/modules/es.typed-array.slice.js"),a("core-js/modules/es.typed-array.some.js"),a("core-js/modules/es.typed-array.sort.js"),a("core-js/modules/es.typed-array.subarray.js"),a("core-js/modules/es.typed-array.to-locale-string.js"),a("core-js/modules/es.typed-array.to-string.js"),a("core-js/modules/es.array.slice.js");var y=a("./capability"),g=a("inherits"),w=a("readable-stream"),f=j.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},v=j.IncomingMessage=function(m,b,x,R){var I=this;if(w.Readable.call(I),I._mode=x,I.headers={},I.rawHeaders=[],I.trailers={},I.rawTrailers=[],I.on("end",function(){p.nextTick(function(){I.emit("close")})}),x==="fetch"){var E=function _(){P.read().then(function(k){if(!I._destroyed){if(k.done){c.clearTimeout(R),I.push(null);return}I.push(new h(k.value)),_()}}).catch(function(k){c.clearTimeout(R),I._destroyed||I.emit("error",k)})};if(I._fetchResponse=b,I.url=b.url,I.statusCode=b.status,I.statusMessage=b.statusText,b.headers.forEach(function(_,k){I.headers[k.toLowerCase()]=_,I.rawHeaders.push(k,_)}),y.writableStream){var C=new WritableStream({write:function(k){return new Promise(function(B,U){I._destroyed?U():I.push(new h(k))?B():I._resumeFetch=B})},close:function(){c.clearTimeout(R),I._destroyed||I.push(null)},abort:function(k){I._destroyed||I.emit("error",k)}});try{b.body.pipeTo(C).catch(function(_){c.clearTimeout(R),I._destroyed||I.emit("error",_)});return}catch(_){}}var P=b.body.getReader();E()}else{I._xhr=m,I._pos=0,I.url=m.responseURL,I.statusCode=m.status,I.statusMessage=m.statusText;var Z=m.getAllResponseHeaders().split(/\r?\n/);if(Z.forEach(function(_){var k=_.match(/^([^:]+):\s*(.*)/);if(k){var B=k[1].toLowerCase();B==="set-cookie"?(I.headers[B]===void 0&&(I.headers[B]=[]),I.headers[B].push(k[2])):I.headers[B]!==void 0?I.headers[B]+=", "+k[2]:I.headers[B]=k[2],I.rawHeaders.push(k[1],k[2])}}),I._charset="x-user-defined",!y.overrideMimeType){var M=I.rawHeaders["mime-type"];if(M){var J=M.match(/;\s*charset=([^;])(;|$)/);J&&(I._charset=J[1].toLowerCase())}I._charset||(I._charset="utf-8")}}};g(v,w.Readable),v.prototype._read=function(){var m=this,b=m._resumeFetch;b&&(m._resumeFetch=null,b())},v.prototype._onXHRProgress=function(){var m=this,b=m._xhr,x=null;switch(m._mode){case"text:vbarray":if(b.readyState!==f.DONE)break;try{x=new c.VBArray(b.responseBody).toArray()}catch(P){}if(x!==null){m.push(new h(x));break}case"text":try{x=b.responseText}catch(P){m._mode="text:vbarray";break}if(x.length>m._pos){var R=x.substr(m._pos);if(m._charset==="x-user-defined"){for(var I=new h(R.length),E=0;E<R.length;E++)I[E]=R.charCodeAt(E)&255;m.push(I)}else m.push(R,m._charset);m._pos=x.length}break;case"arraybuffer":if(b.readyState!==f.DONE||!b.response)break;x=b.response,m.push(new h(new Uint8Array(x)));break;case"moz-chunked-arraybuffer":if(x=b.response,b.readyState!==f.LOADING||!x)break;m.push(new h(new Uint8Array(x)));break;case"ms-stream":if(x=b.response,b.readyState!==f.LOADING)break;var C=new c.MSStreamReader;C.onprogress=function(){C.result.byteLength>m._pos&&(m.push(new h(new Uint8Array(C.result.slice(m._pos)))),m._pos=C.result.byteLength)},C.onload=function(){m.push(null)},C.readAsArrayBuffer(x);break}m._xhr.readyState===f.DONE&&m._mode!=="ms-stream"&&m.push(null)}}).call(this)}).call(this,a("_process"),typeof ut!="undefined"?ut:typeof self!="undefined"?self:typeof window!="undefined"?window:{},a("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/helpers/typeof"));a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.search.js"),a("core-js/modules/es.array.concat.js"),a("core-js/modules/es.string.split.js"),a("core-js/modules/es.string.replace.js"),a("core-js/modules/es.array.join.js"),a("core-js/modules/es.string.trim.js"),a("core-js/modules/es.string.match.js"),a("core-js/modules/es.array.slice.js"),a("core-js/modules/es.object.keys.js"),a("core-js/modules/es.array.splice.js");var h=a("punycode"),y=a("./util");j.parse=k,j.resolve=U,j.resolveObject=K,j.format=B,j.Url=g;function g(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var w=/^([a-z0-9.+-]+:)/i,f=/:[0-9]*$/,v=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,m=["<",">",'"',"`"," ","\r",`
`," "],b=["{","}","|","\\","^","`"].concat(m),x=["'"].concat(b),R=["%","/","?",";","#"].concat(x),I=["/","?","#"],E=255,C=/^[+a-z0-9A-Z_-]{0,63}$/,P=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Z={javascript:!0,"javascript:":!0},M={javascript:!0,"javascript:":!0},J={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=a("querystring");function k(G,F,W){if(G&&y.isObject(G)&&G instanceof g)return G;var X=new g;return X.parse(G,F,W),X}g.prototype.parse=function(G,F,W){if(!y.isString(G))throw new TypeError("Parameter 'url' must be a string, not "+(0,c.default)(G));var X=G.indexOf("?"),re=X!==-1&&X<G.indexOf("#")?"?":"#",oe=G.split(re),pe=/\\/g;oe[0]=oe[0].replace(pe,"/"),G=oe.join(re);var ie=G;if(ie=ie.trim(),!W&&G.split("#").length===1){var Ie=v.exec(ie);if(Ie)return this.path=ie,this.href=ie,this.pathname=Ie[1],Ie[2]?(this.search=Ie[2],F?this.query=_.parse(this.search.substr(1)):this.query=this.search.substr(1)):F&&(this.search="",this.query={}),this}var ee=w.exec(ie);if(ee){ee=ee[0];var de=ee.toLowerCase();this.protocol=de,ie=ie.substr(ee.length)}if(W||ee||ie.match(/^\/\/[^@\/]+@[^@\/]+/)){var me=ie.substr(0,2)==="//";me&&!(ee&&M[ee])&&(ie=ie.substr(2),this.slashes=!0)}if(!M[ee]&&(me||ee&&!J[ee])){for(var xe=-1,ce=0;ce<I.length;ce++){var le=ie.indexOf(I[ce]);le!==-1&&(xe===-1||le<xe)&&(xe=le)}var ge,Ce;xe===-1?Ce=ie.lastIndexOf("@"):Ce=ie.lastIndexOf("@",xe),Ce!==-1&&(ge=ie.slice(0,Ce),ie=ie.slice(Ce+1),this.auth=decodeURIComponent(ge)),xe=-1;for(var ce=0;ce<R.length;ce++){var le=ie.indexOf(R[ce]);le!==-1&&(xe===-1||le<xe)&&(xe=le)}xe===-1&&(xe=ie.length),this.host=ie.slice(0,xe),ie=ie.slice(xe),this.parseHost(),this.hostname=this.hostname||"";var De=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!De)for(var je=this.hostname.split("."),ce=0,fe=je.length;ce<fe;ce++){var Y=je[ce];if(Y&&!Y.match(C)){for(var be="",q=0,V=Y.length;q<V;q++)Y.charCodeAt(q)>127?be+="x":be+=Y[q];if(!be.match(C)){var Q=je.slice(0,ce),L=je.slice(ce+1),$=Y.match(P);$&&(Q.push($[1]),L.unshift($[2])),L.length&&(ie="/"+L.join(".")+ie),this.hostname=Q.join(".");break}}}this.hostname.length>E?this.hostname="":this.hostname=this.hostname.toLowerCase(),De||(this.hostname=h.toASCII(this.hostname));var S=this.port?":"+this.port:"",T=this.hostname||"";this.host=T+S,this.href+=this.host,De&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ie[0]!=="/"&&(ie="/"+ie))}if(!Z[de])for(var ce=0,fe=x.length;ce<fe;ce++){var z=x[ce];if(ie.indexOf(z)!==-1){var ne=encodeURIComponent(z);ne===z&&(ne=escape(z)),ie=ie.split(z).join(ne)}}var he=ie.indexOf("#");he!==-1&&(this.hash=ie.substr(he),ie=ie.slice(0,he));var Pe=ie.indexOf("?");if(Pe!==-1?(this.search=ie.substr(Pe),this.query=ie.substr(Pe+1),F&&(this.query=_.parse(this.query)),ie=ie.slice(0,Pe)):F&&(this.search="",this.query={}),ie&&(this.pathname=ie),J[de]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var S=this.pathname||"",Oe=this.search||"";this.path=S+Oe}return this.href=this.format(),this};function B(G){return y.isString(G)&&(G=k(G)),G instanceof g?G.format():g.prototype.format.call(G)}g.prototype.format=function(){var G=this.auth||"";G&&(G=encodeURIComponent(G),G=G.replace(/%3A/i,":"),G+="@");var F=this.protocol||"",W=this.pathname||"",X=this.hash||"",re=!1,oe="";this.host?re=G+this.host:this.hostname&&(re=G+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(re+=":"+this.port)),this.query&&y.isObject(this.query)&&Object.keys(this.query).length&&(oe=_.stringify(this.query));var pe=this.search||oe&&"?"+oe||"";return F&&F.substr(-1)!==":"&&(F+=":"),this.slashes||(!F||J[F])&&re!==!1?(re="//"+(re||""),W&&W.charAt(0)!=="/"&&(W="/"+W)):re||(re=""),X&&X.charAt(0)!=="#"&&(X="#"+X),pe&&pe.charAt(0)!=="?"&&(pe="?"+pe),W=W.replace(/[?#]/g,function(ie){return encodeURIComponent(ie)}),pe=pe.replace("#","%23"),F+re+W+pe+X};function U(G,F){return k(G,!1,!0).resolve(F)}g.prototype.resolve=function(G){return this.resolveObject(k(G,!1,!0)).format()};function K(G,F){return G?k(G,!1,!0).resolveObject(F):F}g.prototype.resolveObject=function(G){if(y.isString(G)){var F=new g;F.parse(G,!1,!0),G=F}for(var W=new g,X=Object.keys(this),re=0;re<X.length;re++){var oe=X[re];W[oe]=this[oe]}if(W.hash=G.hash,G.href==="")return W.href=W.format(),W;if(G.slashes&&!G.protocol){for(var pe=Object.keys(G),ie=0;ie<pe.length;ie++){var Ie=pe[ie];Ie!=="protocol"&&(W[Ie]=G[Ie])}return J[W.protocol]&&W.hostname&&!W.pathname&&(W.path=W.pathname="/"),W.href=W.format(),W}if(G.protocol&&G.protocol!==W.protocol){if(!J[G.protocol]){for(var ee=Object.keys(G),de=0;de<ee.length;de++){var me=ee[de];W[me]=G[me]}return W.href=W.format(),W}if(W.protocol=G.protocol,!G.host&&!M[G.protocol]){for(var fe=(G.pathname||"").split("/");fe.length&&!(G.host=fe.shift()););G.host||(G.host=""),G.hostname||(G.hostname=""),fe[0]!==""&&fe.unshift(""),fe.length<2&&fe.unshift(""),W.pathname=fe.join("/")}else W.pathname=G.pathname;if(W.search=G.search,W.query=G.query,W.host=G.host||"",W.auth=G.auth,W.hostname=G.hostname||G.host,W.port=G.port,W.pathname||W.search){var xe=W.pathname||"",ce=W.search||"";W.path=xe+ce}return W.slashes=W.slashes||G.slashes,W.href=W.format(),W}var le=W.pathname&&W.pathname.charAt(0)==="/",ge=G.host||G.pathname&&G.pathname.charAt(0)==="/",Ce=ge||le||W.host&&G.pathname,De=Ce,je=W.pathname&&W.pathname.split("/")||[],fe=G.pathname&&G.pathname.split("/")||[],Y=W.protocol&&!J[W.protocol];if(Y&&(W.hostname="",W.port=null,W.host&&(je[0]===""?je[0]=W.host:je.unshift(W.host)),W.host="",G.protocol&&(G.hostname=null,G.port=null,G.host&&(fe[0]===""?fe[0]=G.host:fe.unshift(G.host)),G.host=null),Ce=Ce&&(fe[0]===""||je[0]==="")),ge)W.host=G.host||G.host===""?G.host:W.host,W.hostname=G.hostname||G.hostname===""?G.hostname:W.hostname,W.search=G.search,W.query=G.query,je=fe;else if(fe.length)je||(je=[]),je.pop(),je=je.concat(fe),W.search=G.search,W.query=G.query;else if(!y.isNullOrUndefined(G.search)){if(Y){W.hostname=W.host=je.shift();var be=W.host&&W.host.indexOf("@")>0?W.host.split("@"):!1;be&&(W.auth=be.shift(),W.host=W.hostname=be.shift())}return W.search=G.search,W.query=G.query,(!y.isNull(W.pathname)||!y.isNull(W.search))&&(W.path=(W.pathname?W.pathname:"")+(W.search?W.search:"")),W.href=W.format(),W}if(!je.length)return W.pathname=null,W.search?W.path="/"+W.search:W.path=null,W.href=W.format(),W;for(var q=je.slice(-1)[0],V=(W.host||G.host||je.length>1)&&(q==="."||q==="..")||q==="",Q=0,L=je.length;L>=0;L--)q=je[L],q==="."?je.splice(L,1):q===".."?(je.splice(L,1),Q++):Q&&(je.splice(L,1),Q--);if(!Ce&&!De)for(;Q--;Q)je.unshift("..");Ce&&je[0]!==""&&(!je[0]||je[0].charAt(0)!=="/")&&je.unshift(""),V&&je.join("/").substr(-1)!=="/"&&je.push("");var $=je[0]===""||je[0]&&je[0].charAt(0)==="/";if(Y){W.hostname=W.host=$?"":je.length?je.shift():"";var be=W.host&&W.host.indexOf("@")>0?W.host.split("@"):!1;be&&(W.auth=be.shift(),W.host=W.hostname=be.shift())}return Ce=Ce||W.host&&je.length,Ce&&!$&&je.unshift(""),je.length?W.pathname=je.join("/"):(W.pathname=null,W.path=null),(!y.isNull(W.pathname)||!y.isNull(W.search))&&(W.path=(W.pathname?W.pathname:"")+(W.search?W.search:"")),W.auth=G.auth||W.auth,W.slashes=W.slashes||G.slashes,W.href=W.format(),W},g.prototype.parseHost=function(){var G=this.host,F=f.exec(G);F&&(F=F[0],F!==":"&&(this.port=F.substr(1)),G=G.substr(0,G.length-F.length)),G&&(this.hostname=G)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(a,N,j){"use strict";var p=a("@babel/runtime/helpers/interopRequireDefault"),c=p(a("@babel/runtime/helpers/typeof"));N.exports={isString:function(y){return typeof y=="string"},isObject:function(y){return(0,c.default)(y)==="object"&&y!==null},isNull:function(y){return y===null},isNullOrUndefined:function(y){return y==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(a,N,j){"use strict";a("core-js/modules/es.number.constructor.js"),j.encodeURIComponent=function(p){try{return encodeURIComponent(p)}catch(c){return p}},j.escape=a("escape-html"),j.timestamp=function(c){if(c){var h=c;return typeof h=="string"&&(h=Number(h)),String(c).length===10&&(h*=1e3),new Date(h)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(a,N,j){(function(p,c){(function(){"use strict";var h=a("@babel/runtime/helpers/interopRequireDefault"),y=h(a("@babel/runtime/helpers/typeof"));a("core-js/modules/es.string.trim.js"),a("core-js/modules/es.regexp.exec.js"),a("core-js/modules/es.string.split.js"),a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.promise.js"),a("core-js/modules/es.function.name.js"),a("core-js/modules/es.array.concat.js");var g=a("util"),w=a("url"),f=a("http"),v=a("https"),m=a("debug")("urllib"),b=a("humanize-ms"),x=0,R=Math.pow(2,31)-10,I=/^https?:\/\//i;function E(M,J){return M===void 0?J:M}function C(M){return M?M.split(";")[0].trim().toLowerCase():""}function P(M,J){return function(_,k,B){if(_)return J(_);M({data:k,status:B.statusCode,headers:B.headers,res:B})}}j.TIMEOUTS=[b("300s"),b("300s")];var Z=["json","text"];j.request=function(J,_,k){return arguments.length===2&&typeof _=="function"&&(k=_,_=null),typeof k=="function"?j.requestWithCallback(J,_,k):new Promise(function(B,U){j.requestWithCallback(J,_,P(B,U))})},j.requestWithCallback=function(J,_,k){if(!J||typeof J!="string"&&(0,y.default)(J)!=="object"){var B=g.format("expect request url to be a string or a http request options, but got %j",J);throw new Error(B)}arguments.length===2&&typeof _=="function"&&(k=_,_=null),_=_||{},x>=R&&(x=0);var U=++x;_.requestUrls=_.requestUrls||[];var K={requestId:U,url:J,args:_,ctx:_.ctx};_.emitter&&_.emitter.emit("request",K),_.timeout=_.timeout||j.TIMEOUTS,_.maxRedirects=_.maxRedirects||10,_.streaming=_.streaming||_.customResponse;var G=Date.now(),F;typeof J=="string"?(I.test(J)||(J="https://"+J),F=w.parse(J)):F=J;var W=(_.type||_.method||F.method||"GET").toUpperCase(),X=F.port||80,re=f,oe=E(_.agent,j.agent),pe=_.fixJSONCtlChars;F.protocol==="https:"&&(re=v,oe=E(_.httpsAgent,j.httpsAgent),F.port||(X=443));var ie={host:F.hostname||F.host||"localhost",path:F.path||"/",method:W,port:X,agent:oe,headers:_.headers||{},lookup:_.lookup};Array.isArray(_.timeout)?ie.requestTimeout=_.timeout[_.timeout.length-1]:typeof _.timeout!="undefined"&&(ie.requestTimeout=_.timeout);var Ie=_.auth||F.auth;Ie&&(ie.auth=Ie);var ee=_.content||_.data,de=W==="GET"||W==="HEAD"||_.dataAsQueryString;if(!_.content&&ee&&!(typeof ee=="string"||c.isBuffer(ee)))if(de)ee=_.nestedQuerystring?qs.stringify(ee):querystring.stringify(ee);else{var me=ie.headers["Content-Type"]||ie.headers["content-type"];me||(_.contentType==="json"?me="application/json":me="application/x-www-form-urlencoded",ie.headers["Content-Type"]=me),C(me)==="application/json"?ee=JSON.stringify(ee):ee=_.nestedQuerystring?qs.stringify(ee):querystring.stringify(ee)}de&&ee&&(ie.path+=(F.query?"&":"?")+ee,ee=null);var xe=0;if(ee){var ce=ee.length;c.isBuffer(ee)||(ce=c.byteLength(ee)),xe=ie.headers["Content-Length"]=ce}_.dataType==="json"&&(ie.headers.Accept="application/json"),typeof _.beforeRequest=="function"&&_.beforeRequest(ie);var le=null,ge=null,Ce=null,De=!1,je=!1,fe=0,Y=-1,be=!1,q="",V="",Q=null;_.timing&&(Q={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function L(){le&&(clearTimeout(le),le=null)}function $(){ge&&(clearTimeout(ge),ge=null)}function S(We,Je,Re){if($(),!k){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),U,p.pid,ie.method,J),We&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),U,p.pid,We.name,We.message,We.stack);return}var Be=k;k=null;var _e={};Re&&(Y=Re.statusCode,_e=Re.headers);var Ve=Date.now()-G;Q&&(Q.contentDownload=Ve),m("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ve,fe,Y,ie.method,ie.host,ie.path,je,Q);var et={status:Y,statusCode:Y,headers:_e,size:fe,aborted:be,rt:Ve,keepAliveSocket:je,data:Je,requestUrls:_.requestUrls,timing:Q,remoteAddress:q,remotePort:V};if(We){var st="";oe&&typeof oe.getCurrentStatus=="function"&&(st=", agent status: "+JSON.stringify(oe.getCurrentStatus())),We.message+=", "+ie.method+" "+J+" "+Y+" (connected: "+De+", keepalive socket: "+je+st+`)
headers: `+JSON.stringify(_e),We.data=Je,We.path=ie.path,We.status=Y,We.headers=_e,We.res=et}Be(We,Je,_.streaming?Re:et),_.emitter&&(K.url=J,K.socket=Qe&&Qe.connection,K.options=ie,K.size=xe,_.emitter.emit("response",{requestId:U,error:We,ctx:_.ctx,req:K,res:et}))}function T(We){var Je=null;if(_.followRedirect&&statuses.redirect[We.statusCode]){_._followRedirectCount=(_._followRedirectCount||0)+1;var Re=We.headers.location;if(!Re)Je=new Error("Got statusCode "+We.statusCode+" but cannot resolve next location from headers"),Je.name="FollowRedirectError";else if(_._followRedirectCount>_.maxRedirects)Je=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+J),Je.name="MaxRedirectError";else{var Be=_.formatRedirectUrl?_.formatRedirectUrl(J,Re):w.resolve(J,Re);m("Request#%d %s: `redirected` from %s to %s",U,ie.path,J,Be),$(),_.headers&&_.headers.Host&&I.test(Re)&&(_.headers.Host=null);var _e=k;return k=null,j.requestWithCallback(Be,_,_e),{redirect:!0,error:null}}}return{redirect:!1,error:Je}}_.gzip&&!ie.headers["Accept-Encoding"]&&!ie.headers["accept-encoding"]&&(ie.headers["Accept-Encoding"]="gzip");function z(We,Je,Re){var Be=We.headers["content-encoding"];return Re(null,Je,Be)}var ne=_.writeStream;m("Request#%d %s %s with headers %j, options.path: %s",U,W,J,ie.headers,ie.path),_.requestUrls.push(J);function he(We){if(Q&&(Q.waiting=Date.now()-G),m("Request#%d %s `req response` event emit: status %d, headers: %j",U,J,We.statusCode,We.headers),_.streaming){var Je=T(We);if(Je.redirect){We.resume();return}return Je.error?(We.resume(),S(Je.error,null,We)):S(null,null,We)}if(We.on("close",function(){m("Request#%d %s: `res close` event emit, total size %d",U,J,fe)}),We.on("error",function(){m("Request#%d %s: `res error` event emit, total size %d",U,J,fe)}),We.on("aborted",function(){be=!0,m("Request#%d %s: `res aborted` event emit, total size %d",U,J,fe)}),ne){var Re=T(We);if(Re.redirect){We.resume();return}return Re.error?(We.resume(),ne.end(),S(Re.error,null,We)):(_.consumeWriteStream===!1?We.on("end",S.bind(null,null,null,We)):ne.on("close",function(){m("Request#%d %s: writeStream close event emitted",U,J),S(Ce||null,null,We)}),We.pipe(ne))}var Be=[];We.on("data",function(_e){m("Request#%d %s: `res data` event emit, size %d",U,J,_e.length),fe+=_e.length,Be.push(_e)}),We.on("end",function(){var _e=c.concat(Be,fe);if(m("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",U,J,fe,We._dumped),Ce)return S(Ce,_e,We);var Ve=T(We);if(Ve.error)return S(Ve.error,_e,We);Ve.redirect||z(We,_e,function(et,st,Et){if(et)return S(et,_e,We);if(!Et&&Z.indexOf(_.dataType)>=0){try{st=decodeBodyByCharset(st,We)}catch(kt){return m("decodeBodyByCharset error: %s",kt),S(null,st,We)}if(_.dataType==="json")if(fe===0)st=null;else{var Ct=parseJSON(st,pe);Ct.error?et=Ct.error:st=Ct.data}}be&&m("Request#%d %s: Remote socket was terminated before `response.end()` was called",U,J),S(et,st,We)})})}var Pe,Oe;Array.isArray(_.timeout)?(Pe=b(_.timeout[0]),Oe=b(_.timeout[1])):Pe=Oe=b(_.timeout),m("ConnectTimeout: %d, ResponseTimeout: %d",Pe,Oe);function Ue(){m("Connect timer ticking, timeout: %d",Pe),le=setTimeout(function(){le=null,Y===-1&&(Y=-2);var We="Connect timeout for "+Pe+"ms",Je="ConnectionTimeoutError";Qe.socket||(Je="SocketAssignTimeoutError",We+=", working sockets is full"),Ce=new Error(We),Ce.name=Je,Ce.requestId=U,m("ConnectTimeout: Request#%d %s %s: %s, connected: %s",U,J,Ce.name,We,De),rt()},Pe)}function nt(){m("Response timer ticking, timeout: %d",Oe),ge=setTimeout(function(){ge=null;var We="Response timeout for "+Oe+"ms",Je="ResponseTimeoutError";Ce=new Error(We),Ce.name=Je,Ce.requestId=U,m("ResponseTimeout: Request#%d %s %s: %s, connected: %s",U,J,Ce.name,We,De),rt()},Oe)}var Qe;ie.mode=_.mode?_.mode:"";try{Qe=re.request(ie,he)}catch(We){return S(We)}typeof window=="undefined"?Ue():Qe.on("requestTimeout",function(){Y===-1&&(Y=-2);var We="Connect timeout for "+Pe+"ms",Je="ConnectionTimeoutError";Ce=new Error(We),Ce.name=Je,Ce.requestId=U,rt()});function rt(){m("Request#%d %s abort, connected: %s",U,J,De),Qe.socket||(Ce.noSocket=!0,S(Ce)),Qe.abort()}return Q&&Qe.on("finish",function(){Q.requestSent=Date.now()-G}),Qe.once("socket",function(We){Q&&(Q.queuing=Date.now()-G);var Je=We.readyState;if(Je==="opening"){We.once("lookup",function(Re,Be,_e){m("Request#%d %s lookup: %s, %s, %s",U,J,Re,Be,_e),Q&&(Q.dnslookup=Date.now()-G),Be&&(q=Be)}),We.once("connect",function(){Q&&(Q.connected=Date.now()-G),L(),nt(),m("Request#%d %s new socket connected",U,J),De=!0,q||(q=We.remoteAddress),V=We.remotePort});return}m("Request#%d %s reuse socket connected, readyState: %s",U,J,Je),De=!0,je=!0,q||(q=We.remoteAddress),V=We.remotePort,L(),nt()}),Qe.on("error",function(We){(We.name==="Error"||We.name==="TypeError")&&(We.name=De?"ResponseError":"RequestError"),We.message+=' (req "error")',m("Request#%d %s `req error` event emit, %s: %s",U,J,We.name,We.message),S(Ce||We)}),ne&&ne.once("error",function(We){We.message+=' (writeStream "error")',Ce=We,m("Request#%d %s `writeStream error` event emit, %s: %s",U,J,We.name,We.message),rt()}),_.stream?(_.stream.pipe(Qe),_.stream.once("error",function(We){We.message+=' (stream "error")',Ce=We,m("Request#%d %s `readStream error` event emit, %s: %s",U,J,We.name,We.message),rt()})):Qe.end(ee),Qe.requestId=U,Qe}}).call(this)}).call(this,a("_process"),a("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},36785:function(Zt,ut,Se){"use strict";Se.d(ut,{o2:function(){return j},yT:function(){return p}});var Ae=Se(19127),Ye=Se(33166);const a=Ye.i.map(c=>`${c}-inverse`),N=["success","processing","error","default","warning"];function j(c){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,Ae.Z)(a),(0,Ae.Z)(Ye.i)).includes(c):Ye.i.includes(c)}function p(c){return N.includes(c)}},56762:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return Ye}});var Ae=Se(59301);function Ye(){const[,a]=Ae.useReducer(N=>N+1,0);return a}},79676:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return p}});var Ae=Se(19447);function Ye(c,h,y,g){if(g===!1)return{adjustX:!1,adjustY:!1};const w=g&&typeof g=="object"?g:{},f={};switch(c){case"top":case"bottom":f.shiftX=h.dropdownArrowOffset*2+y;break;case"left":case"right":f.shiftY=h.dropdownArrowOffsetVertical*2+y;break}const v=Object.assign(Object.assign({},f),w);return v.shiftX||(v.adjustX=!0),v.shiftY||(v.adjustY=!0),v}const a={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},N={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},j=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function p(c){const{arrowWidth:h,autoAdjustOverflow:y,arrowPointAtCenter:g,offset:w,borderRadius:f,visibleFirst:v}=c,m=h/2,b={};return Object.keys(a).forEach(x=>{const R=g&&N[x]||a[x],I=Object.assign(Object.assign({},R),{offset:[0,0]});switch(b[x]=I,j.has(x)&&(I.autoArrow=!1),x){case"top":case"topLeft":case"topRight":I.offset[1]=-m-w;break;case"bottom":case"bottomLeft":case"bottomRight":I.offset[1]=m+w;break;case"left":case"leftTop":case"leftBottom":I.offset[0]=-m-w;break;case"right":case"rightTop":case"rightBottom":I.offset[0]=m+w;break}const E=(0,Ae.fS)({contentRadius:f,limitVerticalRadius:!0});if(g)switch(x){case"topLeft":case"bottomLeft":I.offset[0]=-E.dropdownArrowOffset-m;break;case"topRight":case"bottomRight":I.offset[0]=E.dropdownArrowOffset+m;break;case"leftTop":case"rightTop":I.offset[1]=-E.dropdownArrowOffset-m;break;case"leftBottom":case"rightBottom":I.offset[1]=E.dropdownArrowOffset+m;break}I.overflow=Ye(x,E,h,y),v&&(I.htmlRegion="visibleFirst")}),b}},8628:function(Zt,ut,Se){"use strict";var Ae=Se(59301),Ye=Se(34280),a=Se(56762),N=Se(69507);function j(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const c=(0,Ae.useRef)({}),h=(0,a.Z)(),y=(0,N.ZP)();return(0,Ye.Z)(()=>{const g=y.subscribe(w=>{c.current=w,p&&h()});return()=>y.unsubscribe(g)},[]),c.current}ut.Z=j},93948:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return Je}});var Ae=Se(59301),Ye=Se(29679),a=Se(40001),N=Se(19248),j=Se(99267),p=Se(92310),c=Se.n(p),h=Se(2738),y=Se(36355),g=Se(96663),w=Se(44127),f=Se(6620),v={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},m=function(){var Be=(0,Ae.useRef)([]),_e=(0,Ae.useRef)(null);return(0,Ae.useEffect)(function(){var Ve=Date.now(),et=!1;Be.current.forEach(function(st){if(st){et=!0;var Et=st.style;Et.transitionDuration=".3s, .3s, .3s, .06s",_e.current&&Ve-_e.current<100&&(Et.transitionDuration="0s, 0s")}}),et&&(_e.current=Date.now())}),Be.current},b=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],x=function(Be){var _e=(0,w.Z)((0,w.Z)({},v),Be),Ve=_e.className,et=_e.percent,st=_e.prefixCls,Et=_e.strokeColor,Ct=_e.strokeLinecap,kt=_e.strokeWidth,Pt=_e.style,_t=_e.trailColor,Ot=_e.trailWidth,Ht=_e.transition,Ft=(0,f.Z)(_e,b);delete Ft.gapPosition;var Qt=Array.isArray(et)?et:[et],Dt=Array.isArray(Et)?Et:[Et],zt=m(),Mt=kt/2,Jt=100-kt/2,jt="M ".concat(Ct==="round"?Mt:0,",").concat(Mt,`
L `).concat(Ct==="round"?Jt:100,",").concat(Mt),Ke="0 0 100 ".concat(kt),br=0;return Ae.createElement("svg",(0,g.Z)({className:c()("".concat(st,"-line"),Ve),viewBox:Ke,preserveAspectRatio:"none",style:Pt},Ft),Ae.createElement("path",{className:"".concat(st,"-line-trail"),d:jt,strokeLinecap:Ct,stroke:_t,strokeWidth:Ot||kt,fillOpacity:"0"}),Qt.map(function(Xt,Yr){var Or=1;switch(Ct){case"round":Or=1-kt/100;break;case"square":Or=1-kt/2/100;break;default:Or=1;break}var fn={strokeDasharray:"".concat(Xt*Or,"px, 100px"),strokeDashoffset:"-".concat(br,"px"),transition:Ht||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},kr=Dt[Yr]||Dt[Dt.length-1];return br+=Xt,Ae.createElement("path",{key:Yr,className:"".concat(st,"-line-path"),d:jt,strokeLinecap:Ct,stroke:kr,strokeWidth:kt,fillOpacity:"0",ref:function(gr){zt[Yr]=gr},style:fn})}))},R=x,I=Se(20135),E=Se(72071),C=Se(47273),P=0,Z=(0,C.Z)();function M(){var Re;return Z?(Re=P,P+=1):Re="TEST_OR_SSR",Re}var J=function(Re){var Be=Ae.useState(),_e=(0,E.Z)(Be,2),Ve=_e[0],et=_e[1];return Ae.useEffect(function(){et("rc_progress_".concat(M()))},[]),Re||Ve},_=function(Be){var _e=Be.bg,Ve=Be.children;return Ae.createElement("div",{style:{width:"100%",height:"100%",background:_e}},Ve)};function k(Re,Be){return Object.keys(Re).map(function(_e){var Ve=parseFloat(_e),et="".concat(Math.floor(Ve*Be),"%");return"".concat(Re[_e]," ").concat(et)})}var B=Ae.forwardRef(function(Re,Be){var _e=Re.prefixCls,Ve=Re.color,et=Re.gradientId,st=Re.radius,Et=Re.style,Ct=Re.ptg,kt=Re.strokeLinecap,Pt=Re.strokeWidth,_t=Re.size,Ot=Re.gapDegree,Ht=Ve&&(0,I.Z)(Ve)==="object",Ft=Ht?"#FFF":void 0,Qt=_t/2,Dt=Ae.createElement("circle",{className:"".concat(_e,"-circle-path"),r:st,cx:Qt,cy:Qt,stroke:Ft,strokeLinecap:kt,strokeWidth:Pt,opacity:Ct===0?0:1,style:Et,ref:Be});if(!Ht)return Dt;var zt="".concat(et,"-conic"),Mt=Ot?"".concat(180+Ot/2,"deg"):"0deg",Jt=k(Ve,(360-Ot)/360),jt=k(Ve,1),Ke="conic-gradient(from ".concat(Mt,", ").concat(Jt.join(", "),")"),br="linear-gradient(to ".concat(Ot?"bottom":"top",", ").concat(jt.join(", "),")");return Ae.createElement(Ae.Fragment,null,Ae.createElement("mask",{id:zt},Dt),Ae.createElement("foreignObject",{x:0,y:0,width:_t,height:_t,mask:"url(#".concat(zt,")")},Ae.createElement(_,{bg:br},Ae.createElement(_,{bg:Ke}))))}),U=B,K=100,G=function(Be,_e,Ve,et,st,Et,Ct,kt,Pt,_t){var Ot=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Ht=Ve/100*360*((360-Et)/360),Ft=Et===0?0:{bottom:0,top:180,left:90,right:-90}[Ct],Qt=(100-et)/100*_e;Pt==="round"&&et!==100&&(Qt+=_t/2,Qt>=_e&&(Qt=_e-.01));var Dt=K/2;return{stroke:typeof kt=="string"?kt:void 0,strokeDasharray:"".concat(_e,"px ").concat(Be),strokeDashoffset:Qt+Ot,transform:"rotate(".concat(st+Ht+Ft,"deg)"),transformOrigin:"".concat(Dt,"px ").concat(Dt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},F=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function W(Re){var Be=Re!=null?Re:[];return Array.isArray(Be)?Be:[Be]}var X=function(Be){var _e=(0,w.Z)((0,w.Z)({},v),Be),Ve=_e.id,et=_e.prefixCls,st=_e.steps,Et=_e.strokeWidth,Ct=_e.trailWidth,kt=_e.gapDegree,Pt=kt===void 0?0:kt,_t=_e.gapPosition,Ot=_e.trailColor,Ht=_e.strokeLinecap,Ft=_e.style,Qt=_e.className,Dt=_e.strokeColor,zt=_e.percent,Mt=(0,f.Z)(_e,F),Jt=K/2,jt=J(Ve),Ke="".concat(jt,"-gradient"),br=Jt-Et/2,Xt=Math.PI*2*br,Yr=Pt>0?90+Pt/2:-90,Or=Xt*((360-Pt)/360),fn=(0,I.Z)(st)==="object"?st:{count:st,space:2},kr=fn.count,Tr=fn.space,gr=W(zt),wr=W(Dt),rr=wr.find(function(bn){return bn&&(0,I.Z)(bn)==="object"}),Wr=rr&&(0,I.Z)(rr)==="object",qt=Wr?"butt":Ht,$r=G(Xt,Or,0,100,Yr,Pt,_t,Ot,qt,Et),Tn=m(),Wn=function(){var yr=0;return gr.map(function(ze,tn){var dn=wr[tn]||wr[wr.length-1],mn=G(Xt,Or,yr,ze,Yr,Pt,_t,dn,qt,Et);return yr+=ze,Ae.createElement(U,{key:tn,color:dn,ptg:ze,radius:br,prefixCls:et,gradientId:Ke,style:mn,strokeLinecap:qt,strokeWidth:Et,gapDegree:Pt,ref:function(it){Tn[tn]=it},size:K})}).reverse()},Nn=function(){var yr=Math.round(kr*(gr[0]/100)),ze=100/kr,tn=0;return new Array(kr).fill(null).map(function(dn,mn){var He=mn<=yr-1?wr[0]:Ot,it=He&&(0,I.Z)(He)==="object"?"url(#".concat(Ke,")"):void 0,$e=G(Xt,Or,tn,ze,Yr,Pt,_t,He,"butt",Et,Tr);return tn+=(Or-$e.strokeDashoffset+Tr)*100/Or,Ae.createElement("circle",{key:mn,className:"".concat(et,"-circle-path"),r:br,cx:Jt,cy:Jt,stroke:it,strokeWidth:Et,opacity:1,style:$e,ref:function(yt){Tn[mn]=yt}})})};return Ae.createElement("svg",(0,g.Z)({className:c()("".concat(et,"-circle"),Qt),viewBox:"0 0 ".concat(K," ").concat(K),style:Ft,id:Ve,role:"presentation"},Mt),!kr&&Ae.createElement("circle",{className:"".concat(et,"-circle-trail"),r:br,cx:Jt,cy:Jt,stroke:Ot,strokeLinecap:qt,strokeWidth:Ct||Et,style:$r}),kr?Nn():Wn())},re=X,oe={Line:R,Circle:re},pe=Se(6848),ie=Se(93398);function Ie(Re){return!Re||Re<0?0:Re>100?100:Re}function ee(Re){let{success:Be,successPercent:_e}=Re,Ve=_e;return Be&&"progress"in Be&&(Ve=Be.progress),Be&&"percent"in Be&&(Ve=Be.percent),Ve}const de=Re=>{let{percent:Be,success:_e,successPercent:Ve}=Re;const et=Ie(ee({success:_e,successPercent:Ve}));return[et,Ie(Ie(Be)-et)]},me=Re=>{let{success:Be={},strokeColor:_e}=Re;const{strokeColor:Ve}=Be;return[Ve||ie.presetPrimaryColors.green,_e||null]},xe=(Re,Be,_e)=>{var Ve,et,st,Et;let Ct=-1,kt=-1;if(Be==="step"){const Pt=_e.steps,_t=_e.strokeWidth;typeof Re=="string"||typeof Re=="undefined"?(Ct=Re==="small"?2:14,kt=_t!=null?_t:8):typeof Re=="number"?[Ct,kt]=[Re,Re]:[Ct=14,kt=8]=Re,Ct*=Pt}else if(Be==="line"){const Pt=_e==null?void 0:_e.strokeWidth;typeof Re=="string"||typeof Re=="undefined"?kt=Pt||(Re==="small"?6:8):typeof Re=="number"?[Ct,kt]=[Re,Re]:[Ct=-1,kt=8]=Re}else(Be==="circle"||Be==="dashboard")&&(typeof Re=="string"||typeof Re=="undefined"?[Ct,kt]=Re==="small"?[60,60]:[120,120]:typeof Re=="number"?[Ct,kt]=[Re,Re]:(Ct=(et=(Ve=Re[0])!==null&&Ve!==void 0?Ve:Re[1])!==null&&et!==void 0?et:120,kt=(Et=(st=Re[0])!==null&&st!==void 0?st:Re[1])!==null&&Et!==void 0?Et:120));return[Ct,kt]},ce=3,le=Re=>ce/Re*100;var Ce=Re=>{const{prefixCls:Be,trailColor:_e=null,strokeLinecap:Ve="round",gapPosition:et,gapDegree:st,width:Et=120,type:Ct,children:kt,success:Pt,size:_t=Et}=Re,[Ot,Ht]=xe(_t,"circle");let{strokeWidth:Ft}=Re;Ft===void 0&&(Ft=Math.max(le(Ot),6));const Qt={width:Ot,height:Ht,fontSize:Ot*.15+6},Dt=Ae.useMemo(()=>{if(st||st===0)return st;if(Ct==="dashboard")return 75},[st,Ct]),zt=et||Ct==="dashboard"&&"bottom"||void 0,Mt=Object.prototype.toString.call(Re.strokeColor)==="[object Object]",Jt=me({success:Pt,strokeColor:Re.strokeColor}),jt=c()(`${Be}-inner`,{[`${Be}-circle-gradient`]:Mt}),Ke=Ae.createElement(re,{percent:de(Re),strokeWidth:Ft,trailWidth:Ft,strokeColor:Jt,strokeLinecap:Ve,trailColor:_e,prefixCls:Be,gapDegree:Dt,gapPosition:zt});return Ae.createElement("div",{className:jt,style:Qt},Ot<=20?Ae.createElement(pe.Z,{title:kt},Ae.createElement("span",null,Ke)):Ae.createElement(Ae.Fragment,null,Ke,kt))},De=function(Re,Be){var _e={};for(var Ve in Re)Object.prototype.hasOwnProperty.call(Re,Ve)&&Be.indexOf(Ve)<0&&(_e[Ve]=Re[Ve]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Ve=Object.getOwnPropertySymbols(Re);et<Ve.length;et++)Be.indexOf(Ve[et])<0&&Object.prototype.propertyIsEnumerable.call(Re,Ve[et])&&(_e[Ve[et]]=Re[Ve[et]]);return _e};const je=Re=>{let Be=[];return Object.keys(Re).forEach(_e=>{const Ve=parseFloat(_e.replace(/%/g,""));isNaN(Ve)||Be.push({key:Ve,value:Re[_e]})}),Be=Be.sort((_e,Ve)=>_e.key-Ve.key),Be.map(_e=>{let{key:Ve,value:et}=_e;return`${et} ${Ve}%`}).join(", ")},fe=(Re,Be)=>{const{from:_e=ie.presetPrimaryColors.blue,to:Ve=ie.presetPrimaryColors.blue,direction:et=Be==="rtl"?"to left":"to right"}=Re,st=De(Re,["from","to","direction"]);if(Object.keys(st).length!==0){const Et=je(st);return{backgroundImage:`linear-gradient(${et}, ${Et})`}}return{backgroundImage:`linear-gradient(${et}, ${_e}, ${Ve})`}};var be=Re=>{const{prefixCls:Be,direction:_e,percent:Ve,size:et,strokeWidth:st,strokeColor:Et,strokeLinecap:Ct="round",children:kt,trailColor:Pt=null,success:_t}=Re,Ot=Et&&typeof Et!="string"?fe(Et,_e):{backgroundColor:Et},Ht=Ct==="square"||Ct==="butt"?0:void 0,Ft={backgroundColor:Pt||void 0,borderRadius:Ht},Qt=et!=null?et:[-1,st||(et==="small"?6:8)],[Dt,zt]=xe(Qt,"line",{strokeWidth:st}),Mt=Object.assign({width:`${Ie(Ve)}%`,height:zt,borderRadius:Ht},Ot),Jt=ee(Re),jt={width:`${Ie(Jt)}%`,height:zt,borderRadius:Ht,backgroundColor:_t==null?void 0:_t.strokeColor},Ke={width:Dt<0?"100%":Dt,height:zt};return Ae.createElement(Ae.Fragment,null,Ae.createElement("div",{className:`${Be}-outer`,style:Ke},Ae.createElement("div",{className:`${Be}-inner`,style:Ft},Ae.createElement("div",{className:`${Be}-bg`,style:Mt}),Jt!==void 0?Ae.createElement("div",{className:`${Be}-success-bg`,style:jt}):null)),kt)},V=Re=>{const{size:Be,steps:_e,percent:Ve=0,strokeWidth:et=8,strokeColor:st,trailColor:Et=null,prefixCls:Ct,children:kt}=Re,Pt=Math.round(_e*(Ve/100)),_t=Be==="small"?2:14,Ot=Be!=null?Be:[_t,et],[Ht,Ft]=xe(Ot,"step",{steps:_e,strokeWidth:et}),Qt=Ht/_e,Dt=new Array(_e);for(let zt=0;zt<_e;zt++){const Mt=Array.isArray(st)?st[zt]:st;Dt[zt]=Ae.createElement("div",{key:zt,className:c()(`${Ct}-steps-item`,{[`${Ct}-steps-item-active`]:zt<=Pt-1}),style:{backgroundColor:zt<=Pt-1?Mt:Et,width:Qt,height:Ft}})}return Ae.createElement("div",{className:`${Ct}-steps-outer`},Dt,kt)},Q=Se(93083),L=Se(17313),$=Se(83116),S=Se(37613);const T=Re=>{const Be=Re?"100%":"-100%";return new Q.Keyframes(`antProgress${Re?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Be}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Be}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},z=Re=>{const{componentCls:Be,iconCls:_e}=Re;return{[Be]:Object.assign(Object.assign({},(0,L.Wf)(Re)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:Re.fontSize,marginInlineEnd:Re.marginXS,marginBottom:Re.marginXS},[`${Be}-outer`]:{display:"inline-block",width:"100%"},[`&${Be}-show-info`]:{[`${Be}-outer`]:{marginInlineEnd:`calc(-2em - ${Re.marginXS}px)`,paddingInlineEnd:`calc(2em + ${Re.paddingXS}px)`}},[`${Be}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:Re.remainingColor,borderRadius:Re.lineBorderRadius},[`${Be}-inner:not(${Be}-circle-gradient)`]:{[`${Be}-circle-path`]:{stroke:Re.defaultColor}},[`${Be}-success-bg, ${Be}-bg`]:{position:"relative",backgroundColor:Re.defaultColor,borderRadius:Re.lineBorderRadius,transition:`all ${Re.motionDurationSlow} ${Re.motionEaseInOutCirc}`},[`${Be}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:Re.colorSuccess},[`${Be}-text`]:{display:"inline-block",width:"2em",marginInlineStart:Re.marginXS,color:Re.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[_e]:{fontSize:Re.fontSize}},[`&${Be}-status-active`]:{[`${Be}-bg::before`]:{position:"absolute",inset:0,backgroundColor:Re.colorBgContainer,borderRadius:Re.lineBorderRadius,opacity:0,animationName:T(),animationDuration:Re.progressActiveMotionDuration,animationTimingFunction:Re.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Be}-rtl${Be}-status-active`]:{[`${Be}-bg::before`]:{animationName:T(!0)}},[`&${Be}-status-exception`]:{[`${Be}-bg`]:{backgroundColor:Re.colorError},[`${Be}-text`]:{color:Re.colorError}},[`&${Be}-status-exception ${Be}-inner:not(${Be}-circle-gradient)`]:{[`${Be}-circle-path`]:{stroke:Re.colorError}},[`&${Be}-status-success`]:{[`${Be}-bg`]:{backgroundColor:Re.colorSuccess},[`${Be}-text`]:{color:Re.colorSuccess}},[`&${Be}-status-success ${Be}-inner:not(${Be}-circle-gradient)`]:{[`${Be}-circle-path`]:{stroke:Re.colorSuccess}}})}},ne=Re=>{const{componentCls:Be,iconCls:_e}=Re;return{[Be]:{[`${Be}-circle-trail`]:{stroke:Re.remainingColor},[`&${Be}-circle ${Be}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Be}-circle ${Be}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:Re.circleTextColor,fontSize:Re.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[_e]:{fontSize:`${Re.fontSize/Re.fontSizeSM}em`}},[`${Be}-circle&-status-exception`]:{[`${Be}-text`]:{color:Re.colorError}},[`${Be}-circle&-status-success`]:{[`${Be}-text`]:{color:Re.colorSuccess}}},[`${Be}-inline-circle`]:{lineHeight:1,[`${Be}-inner`]:{verticalAlign:"bottom"}}}},he=Re=>{const{componentCls:Be}=Re;return{[Be]:{[`${Be}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:Re.progressStepMinWidth,marginInlineEnd:Re.progressStepMarginInlineEnd,backgroundColor:Re.remainingColor,transition:`all ${Re.motionDurationSlow}`,"&-active":{backgroundColor:Re.defaultColor}}}}}},Pe=Re=>{const{componentCls:Be,iconCls:_e}=Re;return{[Be]:{[`${Be}-small&-line, ${Be}-small&-line ${Be}-text ${_e}`]:{fontSize:Re.fontSizeSM}}}};var Oe=(0,$.Z)("Progress",Re=>{const Be=Re.marginXXS/2,_e=(0,S.TS)(Re,{progressStepMarginInlineEnd:Be,progressStepMinWidth:Be,progressActiveMotionDuration:"2.4s"});return[z(_e),ne(_e),he(_e),Pe(_e)]},Re=>({circleTextColor:Re.colorText,defaultColor:Re.colorInfo,remainingColor:Re.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),Ue=function(Re,Be){var _e={};for(var Ve in Re)Object.prototype.hasOwnProperty.call(Re,Ve)&&Be.indexOf(Ve)<0&&(_e[Ve]=Re[Ve]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Ve=Object.getOwnPropertySymbols(Re);et<Ve.length;et++)Be.indexOf(Ve[et])<0&&Object.prototype.propertyIsEnumerable.call(Re,Ve[et])&&(_e[Ve[et]]=Re[Ve[et]]);return _e};const nt=null,Qe=["normal","exception","active","success"];var We=Ae.forwardRef((Re,Be)=>{const{prefixCls:_e,className:Ve,rootClassName:et,steps:st,strokeColor:Et,percent:Ct=0,size:kt="default",showInfo:Pt=!0,type:_t="line",status:Ot,format:Ht,style:Ft}=Re,Qt=Ue(Re,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),Dt=Ae.useMemo(()=>{var gr,wr;const rr=ee(Re);return parseInt(rr!==void 0?(gr=rr!=null?rr:0)===null||gr===void 0?void 0:gr.toString():(wr=Ct!=null?Ct:0)===null||wr===void 0?void 0:wr.toString(),10)},[Ct,Re.success,Re.successPercent]),zt=Ae.useMemo(()=>!Qe.includes(Ot)&&Dt>=100?"success":Ot||"normal",[Ot,Dt]),{getPrefixCls:Mt,direction:Jt,progress:jt}=Ae.useContext(y.E_),Ke=Mt("progress",_e),[br,Xt]=Oe(Ke),Yr=Ae.useMemo(()=>{if(!Pt)return null;const gr=ee(Re);let wr;const rr=Ht||(qt=>`${qt}%`),Wr=_t==="line";return Ht||zt!=="exception"&&zt!=="success"?wr=rr(Ie(Ct),Ie(gr)):zt==="exception"?wr=Wr?Ae.createElement(N.Z,null):Ae.createElement(j.Z,null):zt==="success"&&(wr=Wr?Ae.createElement(Ye.Z,null):Ae.createElement(a.Z,null)),Ae.createElement("span",{className:`${Ke}-text`,title:typeof wr=="string"?wr:void 0},wr)},[Pt,Ct,Dt,zt,_t,Ke,Ht]),Or=Array.isArray(Et)?Et[0]:Et,fn=typeof Et=="string"||Array.isArray(Et)?Et:void 0;let kr;_t==="line"?kr=st?Ae.createElement(V,Object.assign({},Re,{strokeColor:fn,prefixCls:Ke,steps:st}),Yr):Ae.createElement(be,Object.assign({},Re,{strokeColor:Or,prefixCls:Ke,direction:Jt}),Yr):(_t==="circle"||_t==="dashboard")&&(kr=Ae.createElement(Ce,Object.assign({},Re,{strokeColor:Or,prefixCls:Ke,progressStatus:zt}),Yr));const Tr=c()(Ke,`${Ke}-status-${zt}`,`${Ke}-${_t==="dashboard"&&"circle"||st&&"steps"||_t}`,{[`${Ke}-inline-circle`]:_t==="circle"&&xe(kt,"circle")[0]<=20,[`${Ke}-show-info`]:Pt,[`${Ke}-${kt}`]:typeof kt=="string",[`${Ke}-rtl`]:Jt==="rtl"},jt==null?void 0:jt.className,Ve,et,Xt);return br(Ae.createElement("div",Object.assign({ref:Be,style:Object.assign(Object.assign({},jt==null?void 0:jt.style),Ft),className:Tr,role:"progressbar","aria-valuenow":Dt},(0,h.Z)(Qt,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),kr))}),Je=We},61621:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return Q}});var Ae=Se(92310),Ye=Se.n(Ae),a=Se(59301),N=Se(36355),j=Se(2738),c=L=>{const{prefixCls:$,className:S,style:T,size:z,shape:ne}=L,he=Ye()({[`${$}-lg`]:z==="large",[`${$}-sm`]:z==="small"}),Pe=Ye()({[`${$}-circle`]:ne==="circle",[`${$}-square`]:ne==="square",[`${$}-round`]:ne==="round"}),Oe=a.useMemo(()=>typeof z=="number"?{width:z,height:z,lineHeight:`${z}px`}:{},[z]);return a.createElement("span",{className:Ye()($,he,Pe,S),style:Object.assign(Object.assign({},Oe),T)})},h=Se(93083),y=Se(83116),g=Se(37613);const w=new h.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),f=L=>({height:L,lineHeight:`${L}px`}),v=L=>Object.assign({width:L},f(L)),m=L=>({background:L.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:w,animationDuration:L.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),b=L=>Object.assign({width:L*5,minWidth:L*5},f(L)),x=L=>{const{skeletonAvatarCls:$,gradientFromColor:S,controlHeight:T,controlHeightLG:z,controlHeightSM:ne}=L;return{[`${$}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:S},v(T)),[`${$}${$}-circle`]:{borderRadius:"50%"},[`${$}${$}-lg`]:Object.assign({},v(z)),[`${$}${$}-sm`]:Object.assign({},v(ne))}},R=L=>{const{controlHeight:$,borderRadiusSM:S,skeletonInputCls:T,controlHeightLG:z,controlHeightSM:ne,gradientFromColor:he}=L;return{[`${T}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:he,borderRadius:S},b($)),[`${T}-lg`]:Object.assign({},b(z)),[`${T}-sm`]:Object.assign({},b(ne))}},I=L=>Object.assign({width:L},f(L)),E=L=>{const{skeletonImageCls:$,imageSizeBase:S,gradientFromColor:T,borderRadiusSM:z}=L;return{[`${$}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:T,borderRadius:z},I(S*2)),{[`${$}-path`]:{fill:"#bfbfbf"},[`${$}-svg`]:Object.assign(Object.assign({},I(S)),{maxWidth:S*4,maxHeight:S*4}),[`${$}-svg${$}-svg-circle`]:{borderRadius:"50%"}}),[`${$}${$}-circle`]:{borderRadius:"50%"}}},C=(L,$,S)=>{const{skeletonButtonCls:T}=L;return{[`${S}${T}-circle`]:{width:$,minWidth:$,borderRadius:"50%"},[`${S}${T}-round`]:{borderRadius:$}}},P=L=>Object.assign({width:L*2,minWidth:L*2},f(L)),Z=L=>{const{borderRadiusSM:$,skeletonButtonCls:S,controlHeight:T,controlHeightLG:z,controlHeightSM:ne,gradientFromColor:he}=L;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${S}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:he,borderRadius:$,width:T*2,minWidth:T*2},P(T))},C(L,T,S)),{[`${S}-lg`]:Object.assign({},P(z))}),C(L,z,`${S}-lg`)),{[`${S}-sm`]:Object.assign({},P(ne))}),C(L,ne,`${S}-sm`))},M=L=>{const{componentCls:$,skeletonAvatarCls:S,skeletonTitleCls:T,skeletonParagraphCls:z,skeletonButtonCls:ne,skeletonInputCls:he,skeletonImageCls:Pe,controlHeight:Oe,controlHeightLG:Ue,controlHeightSM:nt,gradientFromColor:Qe,padding:rt,marginSM:We,borderRadius:Je,titleHeight:Re,blockRadius:Be,paragraphLiHeight:_e,controlHeightXS:Ve,paragraphMarginTop:et}=L;return{[`${$}`]:{display:"table",width:"100%",[`${$}-header`]:{display:"table-cell",paddingInlineEnd:rt,verticalAlign:"top",[`${S}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Qe},v(Oe)),[`${S}-circle`]:{borderRadius:"50%"},[`${S}-lg`]:Object.assign({},v(Ue)),[`${S}-sm`]:Object.assign({},v(nt))},[`${$}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${T}`]:{width:"100%",height:Re,background:Qe,borderRadius:Be,[`+ ${z}`]:{marginBlockStart:nt}},[`${z}`]:{padding:0,"> li":{width:"100%",height:_e,listStyle:"none",background:Qe,borderRadius:Be,"+ li":{marginBlockStart:Ve}}},[`${z}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${$}-content`]:{[`${T}, ${z} > li`]:{borderRadius:Je}}},[`${$}-with-avatar ${$}-content`]:{[`${T}`]:{marginBlockStart:We,[`+ ${z}`]:{marginBlockStart:et}}},[`${$}${$}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Z(L)),x(L)),R(L)),E(L)),[`${$}${$}-block`]:{width:"100%",[`${ne}`]:{width:"100%"},[`${he}`]:{width:"100%"}},[`${$}${$}-active`]:{[`
${T},
${z} > li,
${S},
${ne},
${he},
${Pe}
`]:Object.assign({},m(L))}}};var J=(0,y.Z)("Skeleton",L=>{const{componentCls:$}=L,S=(0,g.TS)(L,{skeletonAvatarCls:`${$}-avatar`,skeletonTitleCls:`${$}-title`,skeletonParagraphCls:`${$}-paragraph`,skeletonButtonCls:`${$}-button`,skeletonInputCls:`${$}-input`,skeletonImageCls:`${$}-image`,imageSizeBase:L.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${L.gradientFromColor} 25%, ${L.gradientToColor} 37%, ${L.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[M(S)]},L=>{const{colorFillContent:$,colorFill:S}=L,T=$,z=S;return{color:T,colorGradientEnd:z,gradientFromColor:T,gradientToColor:z,titleHeight:L.controlHeight/2,blockRadius:L.borderRadiusSM,paragraphMarginTop:L.marginLG+L.marginXXS,paragraphLiHeight:L.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),k=L=>{const{prefixCls:$,className:S,rootClassName:T,active:z,shape:ne="circle",size:he="default"}=L,{getPrefixCls:Pe}=a.useContext(N.E_),Oe=Pe("skeleton",$),[Ue,nt]=J(Oe),Qe=(0,j.Z)(L,["prefixCls","className"]),rt=Ye()(Oe,`${Oe}-element`,{[`${Oe}-active`]:z},S,T,nt);return Ue(a.createElement("div",{className:rt},a.createElement(c,Object.assign({prefixCls:`${Oe}-avatar`,shape:ne,size:he},Qe))))},U=L=>{const{prefixCls:$,className:S,rootClassName:T,active:z,block:ne=!1,size:he="default"}=L,{getPrefixCls:Pe}=a.useContext(N.E_),Oe=Pe("skeleton",$),[Ue,nt]=J(Oe),Qe=(0,j.Z)(L,["prefixCls"]),rt=Ye()(Oe,`${Oe}-element`,{[`${Oe}-active`]:z,[`${Oe}-block`]:ne},S,T,nt);return Ue(a.createElement("div",{className:rt},a.createElement(c,Object.assign({prefixCls:`${Oe}-button`,size:he},Qe))))};const K="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var F=L=>{const{prefixCls:$,className:S,rootClassName:T,style:z,active:ne}=L,{getPrefixCls:he}=a.useContext(N.E_),Pe=he("skeleton",$),[Oe,Ue]=J(Pe),nt=Ye()(Pe,`${Pe}-element`,{[`${Pe}-active`]:ne},S,T,Ue);return Oe(a.createElement("div",{className:nt},a.createElement("div",{className:Ye()(`${Pe}-image`,S),style:z},a.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Pe}-image-svg`},a.createElement("path",{d:K,className:`${Pe}-image-path`})))))},X=L=>{const{prefixCls:$,className:S,rootClassName:T,active:z,block:ne,size:he="default"}=L,{getPrefixCls:Pe}=a.useContext(N.E_),Oe=Pe("skeleton",$),[Ue,nt]=J(Oe),Qe=(0,j.Z)(L,["prefixCls"]),rt=Ye()(Oe,`${Oe}-element`,{[`${Oe}-active`]:z,[`${Oe}-block`]:ne},S,T,nt);return Ue(a.createElement("div",{className:rt},a.createElement(c,Object.assign({prefixCls:`${Oe}-input`,size:he},Qe))))},re=Se(96663),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},pe=oe,ie=Se(7657),Ie=function($,S){return a.createElement(ie.Z,(0,re.Z)({},$,{ref:S,icon:pe}))},ee=a.forwardRef(Ie),de=ee,xe=L=>{const{prefixCls:$,className:S,rootClassName:T,style:z,active:ne,children:he}=L,{getPrefixCls:Pe}=a.useContext(N.E_),Oe=Pe("skeleton",$),[Ue,nt]=J(Oe),Qe=Ye()(Oe,`${Oe}-element`,{[`${Oe}-active`]:ne},nt,S,T),rt=he!=null?he:a.createElement(de,null);return Ue(a.createElement("div",{className:Qe},a.createElement("div",{className:Ye()(`${Oe}-image`,S),style:z},rt)))},ce=Se(19127),ge=L=>{const $=Pe=>{const{width:Oe,rows:Ue=2}=L;if(Array.isArray(Oe))return Oe[Pe];if(Ue-1===Pe)return Oe},{prefixCls:S,className:T,style:z,rows:ne}=L,he=(0,ce.Z)(Array(ne)).map((Pe,Oe)=>a.createElement("li",{key:Oe,style:{width:$(Oe)}}));return a.createElement("ul",{className:Ye()(S,T),style:z},he)},De=L=>{let{prefixCls:$,className:S,width:T,style:z}=L;return a.createElement("h3",{className:Ye()($,S),style:Object.assign({width:T},z)})};function je(L){return L&&typeof L=="object"?L:{}}function fe(L,$){return L&&!$?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Y(L,$){return!L&&$?{width:"38%"}:L&&$?{width:"50%"}:{}}function be(L,$){const S={};return(!L||!$)&&(S.width="61%"),!L&&$?S.rows=3:S.rows=2,S}const q=L=>{const{prefixCls:$,loading:S,className:T,rootClassName:z,style:ne,children:he,avatar:Pe=!1,title:Oe=!0,paragraph:Ue=!0,active:nt,round:Qe}=L,{getPrefixCls:rt,direction:We,skeleton:Je}=a.useContext(N.E_),Re=rt("skeleton",$),[Be,_e]=J(Re);if(S||!("loading"in L)){const Ve=!!Pe,et=!!Oe,st=!!Ue;let Et;if(Ve){const Pt=Object.assign(Object.assign({prefixCls:`${Re}-avatar`},fe(et,st)),je(Pe));Et=a.createElement("div",{className:`${Re}-header`},a.createElement(c,Object.assign({},Pt)))}let Ct;if(et||st){let Pt;if(et){const Ot=Object.assign(Object.assign({prefixCls:`${Re}-title`},Y(Ve,st)),je(Oe));Pt=a.createElement(De,Object.assign({},Ot))}let _t;if(st){const Ot=Object.assign(Object.assign({prefixCls:`${Re}-paragraph`},be(Ve,et)),je(Ue));_t=a.createElement(ge,Object.assign({},Ot))}Ct=a.createElement("div",{className:`${Re}-content`},Pt,_t)}const kt=Ye()(Re,{[`${Re}-with-avatar`]:Ve,[`${Re}-active`]:nt,[`${Re}-rtl`]:We==="rtl",[`${Re}-round`]:Qe},Je==null?void 0:Je.className,T,z,_e);return Be(a.createElement("div",{className:kt,style:Object.assign(Object.assign({},Je==null?void 0:Je.style),ne)},Et,Ct))}return typeof he!="undefined"?he:null};q.Button=U,q.Avatar=k,q.Input=X,q.Image=F,q.Node=xe;var V=q,Q=V},31797:function(Zt,ut,Se){"use strict";Se.d(ut,{default:function(){return J}});var Ae=Se(59301),Ye=Se(56762),a=Se(92343),N=Se(92310),j=Se.n(N),p=Se(36355),c=Se(61621),y=_=>{const{value:k,formatter:B,precision:U,decimalSeparator:K,groupSeparator:G="",prefixCls:F}=_;let W;if(typeof B=="function")W=B(k);else{const X=String(k),re=X.match(/^(-?)(\d*)(\.(\d+))?$/);if(!re||X==="-")W=X;else{const oe=re[1];let pe=re[2]||"0",ie=re[4]||"";pe=pe.replace(/\B(?=(\d{3})+(?!\d))/g,G),typeof U=="number"&&(ie=ie.padEnd(U,"0").slice(0,U>0?U:0)),ie&&(ie=`${K}${ie}`),W=[Ae.createElement("span",{key:"int",className:`${F}-content-value-int`},oe,pe),ie&&Ae.createElement("span",{key:"decimal",className:`${F}-content-value-decimal`},ie)]}}return Ae.createElement("span",{className:`${F}-content-value`},W)},g=Se(17313),w=Se(83116),f=Se(37613);const v=_=>{const{componentCls:k,marginXXS:B,padding:U,colorTextDescription:K,titleFontSize:G,colorTextHeading:F,contentFontSize:W,fontFamily:X}=_;return{[`${k}`]:Object.assign(Object.assign({},(0,g.Wf)(_)),{[`${k}-title`]:{marginBottom:B,color:K,fontSize:G},[`${k}-skeleton`]:{paddingTop:U},[`${k}-content`]:{color:F,fontSize:W,fontFamily:X,[`${k}-content-value`]:{display:"inline-block",direction:"ltr"},[`${k}-content-prefix, ${k}-content-suffix`]:{display:"inline-block"},[`${k}-content-prefix`]:{marginInlineEnd:B},[`${k}-content-suffix`]:{marginInlineStart:B}}})}};var m=(0,w.Z)("Statistic",_=>{const k=(0,f.TS)(_,{});return[v(k)]},_=>{const{fontSizeHeading3:k,fontSize:B}=_;return{titleFontSize:B,contentFontSize:k}}),x=_=>{const{prefixCls:k,className:B,rootClassName:U,style:K,valueStyle:G,value:F=0,title:W,valueRender:X,prefix:re,suffix:oe,loading:pe=!1,onMouseEnter:ie,onMouseLeave:Ie,decimalSeparator:ee=".",groupSeparator:de=","}=_,{getPrefixCls:me,direction:xe,statistic:ce}=Ae.useContext(p.E_),le=me("statistic",k),[ge,Ce]=m(le),De=Ae.createElement(y,Object.assign({decimalSeparator:ee,groupSeparator:de,prefixCls:le},_,{value:F})),je=j()(le,{[`${le}-rtl`]:xe==="rtl"},ce==null?void 0:ce.className,B,U,Ce);return ge(Ae.createElement("div",{className:je,style:Object.assign(Object.assign({},ce==null?void 0:ce.style),K),onMouseEnter:ie,onMouseLeave:Ie},W&&Ae.createElement("div",{className:`${le}-title`},W),Ae.createElement(c.Z,{paragraph:!1,loading:pe,className:`${le}-skeleton`},Ae.createElement("div",{style:G,className:`${le}-content`},re&&Ae.createElement("span",{className:`${le}-content-prefix`},re),X?X(De):De,oe&&Ae.createElement("span",{className:`${le}-content-suffix`},oe)))))};const R=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function I(_,k){let B=_;const U=/\[[^\]]*]/g,K=(k.match(U)||[]).map(X=>X.slice(1,-1)),G=k.replace(U,"[]"),F=R.reduce((X,re)=>{let[oe,pe]=re;if(X.includes(oe)){const ie=Math.floor(B/pe);return B-=ie*pe,X.replace(new RegExp(`${oe}+`,"g"),Ie=>{const ee=Ie.length;return ie.toString().padStart(ee,"0")})}return X},G);let W=0;return F.replace(U,()=>{const X=K[W];return W+=1,X})}function E(_,k){const{format:B=""}=k,U=new Date(_).getTime(),K=Date.now(),G=Math.max(U-K,0);return I(G,B)}const C=1e3/30;function P(_){return new Date(_).getTime()}const Z=_=>{const{value:k,format:B="HH:mm:ss",onChange:U,onFinish:K}=_,G=(0,Ye.Z)(),F=Ae.useRef(null),W=()=>{K==null||K(),F.current&&(clearInterval(F.current),F.current=null)},X=()=>{const pe=P(k);pe>=Date.now()&&(F.current=setInterval(()=>{G(),U==null||U(pe-Date.now()),pe<Date.now()&&W()},C))};Ae.useEffect(()=>(X(),()=>{F.current&&(clearInterval(F.current),F.current=null)}),[k]);const re=(pe,ie)=>E(pe,Object.assign(Object.assign({},ie),{format:B})),oe=pe=>(0,a.Tm)(pe,{title:void 0});return Ae.createElement(x,Object.assign({},_,{valueRender:oe,formatter:re}))};var M=Ae.memo(Z);x.Countdown=M;var J=x},45413:function(Zt,ut,Se){"use strict";Se.d(ut,{default:function(){return $}});var Ae=Se(40001),Ye=Se(99267),a=Se(92310),N=Se.n(a),j=Se(96663),p=Se(44127),c=Se(90493),h=Se(6620),y=Se(59301),g=Se(10228),w=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function f(S){return typeof S=="string"}function v(S){var T,z=S.className,ne=S.prefixCls,he=S.style,Pe=S.active,Oe=S.status,Ue=S.iconPrefix,nt=S.icon,Qe=S.wrapperStyle,rt=S.stepNumber,We=S.disabled,Je=S.description,Re=S.title,Be=S.subTitle,_e=S.progressDot,Ve=S.stepIcon,et=S.tailContent,st=S.icons,Et=S.stepIndex,Ct=S.onStepClick,kt=S.onClick,Pt=S.render,_t=(0,h.Z)(S,w),Ot=!!Ct&&!We,Ht={};Ot&&(Ht.role="button",Ht.tabIndex=0,Ht.onClick=function(Jt){kt==null||kt(Jt),Ct(Et)},Ht.onKeyDown=function(Jt){var jt=Jt.which;(jt===g.Z.ENTER||jt===g.Z.SPACE)&&Ct(Et)});var Ft=function(){var jt,Ke,br=N()("".concat(ne,"-icon"),"".concat(Ue,"icon"),(jt={},(0,c.Z)(jt,"".concat(Ue,"icon-").concat(nt),nt&&f(nt)),(0,c.Z)(jt,"".concat(Ue,"icon-check"),!nt&&Oe==="finish"&&(st&&!st.finish||!st)),(0,c.Z)(jt,"".concat(Ue,"icon-cross"),!nt&&Oe==="error"&&(st&&!st.error||!st)),jt)),Xt=y.createElement("span",{className:"".concat(ne,"-icon-dot")});return _e?typeof _e=="function"?Ke=y.createElement("span",{className:"".concat(ne,"-icon")},_e(Xt,{index:rt-1,status:Oe,title:Re,description:Je})):Ke=y.createElement("span",{className:"".concat(ne,"-icon")},Xt):nt&&!f(nt)?Ke=y.createElement("span",{className:"".concat(ne,"-icon")},nt):st&&st.finish&&Oe==="finish"?Ke=y.createElement("span",{className:"".concat(ne,"-icon")},st.finish):st&&st.error&&Oe==="error"?Ke=y.createElement("span",{className:"".concat(ne,"-icon")},st.error):nt||Oe==="finish"||Oe==="error"?Ke=y.createElement("span",{className:br}):Ke=y.createElement("span",{className:"".concat(ne,"-icon")},rt),Ve&&(Ke=Ve({index:rt-1,status:Oe,title:Re,description:Je,node:Ke})),Ke},Qt=Oe||"wait",Dt=N()("".concat(ne,"-item"),"".concat(ne,"-item-").concat(Qt),z,(T={},(0,c.Z)(T,"".concat(ne,"-item-custom"),nt),(0,c.Z)(T,"".concat(ne,"-item-active"),Pe),(0,c.Z)(T,"".concat(ne,"-item-disabled"),We===!0),T)),zt=(0,p.Z)({},he),Mt=y.createElement("div",(0,j.Z)({},_t,{className:Dt,style:zt}),y.createElement("div",(0,j.Z)({onClick:kt},Ht,{className:"".concat(ne,"-item-container")}),y.createElement("div",{className:"".concat(ne,"-item-tail")},et),y.createElement("div",{className:"".concat(ne,"-item-icon")},Ft()),y.createElement("div",{className:"".concat(ne,"-item-content")},y.createElement("div",{className:"".concat(ne,"-item-title")},Re,Be&&y.createElement("div",{title:typeof Be=="string"?Be:void 0,className:"".concat(ne,"-item-subtitle")},Be)),Je&&y.createElement("div",{className:"".concat(ne,"-item-description")},Je))));return Pt&&(Mt=Pt(Mt)||null),Mt}var m=v,b=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function x(S){var T,z=S.prefixCls,ne=z===void 0?"rc-steps":z,he=S.style,Pe=he===void 0?{}:he,Oe=S.className,Ue=S.children,nt=S.direction,Qe=nt===void 0?"horizontal":nt,rt=S.type,We=rt===void 0?"default":rt,Je=S.labelPlacement,Re=Je===void 0?"horizontal":Je,Be=S.iconPrefix,_e=Be===void 0?"rc":Be,Ve=S.status,et=Ve===void 0?"process":Ve,st=S.size,Et=S.current,Ct=Et===void 0?0:Et,kt=S.progressDot,Pt=kt===void 0?!1:kt,_t=S.stepIcon,Ot=S.initial,Ht=Ot===void 0?0:Ot,Ft=S.icons,Qt=S.onChange,Dt=S.itemRender,zt=S.items,Mt=zt===void 0?[]:zt,Jt=(0,h.Z)(S,b),jt=We==="navigation",Ke=We==="inline",br=Ke||Pt,Xt=Ke?"horizontal":Qe,Yr=Ke?void 0:st,Or=br?"vertical":Re,fn=N()(ne,"".concat(ne,"-").concat(Xt),Oe,(T={},(0,c.Z)(T,"".concat(ne,"-").concat(Yr),Yr),(0,c.Z)(T,"".concat(ne,"-label-").concat(Or),Xt==="horizontal"),(0,c.Z)(T,"".concat(ne,"-dot"),!!br),(0,c.Z)(T,"".concat(ne,"-navigation"),jt),(0,c.Z)(T,"".concat(ne,"-inline"),Ke),T)),kr=function(wr){Qt&&Ct!==wr&&Qt(wr)},Tr=function(wr,rr){var Wr=(0,p.Z)({},wr),qt=Ht+rr;return et==="error"&&rr===Ct-1&&(Wr.className="".concat(ne,"-next-error")),Wr.status||(qt===Ct?Wr.status=et:qt<Ct?Wr.status="finish":Wr.status="wait"),Ke&&(Wr.icon=void 0,Wr.subTitle=void 0),!Wr.render&&Dt&&(Wr.render=function($r){return Dt(Wr,$r)}),y.createElement(m,(0,j.Z)({},Wr,{active:qt===Ct,stepNumber:qt+1,stepIndex:qt,key:qt,prefixCls:ne,iconPrefix:_e,wrapperStyle:Pe,progressDot:br,stepIcon:_t,icons:Ft,onStepClick:Qt&&kr}))};return y.createElement("div",(0,j.Z)({className:fn,style:Pe},Jt),Mt.filter(function(gr){return gr}).map(Tr))}x.Step=m;var R=x,I=R,E=Se(36355),C=Se(19716),P=Se(8628),Z=Se(93948),M=Se(6848),J=Se(17313),_=Se(83116),k=Se(37613),U=S=>{const{componentCls:T,customIconTop:z,customIconSize:ne,customIconFontSize:he}=S;return{[`${T}-item-custom`]:{[`> ${T}-item-container > ${T}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${T}-icon`]:{top:z,width:ne,height:ne,fontSize:he,lineHeight:`${he}px`}}},[`&:not(${T}-vertical)`]:{[`${T}-item-custom`]:{[`${T}-item-icon`]:{width:"auto",background:"none"}}}}},G=S=>{const{componentCls:T,inlineDotSize:z,inlineTitleColor:ne,inlineTailColor:he}=S,Pe=S.paddingXS+S.lineWidth,Oe={[`${T}-item-container ${T}-item-content ${T}-item-title`]:{color:ne}};return{[`&${T}-inline`]:{width:"auto",display:"inline-flex",[`${T}-item`]:{flex:"none","&-container":{padding:`${Pe}px ${S.paddingXXS}px 0`,margin:`0 ${S.marginXXS/2}px`,borderRadius:S.borderRadiusSM,cursor:"pointer",transition:`background-color ${S.motionDurationMid}`,"&:hover":{background:S.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:z,height:z,marginInlineStart:`calc(50% - ${z/2}px)`,[`> ${T}-icon`]:{top:0},[`${T}-icon-dot`]:{borderRadius:S.fontSizeSM/4}},"&-content":{width:"auto",marginTop:S.marginXS-S.lineWidth},"&-title":{color:ne,fontSize:S.fontSizeSM,lineHeight:S.lineHeightSM,fontWeight:"normal",marginBottom:S.marginXXS/2},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:Pe+z/2,transform:"translateY(-50%)","&:after":{width:"100%",height:S.lineWidth,borderRadius:0,marginInlineStart:0,background:he}},[`&:first-child ${T}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${T}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${T}-item-icon ${T}-icon ${T}-icon-dot`]:{backgroundColor:S.colorBorderBg,border:`${S.lineWidth}px ${S.lineType} ${he}`}},Oe),"&-finish":Object.assign({[`${T}-item-tail::after`]:{backgroundColor:he},[`${T}-item-icon ${T}-icon ${T}-icon-dot`]:{backgroundColor:he,border:`${S.lineWidth}px ${S.lineType} ${he}`}},Oe),"&-error":Oe,"&-active, &-process":Object.assign({[`${T}-item-icon`]:{width:z,height:z,marginInlineStart:`calc(50% - ${z/2}px)`,top:0}},Oe),[`&:not(${T}-item-active) > ${T}-item-container[role='button']:hover`]:{[`${T}-item-title`]:{color:ne}}}}}},W=S=>{const{componentCls:T,iconSize:z,lineHeight:ne,iconSizeSM:he}=S;return{[`&${T}-label-vertical`]:{[`${T}-item`]:{overflow:"visible","&-tail":{marginInlineStart:z/2+S.controlHeightLG,padding:`${S.paddingXXS}px ${S.paddingLG}px`},"&-content":{display:"block",width:(z/2+S.controlHeightLG)*2,marginTop:S.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:S.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:S.marginXXS,marginInlineStart:0,lineHeight:ne}},[`&${T}-small:not(${T}-dot)`]:{[`${T}-item`]:{"&-icon":{marginInlineStart:S.controlHeightLG+(z-he)/2}}}}}},re=S=>{const{componentCls:T,navContentMaxWidth:z,navArrowColor:ne,stepsNavActiveColor:he,motionDurationSlow:Pe}=S;return{[`&${T}-navigation`]:{paddingTop:S.paddingSM,[`&${T}-small`]:{[`${T}-item`]:{"&-container":{marginInlineStart:-S.marginSM}}},[`${T}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:-S.margin,paddingBottom:S.paddingSM,textAlign:"start",transition:`opacity ${Pe}`,[`${T}-item-content`]:{maxWidth:z},[`${T}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},J.vS),{"&::after":{display:"none"}})},[`&:not(${T}-item-active)`]:{[`${T}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${S.paddingSM/2}px)`,insetInlineStart:"100%",display:"inline-block",width:S.fontSizeIcon,height:S.fontSizeIcon,borderTop:`${S.lineWidth}px ${S.lineType} ${ne}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${S.lineWidth}px ${S.lineType} ${ne}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:S.lineWidthBold,backgroundColor:he,transition:`width ${Pe}, inset-inline-start ${Pe}`,transitionTimingFunction:"ease-out",content:'""'}},[`${T}-item${T}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${T}-navigation${T}-vertical`]:{[`> ${T}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${T}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:S.lineWidth*3,height:`calc(100% - ${S.marginLG}px)`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:S.controlHeight*.25,height:S.controlHeight*.25,marginBottom:S.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${T}-item-container > ${T}-item-tail`]:{visibility:"hidden"}}},[`&${T}-navigation${T}-horizontal`]:{[`> ${T}-item > ${T}-item-container > ${T}-item-tail`]:{visibility:"hidden"}}}},pe=S=>{const{antCls:T,componentCls:z}=S;return{[`&${z}-with-progress`]:{[`${z}-item`]:{paddingTop:S.paddingXXS,[`&-process ${z}-item-container ${z}-item-icon ${z}-icon`]:{color:S.processIconColor}},[`&${z}-vertical > ${z}-item `]:{paddingInlineStart:S.paddingXXS,[`> ${z}-item-container > ${z}-item-tail`]:{top:S.marginXXS,insetInlineStart:S.iconSize/2-S.lineWidth+S.paddingXXS}},[`&, &${z}-small`]:{[`&${z}-horizontal ${z}-item:first-child`]:{paddingBottom:S.paddingXXS,paddingInlineStart:S.paddingXXS}},[`&${z}-small${z}-vertical > ${z}-item > ${z}-item-container > ${z}-item-tail`]:{insetInlineStart:S.iconSizeSM/2-S.lineWidth+S.paddingXXS},[`&${z}-label-vertical`]:{[`${z}-item ${z}-item-tail`]:{top:S.margin-2*S.lineWidth}},[`${z}-item-icon`]:{position:"relative",[`${T}-progress`]:{position:"absolute",insetBlockStart:(S.iconSize-S.stepsProgressSize-S.lineWidth*2)/2,insetInlineStart:(S.iconSize-S.stepsProgressSize-S.lineWidth*2)/2}}}}},Ie=S=>{const{componentCls:T,descriptionMaxWidth:z,lineHeight:ne,dotCurrentSize:he,dotSize:Pe,motionDurationSlow:Oe}=S;return{[`&${T}-dot, &${T}-dot${T}-small`]:{[`${T}-item`]:{"&-title":{lineHeight:ne},"&-tail":{top:Math.floor((S.dotSize-S.lineWidth*3)/2),width:"100%",marginTop:0,marginBottom:0,marginInline:`${z/2}px 0`,padding:0,"&::after":{width:`calc(100% - ${S.marginSM*2}px)`,height:S.lineWidth*3,marginInlineStart:S.marginSM}},"&-icon":{width:Pe,height:Pe,marginInlineStart:(S.descriptionMaxWidth-Pe)/2,paddingInlineEnd:0,lineHeight:`${Pe}px`,background:"transparent",border:0,[`${T}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${Oe}`,"&::after":{position:"absolute",top:-S.marginSM,insetInlineStart:(Pe-S.controlHeightLG*1.5)/2,width:S.controlHeightLG*1.5,height:S.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:z},[`&-process ${T}-item-icon`]:{position:"relative",top:(Pe-he)/2,width:he,height:he,lineHeight:`${he}px`,background:"none",marginInlineStart:(S.descriptionMaxWidth-he)/2},[`&-process ${T}-icon`]:{[`&:first-child ${T}-icon-dot`]:{insetInlineStart:0}}}},[`&${T}-vertical${T}-dot`]:{[`${T}-item-icon`]:{marginTop:(S.controlHeight-Pe)/2,marginInlineStart:0,background:"none"},[`${T}-item-process ${T}-item-icon`]:{marginTop:(S.controlHeight-he)/2,top:0,insetInlineStart:(Pe-he)/2,marginInlineStart:0},[`${T}-item > ${T}-item-container > ${T}-item-tail`]:{top:(S.controlHeight-Pe)/2,insetInlineStart:0,margin:0,padding:`${Pe+S.paddingXS}px 0 ${S.paddingXS}px`,"&::after":{marginInlineStart:(Pe-S.lineWidth)/2}},[`&${T}-small`]:{[`${T}-item-icon`]:{marginTop:(S.controlHeightSM-Pe)/2},[`${T}-item-process ${T}-item-icon`]:{marginTop:(S.controlHeightSM-he)/2},[`${T}-item > ${T}-item-container > ${T}-item-tail`]:{top:(S.controlHeightSM-Pe)/2}},[`${T}-item:first-child ${T}-icon-dot`]:{insetInlineStart:0},[`${T}-item-content`]:{width:"inherit"}}}},de=S=>{const{componentCls:T}=S;return{[`&${T}-rtl`]:{direction:"rtl",[`${T}-item`]:{"&-subtitle":{float:"left"}},[`&${T}-navigation`]:{[`${T}-item::after`]:{transform:"rotate(-45deg)"}},[`&${T}-vertical`]:{[`> ${T}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${T}-item-icon`]:{float:"right"}}},[`&${T}-dot`]:{[`${T}-item-icon ${T}-icon-dot, &${T}-small ${T}-item-icon ${T}-icon-dot`]:{float:"right"}}}}},xe=S=>{const{componentCls:T,iconSizeSM:z,fontSizeSM:ne,fontSize:he,colorTextDescription:Pe}=S;return{[`&${T}-small`]:{[`&${T}-horizontal:not(${T}-label-vertical) ${T}-item`]:{paddingInlineStart:S.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${T}-item-icon`]:{width:z,height:z,marginTop:0,marginBottom:0,marginInline:`0 ${S.marginXS}px`,fontSize:ne,lineHeight:`${z}px`,textAlign:"center",borderRadius:z},[`${T}-item-title`]:{paddingInlineEnd:S.paddingSM,fontSize:he,lineHeight:`${z}px`,"&::after":{top:z/2}},[`${T}-item-description`]:{color:Pe,fontSize:he},[`${T}-item-tail`]:{top:z/2-S.paddingXXS},[`${T}-item-custom ${T}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${T}-icon`]:{fontSize:z,lineHeight:`${z}px`,transform:"none"}}}}},le=S=>{const{componentCls:T,iconSizeSM:z,iconSize:ne}=S;return{[`&${T}-vertical`]:{display:"flex",flexDirection:"column",[`> ${T}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${T}-item-icon`]:{float:"left",marginInlineEnd:S.margin},[`${T}-item-content`]:{display:"block",minHeight:S.controlHeight*1.5,overflow:"hidden"},[`${T}-item-title`]:{lineHeight:`${ne}px`},[`${T}-item-description`]:{paddingBottom:S.paddingSM}},[`> ${T}-item > ${T}-item-container > ${T}-item-tail`]:{position:"absolute",top:0,insetInlineStart:ne/2-S.lineWidth,width:S.lineWidth,height:"100%",padding:`${ne+S.marginXXS*1.5}px 0 ${S.marginXXS*1.5}px`,"&::after":{width:S.lineWidth,height:"100%"}},[`> ${T}-item:not(:last-child) > ${T}-item-container > ${T}-item-tail`]:{display:"block"},[` > ${T}-item > ${T}-item-container > ${T}-item-content > ${T}-item-title`]:{"&::after":{display:"none"}},[`&${T}-small ${T}-item-container`]:{[`${T}-item-tail`]:{position:"absolute",top:0,insetInlineStart:z/2-S.lineWidth,padding:`${z+S.marginXXS*1.5}px 0 ${S.marginXXS*1.5}px`},[`${T}-item-title`]:{lineHeight:`${z}px`}}}}},ge;(function(S){S.wait="wait",S.process="process",S.finish="finish",S.error="error"})(ge||(ge={}));const Ce=(S,T)=>{const z=`${T.componentCls}-item`,ne=`${S}IconColor`,he=`${S}TitleColor`,Pe=`${S}DescriptionColor`,Oe=`${S}TailColor`,Ue=`${S}IconBgColor`,nt=`${S}IconBorderColor`,Qe=`${S}DotColor`;return{[`${z}-${S} ${z}-icon`]:{backgroundColor:T[Ue],borderColor:T[nt],[`> ${T.componentCls}-icon`]:{color:T[ne],[`${T.componentCls}-icon-dot`]:{background:T[Qe]}}},[`${z}-${S}${z}-custom ${z}-icon`]:{[`> ${T.componentCls}-icon`]:{color:T[Qe]}},[`${z}-${S} > ${z}-container > ${z}-content > ${z}-title`]:{color:T[he],"&::after":{backgroundColor:T[Oe]}},[`${z}-${S} > ${z}-container > ${z}-content > ${z}-description`]:{color:T[Pe]},[`${z}-${S} > ${z}-container > ${z}-tail::after`]:{backgroundColor:T[Oe]}}},De=S=>{const{componentCls:T,motionDurationSlow:z}=S,ne=`${T}-item`,he=`${ne}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[ne]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${ne}-container > ${ne}-tail, > ${ne}-container > ${ne}-content > ${ne}-title::after`]:{display:"none"}}},[`${ne}-container`]:{outline:"none","&:focus-visible":{[he]:Object.assign({},(0,J.oN)(S))}},[`${he}, ${ne}-content`]:{display:"inline-block",verticalAlign:"top"},[he]:{width:S.iconSize,height:S.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:S.marginXS,fontSize:S.iconFontSize,fontFamily:S.fontFamily,lineHeight:`${S.iconSize}px`,textAlign:"center",borderRadius:S.iconSize,border:`${S.lineWidth}px ${S.lineType} transparent`,transition:`background-color ${z}, border-color ${z}`,[`${T}-icon`]:{position:"relative",top:S.iconTop,color:S.colorPrimary,lineHeight:1}},[`${ne}-tail`]:{position:"absolute",top:S.iconSize/2-S.paddingXXS,insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:S.lineWidth,background:S.colorSplit,borderRadius:S.lineWidth,transition:`background ${z}`,content:'""'}},[`${ne}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:S.padding,color:S.colorText,fontSize:S.fontSizeLG,lineHeight:`${S.titleLineHeight}px`,"&::after":{position:"absolute",top:S.titleLineHeight/2,insetInlineStart:"100%",display:"block",width:9999,height:S.lineWidth,background:S.processTailColor,content:'""'}},[`${ne}-subtitle`]:{display:"inline",marginInlineStart:S.marginXS,color:S.colorTextDescription,fontWeight:"normal",fontSize:S.fontSize},[`${ne}-description`]:{color:S.colorTextDescription,fontSize:S.fontSize}},Ce(ge.wait,S)),Ce(ge.process,S)),{[`${ne}-process > ${ne}-container > ${ne}-title`]:{fontWeight:S.fontWeightStrong}}),Ce(ge.finish,S)),Ce(ge.error,S)),{[`${ne}${T}-next-error > ${T}-item-title::after`]:{background:S.colorError},[`${ne}-disabled`]:{cursor:"not-allowed"}})},je=S=>{const{componentCls:T,motionDurationSlow:z}=S;return{[`& ${T}-item`]:{[`&:not(${T}-item-active)`]:{[`& > ${T}-item-container[role='button']`]:{cursor:"pointer",[`${T}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${T}-icon`]:{transition:`color ${z}`}},"&:hover":{[`${T}-item`]:{"&-title, &-subtitle, &-description":{color:S.colorPrimary}}}},[`&:not(${T}-item-process)`]:{[`& > ${T}-item-container[role='button']:hover`]:{[`${T}-item`]:{"&-icon":{borderColor:S.colorPrimary,[`${T}-icon`]:{color:S.colorPrimary}}}}}}},[`&${T}-horizontal:not(${T}-label-vertical)`]:{[`${T}-item`]:{paddingInlineStart:S.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${T}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:S.descriptionMaxWidth,whiteSpace:"normal"}}}}},fe=S=>{const{componentCls:T}=S;return{[T]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,J.Wf)(S)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),De(S)),je(S)),U(S)),xe(S)),le(S)),W(S)),Ie(S)),re(S)),de(S)),pe(S)),G(S))}};var Y=(0,_.Z)("Steps",S=>{const{wireframe:T,colorTextDisabled:z,controlHeightLG:ne,colorTextLightSolid:he,colorText:Pe,colorPrimary:Oe,colorTextLabel:Ue,colorTextDescription:nt,colorTextQuaternary:Qe,colorFillContent:rt,controlItemBgActive:We,colorError:Je,colorBgContainer:Re,colorBorderSecondary:Be,colorSplit:_e}=S,Ve=(0,k.TS)(S,{processIconColor:he,processTitleColor:Pe,processDescriptionColor:Pe,processIconBgColor:Oe,processIconBorderColor:Oe,processDotColor:Oe,processTailColor:_e,waitIconColor:T?z:Ue,waitTitleColor:nt,waitDescriptionColor:nt,waitTailColor:_e,waitIconBgColor:T?Re:rt,waitIconBorderColor:T?z:"transparent",waitDotColor:z,finishIconColor:Oe,finishTitleColor:Pe,finishDescriptionColor:nt,finishTailColor:Oe,finishIconBgColor:T?Re:We,finishIconBorderColor:T?Oe:We,finishDotColor:Oe,errorIconColor:he,errorTitleColor:Je,errorDescriptionColor:Je,errorTailColor:_e,errorIconBgColor:Je,errorIconBorderColor:Je,errorDotColor:Je,stepsNavActiveColor:Oe,stepsProgressSize:ne,inlineDotSize:6,inlineTitleColor:Qe,inlineTailColor:Be});return[fe(Ve)]},S=>{const{colorTextDisabled:T,fontSize:z,controlHeightSM:ne,controlHeight:he,controlHeightLG:Pe,fontSizeHeading3:Oe}=S;return{titleLineHeight:he,customIconSize:he,customIconTop:0,customIconFontSize:ne,iconSize:he,iconTop:-.5,iconFontSize:z,iconSizeSM:Oe,dotSize:he/4,dotCurrentSize:Pe/4,navArrowColor:T,navContentMaxWidth:"auto",descriptionMaxWidth:140}}),be=Se(11592);function q(S){return S.filter(T=>T)}function V(S,T){if(S)return S;const z=(0,be.Z)(T).map(ne=>{if(y.isValidElement(ne)){const{props:he}=ne;return Object.assign({},he)}return null});return q(z)}var Q=function(S,T){var z={};for(var ne in S)Object.prototype.hasOwnProperty.call(S,ne)&&T.indexOf(ne)<0&&(z[ne]=S[ne]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,ne=Object.getOwnPropertySymbols(S);he<ne.length;he++)T.indexOf(ne[he])<0&&Object.prototype.propertyIsEnumerable.call(S,ne[he])&&(z[ne[he]]=S[ne[he]]);return z};const L=S=>{const{percent:T,size:z,className:ne,rootClassName:he,direction:Pe,items:Oe,responsive:Ue=!0,current:nt=0,children:Qe,style:rt}=S,We=Q(S,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:Je}=(0,P.Z)(Ue),{getPrefixCls:Re,direction:Be,steps:_e}=y.useContext(E.E_),Ve=y.useMemo(()=>Ue&&Je?"vertical":Pe,[Je,Pe]),et=(0,C.Z)(z),st=Re("steps",S.prefixCls),[Et,Ct]=Y(st),kt=S.type==="inline",Pt=Re("",S.iconPrefix),_t=V(Oe,Qe),Ot=kt?void 0:T,Ht=Object.assign(Object.assign({},_e==null?void 0:_e.style),rt),Ft=N()(_e==null?void 0:_e.className,{[`${st}-rtl`]:Be==="rtl",[`${st}-with-progress`]:Ot!==void 0},ne,he,Ct),Qt={finish:y.createElement(Ae.Z,{className:`${st}-finish-icon`}),error:y.createElement(Ye.Z,{className:`${st}-error-icon`})},Dt=Mt=>{let{node:Jt,status:jt}=Mt;if(jt==="process"&&Ot!==void 0){const Ke=et==="small"?32:40;return y.createElement("div",{className:`${st}-progress-icon`},y.createElement(Z.Z,{type:"circle",percent:Ot,size:Ke,strokeWidth:4,format:()=>null}),Jt)}return Jt},zt=(Mt,Jt)=>Mt.description?y.createElement(M.Z,{title:Mt.description},Jt):Jt;return Et(y.createElement(I,Object.assign({icons:Qt},We,{style:Ht,current:nt,size:et,items:_t,itemRender:kt?zt:void 0,stepIcon:Dt,direction:Ve,prefixCls:st,iconPrefix:Pt,className:Ft})))};L.Step=I.Step;var $=L},8378:function(Zt,ut){"use strict";const Se=Ae=>({[Ae.componentCls]:{[`${Ae.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${Ae.motionDurationMid} ${Ae.motionEaseInOut},
opacity ${Ae.motionDurationMid} ${Ae.motionEaseInOut} !important`}},[`${Ae.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${Ae.motionDurationMid} ${Ae.motionEaseInOut},
opacity ${Ae.motionDurationMid} ${Ae.motionEaseInOut} !important`}}});ut.Z=Se},19447:function(Zt,ut,Se){"use strict";Se.d(ut,{ZP:function(){return j},fS:function(){return a},qN:function(){return Ye}});var Ae=Se(47585);const Ye=8;function a(p){const c=Ye,{contentRadius:h,limitVerticalRadius:y}=p,g=h>12?h+2:12;return{dropdownArrowOffset:g,dropdownArrowOffsetVertical:y?c:g}}function N(p,c){return p?c:{}}function j(p,c){const{componentCls:h,sizePopupArrow:y,borderRadiusXS:g,borderRadiusOuter:w,boxShadowPopoverArrow:f}=p,{colorBg:v,contentRadius:m=p.borderRadiusLG,limitVerticalRadius:b,arrowDistance:x=0,arrowPlacement:R={left:!0,right:!0,top:!0,bottom:!0}}=c,{dropdownArrowOffsetVertical:I,dropdownArrowOffset:E}=a({contentRadius:m,limitVerticalRadius:b});return{[h]:Object.assign(Object.assign(Object.assign(Object.assign({[`${h}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,Ae.r)(y,g,w,v,f)),{"&:before":{background:v}})]},N(!!R.top,{[[`&-placement-top ${h}-arrow`,`&-placement-topLeft ${h}-arrow`,`&-placement-topRight ${h}-arrow`].join(",")]:{bottom:x,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${h}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${h}-arrow`]:{left:{_skip_check_:!0,value:E}},[`&-placement-topRight ${h}-arrow`]:{right:{_skip_check_:!0,value:E}}})),N(!!R.bottom,{[[`&-placement-bottom ${h}-arrow`,`&-placement-bottomLeft ${h}-arrow`,`&-placement-bottomRight ${h}-arrow`].join(",")]:{top:x,transform:"translateY(-100%)"},[`&-placement-bottom ${h}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${h}-arrow`]:{left:{_skip_check_:!0,value:E}},[`&-placement-bottomRight ${h}-arrow`]:{right:{_skip_check_:!0,value:E}}})),N(!!R.left,{[[`&-placement-left ${h}-arrow`,`&-placement-leftTop ${h}-arrow`,`&-placement-leftBottom ${h}-arrow`].join(",")]:{right:{_skip_check_:!0,value:x},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${h}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${h}-arrow`]:{top:I},[`&-placement-leftBottom ${h}-arrow`]:{bottom:I}})),N(!!R.right,{[[`&-placement-right ${h}-arrow`,`&-placement-rightTop ${h}-arrow`,`&-placement-rightBottom ${h}-arrow`].join(",")]:{left:{_skip_check_:!0,value:x},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${h}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${h}-arrow`]:{top:I},[`&-placement-rightBottom ${h}-arrow`]:{bottom:I}}))}}},47585:function(Zt,ut,Se){"use strict";Se.d(ut,{r:function(){return Ae}});const Ae=(Ye,a,N,j,p)=>{const c=Ye/2,h=0,y=c,g=N*1/Math.sqrt(2),w=c-N*(1-1/Math.sqrt(2)),f=c-a*(1/Math.sqrt(2)),v=N*(Math.sqrt(2)-1)+a*(1/Math.sqrt(2)),m=2*c-f,b=v,x=2*c-g,R=w,I=2*c-h,E=y,C=c*Math.sqrt(2)+N*(Math.sqrt(2)-2),P=N*(Math.sqrt(2)-1);return{pointerEvents:"none",width:Ye,height:Ye,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:Ye,height:Ye/2,background:j,clipPath:{_multi_value_:!0,value:[`polygon(${P}px 100%, 50% ${P}px, ${2*c-P}px 100%, ${P}px 100%)`,`path('M ${h} ${y} A ${N} ${N} 0 0 0 ${g} ${w} L ${f} ${v} A ${a} ${a} 0 0 1 ${m} ${b} L ${x} ${R} A ${N} ${N} 0 0 0 ${I} ${E} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:C,height:C,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${a}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:p,zIndex:0,background:"transparent"}}}},33166:function(Zt,ut,Se){"use strict";Se.d(ut,{i:function(){return Ae}});const Ae=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},45157:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return Ye}});var Ae=Se(33166);function Ye(a,N){return Ae.i.reduce((j,p)=>{const c=a[`${p}1`],h=a[`${p}3`],y=a[`${p}6`],g=a[`${p}7`];return Object.assign(Object.assign({},j),N(p,{lightColor:c,lightBorderColor:h,darkColor:y,textColor:g}))},{})}},6848:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return U}});var Ae=Se(59301),Ye=Se(92310),a=Se.n(Ye),N=Se(55477),j=Se(18929),p=Se(62892),c=Se(79676),h=Se(92343),y=Se(36355),g=Se(33234),w=Se(88088),f=Se(17313),v=Se(29878),m=Se(19447),b=Se(45157),x=Se(37613),R=Se(83116);const I=K=>{const{componentCls:G,tooltipMaxWidth:F,tooltipColor:W,tooltipBg:X,tooltipBorderRadius:re,zIndexPopup:oe,controlHeight:pe,boxShadowSecondary:ie,paddingSM:Ie,paddingXS:ee,tooltipRadiusOuter:de}=K;return[{[G]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,f.Wf)(K)),{position:"absolute",zIndex:oe,display:"block",width:"max-content",maxWidth:F,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":X,[`${G}-inner`]:{minWidth:pe,minHeight:pe,padding:`${Ie/2}px ${ee}px`,color:W,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:X,borderRadius:re,boxShadow:ie,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${G}-inner`]:{borderRadius:Math.min(re,m.qN)}},[`${G}-content`]:{position:"relative"}}),(0,b.Z)(K,(me,xe)=>{let{darkColor:ce}=xe;return{[`&${G}-${me}`]:{[`${G}-inner`]:{backgroundColor:ce},[`${G}-arrow`]:{"--antd-arrow-background-color":ce}}}})),{"&-rtl":{direction:"rtl"}})},(0,m.ZP)((0,x.TS)(K,{borderRadiusOuter:de}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:re,limitVerticalRadius:!0}),{[`${G}-pure`]:{position:"relative",maxWidth:"none",margin:K.sizePopupArrow}}]};var E=(K,G)=>(0,R.Z)("Tooltip",W=>{if(G===!1)return[];const{borderRadius:X,colorTextLightSolid:re,colorBgDefault:oe,borderRadiusOuter:pe}=W,ie=(0,x.TS)(W,{tooltipMaxWidth:250,tooltipColor:re,tooltipBorderRadius:X,tooltipBg:oe,tooltipRadiusOuter:pe>4?4:pe});return[I(ie),(0,v._y)(W,"zoom-big-fast")]},W=>{let{zIndexPopupBase:X,colorBgSpotlight:re}=W;return{zIndexPopup:X+70,colorBgDefault:re}},{resetStyle:!1})(K),C=Se(36785);function P(K,G){const F=(0,C.o2)(G),W=a()({[`${K}-${G}`]:G&&F}),X={},re={};return G&&!F&&(X.background=G,re["--antd-arrow-background-color"]=G),{className:W,overlayStyle:X,arrowStyle:re}}var M=K=>{const{prefixCls:G,className:F,placement:W="top",title:X,color:re,overlayInnerStyle:oe}=K,{getPrefixCls:pe}=Ae.useContext(y.E_),ie=pe("tooltip",G),[Ie,ee]=E(ie,!0),de=P(ie,re),me=de.arrowStyle,xe=Object.assign(Object.assign({},oe),de.overlayStyle),ce=a()(ee,ie,`${ie}-pure`,`${ie}-placement-${W}`,F,de.className);return Ie(Ae.createElement("div",{className:ce,style:me},Ae.createElement("div",{className:`${ie}-arrow`}),Ae.createElement(N.G,Object.assign({},K,{className:ee,prefixCls:ie,overlayInnerStyle:xe}),X)))},J=function(K,G){var F={};for(var W in K)Object.prototype.hasOwnProperty.call(K,W)&&G.indexOf(W)<0&&(F[W]=K[W]);if(K!=null&&typeof Object.getOwnPropertySymbols=="function")for(var X=0,W=Object.getOwnPropertySymbols(K);X<W.length;X++)G.indexOf(W[X])<0&&Object.prototype.propertyIsEnumerable.call(K,W[X])&&(F[W[X]]=K[W[X]]);return F};const _=(K,G)=>{const F={},W=Object.assign({},K);return G.forEach(X=>{K&&X in K&&(F[X]=K[X],delete W[X])}),{picked:F,omitted:W}};function k(K,G){const F=K.type;if((F.__ANT_BUTTON===!0||K.type==="button")&&K.props.disabled||F.__ANT_SWITCH===!0&&(K.props.disabled||K.props.loading)||F.__ANT_RADIO===!0&&K.props.disabled){const{picked:W,omitted:X}=_(K.props.style,["position","left","right","top","bottom","float","display","zIndex"]),re=Object.assign(Object.assign({display:"inline-block"},W),{cursor:"not-allowed",width:K.props.block?"100%":void 0}),oe=Object.assign(Object.assign({},X),{pointerEvents:"none"}),pe=(0,h.Tm)(K,{style:oe,className:null});return Ae.createElement("span",{style:re,className:a()(K.props.className,`${G}-disabled-compatible-wrapper`)},pe)}return K}const B=Ae.forwardRef((K,G)=>{var F,W;const{prefixCls:X,openClassName:re,getTooltipContainer:oe,overlayClassName:pe,color:ie,overlayInnerStyle:Ie,children:ee,afterOpenChange:de,afterVisibleChange:me,destroyTooltipOnHide:xe,arrow:ce=!0,title:le,overlay:ge,builtinPlacements:Ce,arrowPointAtCenter:De=!1,autoAdjustOverflow:je=!0}=K,fe=!!ce,[,Y]=(0,w.Z)(),{getPopupContainer:be,getPrefixCls:q,direction:V}=Ae.useContext(y.E_),Q=Ae.useRef(null),L=()=>{var Ft;(Ft=Q.current)===null||Ft===void 0||Ft.forceAlign()};Ae.useImperativeHandle(G,()=>({forceAlign:L,forcePopupAlign:()=>{L()}}));const[$,S]=(0,j.Z)(!1,{value:(F=K.open)!==null&&F!==void 0?F:K.visible,defaultValue:(W=K.defaultOpen)!==null&&W!==void 0?W:K.defaultVisible}),T=!le&&!ge&&le!==0,z=Ft=>{var Qt,Dt;S(T?!1:Ft),T||((Qt=K.onOpenChange)===null||Qt===void 0||Qt.call(K,Ft),(Dt=K.onVisibleChange)===null||Dt===void 0||Dt.call(K,Ft))},ne=Ae.useMemo(()=>{var Ft,Qt;let Dt=De;return typeof ce=="object"&&(Dt=(Qt=(Ft=ce.pointAtCenter)!==null&&Ft!==void 0?Ft:ce.arrowPointAtCenter)!==null&&Qt!==void 0?Qt:De),Ce||(0,c.Z)({arrowPointAtCenter:Dt,autoAdjustOverflow:je,arrowWidth:fe?Y.sizePopupArrow:0,borderRadius:Y.borderRadius,offset:Y.marginXXS,visibleFirst:!0})},[De,ce,Ce,Y]),he=Ae.useMemo(()=>le===0?le:ge||le||"",[ge,le]),Pe=Ae.createElement(g.BR,null,typeof he=="function"?he():he),{getPopupContainer:Oe,placement:Ue="top",mouseEnterDelay:nt=.1,mouseLeaveDelay:Qe=.1,overlayStyle:rt,rootClassName:We}=K,Je=J(K,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),Re=q("tooltip",X),Be=q(),_e=K["data-popover-inject"];let Ve=$;!("open"in K)&&!("visible"in K)&&T&&(Ve=!1);const et=k((0,h.l$)(ee)&&!(0,h.M2)(ee)?ee:Ae.createElement("span",null,ee),Re),st=et.props,Et=!st.className||typeof st.className=="string"?a()(st.className,re||`${Re}-open`):st.className,[Ct,kt]=E(Re,!_e),Pt=P(Re,ie),_t=Pt.arrowStyle,Ot=Object.assign(Object.assign({},Ie),Pt.overlayStyle),Ht=a()(pe,{[`${Re}-rtl`]:V==="rtl"},Pt.className,We,kt);return Ct(Ae.createElement(N.Z,Object.assign({},Je,{showArrow:fe,placement:Ue,mouseEnterDelay:nt,mouseLeaveDelay:Qe,prefixCls:Re,overlayClassName:Ht,overlayStyle:Object.assign(Object.assign({},_t),rt),getTooltipContainer:Oe||oe||be,ref:Q,builtinPlacements:ne,overlay:Pe,visible:Ve,onVisibleChange:z,afterVisibleChange:de!=null?de:me,overlayInnerStyle:Ot,arrowContent:Ae.createElement("span",{className:`${Re}-arrow-content`}),motion:{motionName:(0,p.m)(Be,"zoom-big-fast",K.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!xe}),Ve?(0,h.Tm)(et,{className:Et}):et))});B._InternalPanelDoNotUseOrYouWillBeFired=M;var U=B},54580:function(Zt,ut,Se){"use strict";Se.d(ut,{default:function(){return mn}});var Ae=Se(59301),Ye=Se(19127),a=Se(92310),N=Se.n(a),j=Se(96663),p=Se(52884),c=Se(95727),h=Se(65711),y=Se(85745),g=Se(90493),w=Se(6620),f=Se(49581),v=Se(20135),m=Se(73324),b=Se(26112);function x(He,it){var $e="cannot ".concat(He.method," ").concat(He.action," ").concat(it.status,"'"),lt=new Error($e);return lt.status=it.status,lt.method=He.method,lt.url=He.action,lt}function R(He){var it=He.responseText||He.response;if(!it)return it;try{return JSON.parse(it)}catch($e){return it}}function I(He){var it=new XMLHttpRequest;He.onProgress&&it.upload&&(it.upload.onprogress=function(dt){dt.total>0&&(dt.percent=dt.loaded/dt.total*100),He.onProgress(dt)});var $e=new FormData;He.data&&Object.keys(He.data).forEach(function(yt){var dt=He.data[yt];if(Array.isArray(dt)){dt.forEach(function(pt){$e.append("".concat(yt,"[]"),pt)});return}$e.append(yt,dt)}),He.file instanceof Blob?$e.append(He.filename,He.file,He.file.name):$e.append(He.filename,He.file),it.onerror=function(dt){He.onError(dt)},it.onload=function(){return it.status<200||it.status>=300?He.onError(x(He,it),R(it)):He.onSuccess(R(it),it)},it.open(He.method,He.action,!0),He.withCredentials&&"withCredentials"in it&&(it.withCredentials=!0);var lt=He.headers||{};return lt["X-Requested-With"]!==null&&it.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(lt).forEach(function(yt){lt[yt]!==null&&it.setRequestHeader(yt,lt[yt])}),it.send($e),{abort:function(){it.abort()}}}var E=+new Date,C=0;function P(){return"rc-upload-".concat(E,"-").concat(++C)}var Z=Se(48736),M=function(He,it){if(He&&it){var $e=Array.isArray(it)?it:it.split(","),lt=He.name||"",yt=He.type||"",dt=yt.replace(/\/.*$/,"");return $e.some(function(pt){var at=pt.trim();if(/^\*(\/\*)?$/.test(pt))return!0;if(at.charAt(0)==="."){var Nt=lt.toLowerCase(),Bt=at.toLowerCase(),vt=[Bt];return(Bt===".jpg"||Bt===".jpeg")&&(vt=[".jpg",".jpeg"]),vt.some(function(or){return Nt.endsWith(or)})}return/\/\*$/.test(at)?dt===at.replace(/\/.*$/,""):yt===at?!0:/^\w+$/.test(at)?((0,Z.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(at,"'.Skip for check.")),!0):!1})}return!0};function J(He,it){var $e=He.createReader(),lt=[];function yt(){$e.readEntries(function(dt){var pt=Array.prototype.slice.apply(dt);lt=lt.concat(pt);var at=!pt.length;at?it(lt):yt()})}yt()}var _=function(it,$e,lt){var yt=function dt(pt,at){pt&&(pt.path=at||"",pt.isFile?pt.file(function(Nt){lt(Nt)&&(pt.fullPath&&!Nt.webkitRelativePath&&(Object.defineProperties(Nt,{webkitRelativePath:{writable:!0}}),Nt.webkitRelativePath=pt.fullPath.replace(/^\//,""),Object.defineProperties(Nt,{webkitRelativePath:{writable:!1}})),$e([Nt]))}):pt.isDirectory&&J(pt,function(Nt){Nt.forEach(function(Bt){dt(Bt,"".concat(at).concat(pt.name,"/"))})}))};it.forEach(function(dt){yt(dt.webkitGetAsEntry())})},k=_,B=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],U=function(He){(0,h.Z)($e,He);var it=(0,y.Z)($e);function $e(){var lt;(0,p.Z)(this,$e);for(var yt=arguments.length,dt=new Array(yt),pt=0;pt<yt;pt++)dt[pt]=arguments[pt];return lt=it.call.apply(it,[this].concat(dt)),lt.state={uid:P()},lt.reqs={},lt.fileInput=void 0,lt._isMounted=void 0,lt.onChange=function(at){var Nt=lt.props,Bt=Nt.accept,vt=Nt.directory,or=at.target.files,er=(0,Ye.Z)(or).filter(function(Ar){return!vt||M(Ar,Bt)});lt.uploadFiles(er),lt.reset()},lt.onClick=function(at){var Nt=lt.fileInput;if(Nt){var Bt=at.target,vt=lt.props.onClick;if(Bt&&Bt.tagName==="BUTTON"){var or=Nt.parentNode;or.focus(),Bt.blur()}Nt.click(),vt&&vt(at)}},lt.onKeyDown=function(at){at.key==="Enter"&&lt.onClick(at)},lt.onFileDrop=function(at){var Nt=lt.props.multiple;if(at.preventDefault(),at.type!=="dragover")if(lt.props.directory)k(Array.prototype.slice.call(at.dataTransfer.items),lt.uploadFiles,function(vt){return M(vt,lt.props.accept)});else{var Bt=(0,Ye.Z)(at.dataTransfer.files).filter(function(vt){return M(vt,lt.props.accept)});Nt===!1&&(Bt=Bt.slice(0,1)),lt.uploadFiles(Bt)}},lt.uploadFiles=function(at){var Nt=(0,Ye.Z)(at),Bt=Nt.map(function(vt){return vt.uid=P(),lt.processFile(vt,Nt)});Promise.all(Bt).then(function(vt){var or=lt.props.onBatchStart;or==null||or(vt.map(function(er){var Ar=er.origin,pn=er.parsedFile;return{file:Ar,parsedFile:pn}})),vt.filter(function(er){return er.parsedFile!==null}).forEach(function(er){lt.post(er)})})},lt.processFile=function(){var at=(0,m.Z)((0,f.Z)().mark(function Nt(Bt,vt){var or,er,Ar,pn,Mr,jr,Kr,Zr,Nr;return(0,f.Z)().wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:if(or=lt.props.beforeUpload,er=Bt,!or){Rt.next=14;break}return Rt.prev=3,Rt.next=6,or(Bt,vt);case 6:er=Rt.sent,Rt.next=12;break;case 9:Rt.prev=9,Rt.t0=Rt.catch(3),er=!1;case 12:if(er!==!1){Rt.next=14;break}return Rt.abrupt("return",{origin:Bt,parsedFile:null,action:null,data:null});case 14:if(Ar=lt.props.action,typeof Ar!="function"){Rt.next=21;break}return Rt.next=18,Ar(Bt);case 18:pn=Rt.sent,Rt.next=22;break;case 21:pn=Ar;case 22:if(Mr=lt.props.data,typeof Mr!="function"){Rt.next=29;break}return Rt.next=26,Mr(Bt);case 26:jr=Rt.sent,Rt.next=30;break;case 29:jr=Mr;case 30:return Kr=((0,v.Z)(er)==="object"||typeof er=="string")&&er?er:Bt,Kr instanceof File?Zr=Kr:Zr=new File([Kr],Bt.name,{type:Bt.type}),Nr=Zr,Nr.uid=Bt.uid,Rt.abrupt("return",{origin:Bt,data:jr,parsedFile:Nr,action:pn});case 35:case"end":return Rt.stop()}},Nt,null,[[3,9]])}));return function(Nt,Bt){return at.apply(this,arguments)}}(),lt.saveFileInput=function(at){lt.fileInput=at},lt}return(0,c.Z)($e,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(yt){var dt=this,pt=yt.data,at=yt.origin,Nt=yt.action,Bt=yt.parsedFile;if(this._isMounted){var vt=this.props,or=vt.onStart,er=vt.customRequest,Ar=vt.name,pn=vt.headers,Mr=vt.withCredentials,jr=vt.method,Kr=at.uid,Zr=er||I,Nr={action:Nt,filename:Ar,data:pt,file:Bt,headers:pn,withCredentials:Mr,method:jr||"post",onProgress:function(Rt){var _r=dt.props.onProgress;_r==null||_r(Rt,Bt)},onSuccess:function(Rt,_r){var xr=dt.props.onSuccess;xr==null||xr(Rt,Bt,_r),delete dt.reqs[Kr]},onError:function(Rt,_r){var xr=dt.props.onError;xr==null||xr(Rt,_r,Bt),delete dt.reqs[Kr]}};or(at),this.reqs[Kr]=Zr(Nr)}}},{key:"reset",value:function(){this.setState({uid:P()})}},{key:"abort",value:function(yt){var dt=this.reqs;if(yt){var pt=yt.uid?yt.uid:yt;dt[pt]&&dt[pt].abort&&dt[pt].abort(),delete dt[pt]}else Object.keys(dt).forEach(function(at){dt[at]&&dt[at].abort&&dt[at].abort(),delete dt[at]})}},{key:"render",value:function(){var yt=this.props,dt=yt.component,pt=yt.prefixCls,at=yt.className,Nt=yt.disabled,Bt=yt.id,vt=yt.style,or=yt.multiple,er=yt.accept,Ar=yt.capture,pn=yt.children,Mr=yt.directory,jr=yt.openFileDialogOnClick,Kr=yt.onMouseEnter,Zr=yt.onMouseLeave,Nr=(0,w.Z)(yt,B),ar=N()((0,g.Z)((0,g.Z)((0,g.Z)({},pt,!0),"".concat(pt,"-disabled"),Nt),at,at)),Rt=Mr?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},_r=Nt?{}:{onClick:jr?this.onClick:function(){},onKeyDown:jr?this.onKeyDown:function(){},onMouseEnter:Kr,onMouseLeave:Zr,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return Ae.createElement(dt,(0,j.Z)({},_r,{className:ar,role:"button",style:vt}),Ae.createElement("input",(0,j.Z)({},(0,b.Z)(Nr,{aria:!0,data:!0}),{id:Bt,disabled:Nt,type:"file",ref:this.saveFileInput,onClick:function(wn){return wn.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:er},Rt,{multiple:or,onChange:this.onChange},Ar!=null?{capture:Ar}:{})),pn)}}]),$e}(Ae.Component),K=U;function G(){}var F=function(He){(0,h.Z)($e,He);var it=(0,y.Z)($e);function $e(){var lt;(0,p.Z)(this,$e);for(var yt=arguments.length,dt=new Array(yt),pt=0;pt<yt;pt++)dt[pt]=arguments[pt];return lt=it.call.apply(it,[this].concat(dt)),lt.uploader=void 0,lt.saveUploader=function(at){lt.uploader=at},lt}return(0,c.Z)($e,[{key:"abort",value:function(yt){this.uploader.abort(yt)}},{key:"render",value:function(){return Ae.createElement(K,(0,j.Z)({},this.props,{ref:this.saveUploader}))}}]),$e}(Ae.Component);F.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:G,onError:G,onSuccess:G,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var W=F,X=W,re=Se(18929),oe=Se(4676),pe=Se(36355),ie=Se(1684),Ie=Se(9763),ee=Se(31724),de={icon:function(it,$e){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:$e}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:it}}]}},name:"file",theme:"twotone"},me=de,xe=Se(7657),ce=function(it,$e){return Ae.createElement(xe.Z,(0,j.Z)({},it,{ref:$e,icon:me}))},le=Ae.forwardRef(ce),ge=le,Ce=Se(58617),De={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},je=De,fe=function(it,$e){return Ae.createElement(xe.Z,(0,j.Z)({},it,{ref:$e,icon:je}))},Y=Ae.forwardRef(fe),be=Y,q={icon:function(it,$e){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:it}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:$e}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:$e}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:$e}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:it}}]}},name:"picture",theme:"twotone"},V=q,Q=function(it,$e){return Ae.createElement(xe.Z,(0,j.Z)({},it,{ref:$e,icon:V}))},L=Ae.forwardRef(Q),$=L,S=Se(77900),T=Se(56762),z=Se(62892),ne=Se(92343),he=Se(3113);function Pe(He){return Object.assign(Object.assign({},He),{lastModified:He.lastModified,lastModifiedDate:He.lastModifiedDate,name:He.name,size:He.size,type:He.type,uid:He.uid,percent:0,originFileObj:He})}function Oe(He,it){const $e=(0,Ye.Z)(it),lt=$e.findIndex(yt=>{let{uid:dt}=yt;return dt===He.uid});return lt===-1?$e.push(He):$e[lt]=He,$e}function Ue(He,it){const $e=He.uid!==void 0?"uid":"name";return it.filter(lt=>lt[$e]===He[$e])[0]}function nt(He,it){const $e=He.uid!==void 0?"uid":"name",lt=it.filter(yt=>yt[$e]!==He[$e]);return lt.length===it.length?null:lt}const Qe=function(){const it=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),lt=it[it.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(lt)||[""])[0]},rt=He=>He.indexOf("image/")===0,We=He=>{if(He.type&&!He.thumbUrl)return rt(He.type);const it=He.thumbUrl||He.url||"",$e=Qe(it);return/^data:image\//.test(it)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test($e)?!0:!(/^data:/.test(it)||$e)},Je=200;function Re(He){return new Promise(it=>{if(!He.type||!rt(He.type)){it("");return}const $e=document.createElement("canvas");$e.width=Je,$e.height=Je,$e.style.cssText=`position: fixed; left: 0; top: 0; width: ${Je}px; height: ${Je}px; z-index: 9999; display: none;`,document.body.appendChild($e);const lt=$e.getContext("2d"),yt=new Image;if(yt.onload=()=>{const{width:dt,height:pt}=yt;let at=Je,Nt=Je,Bt=0,vt=0;dt>pt?(Nt=pt*(Je/dt),vt=-(Nt-at)/2):(at=dt*(Je/pt),Bt=-(at-Nt)/2),lt.drawImage(yt,Bt,vt,at,Nt);const or=$e.toDataURL();document.body.removeChild($e),window.URL.revokeObjectURL(yt.src),it(or)},yt.crossOrigin="anonymous",He.type.startsWith("image/svg+xml")){const dt=new FileReader;dt.onload=()=>{dt.result&&(yt.src=dt.result)},dt.readAsDataURL(He)}else if(He.type.startsWith("image/gif")){const dt=new FileReader;dt.onload=()=>{dt.result&&it(dt.result)},dt.readAsDataURL(He)}else yt.src=window.URL.createObjectURL(He)})}var Be=Se(26227),_e=Se(41464),Ve=Se(15277),et=Se(93948),st=Se(6848),Ct=Ae.forwardRef((He,it)=>{let{prefixCls:$e,className:lt,style:yt,locale:dt,listType:pt,file:at,items:Nt,progress:Bt,iconRender:vt,actionIconRender:or,itemRender:er,isImgUrl:Ar,showPreviewIcon:pn,showRemoveIcon:Mr,showDownloadIcon:jr,previewIcon:Kr,removeIcon:Zr,downloadIcon:Nr,onPreview:ar,onDownload:Rt,onClose:_r}=He;var xr,wn;const{status:_n}=at,[hn,Xn]=Ae.useState(_n);Ae.useEffect(()=>{_n!=="removed"&&Xn(_n)},[_n]);const[nn,ri]=Ae.useState(!1);Ae.useEffect(()=>{const Lr=setTimeout(()=>{ri(!0)},300);return()=>{clearTimeout(Lr)}},[]);const Kn=vt(at);let on=Ae.createElement("div",{className:`${$e}-icon`},Kn);if(pt==="picture"||pt==="picture-card"||pt==="picture-circle")if(hn==="uploading"||!at.thumbUrl&&!at.url){const Lr=N()(`${$e}-list-item-thumbnail`,{[`${$e}-list-item-file`]:hn!=="uploading"});on=Ae.createElement("div",{className:Lr},Kn)}else{const Lr=Ar!=null&&Ar(at)?Ae.createElement("img",{src:at.thumbUrl||at.url,alt:at.name,className:`${$e}-list-item-image`,crossOrigin:at.crossOrigin}):Kn,Sr=N()(`${$e}-list-item-thumbnail`,{[`${$e}-list-item-file`]:Ar&&!Ar(at)});on=Ae.createElement("a",{className:Sr,onClick:Hr=>ar(at,Hr),href:at.url||at.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Lr)}const Fr=N()(`${$e}-list-item`,`${$e}-list-item-${hn}`),Jn=typeof at.linkProps=="string"?JSON.parse(at.linkProps):at.linkProps,An=Mr?or((typeof Zr=="function"?Zr(at):Zr)||Ae.createElement(Be.Z,null),()=>_r(at),$e,dt.removeFile):null,Rn=jr&&hn==="done"?or((typeof Nr=="function"?Nr(at):Nr)||Ae.createElement(_e.Z,null),()=>Rt(at),$e,dt.downloadFile):null,an=pt!=="picture-card"&&pt!=="picture-circle"&&Ae.createElement("span",{key:"download-delete",className:N()(`${$e}-list-item-actions`,{picture:pt==="picture"})},Rn,An),sn=N()(`${$e}-list-item-name`),gn=at.url?[Ae.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:sn,title:at.name},Jn,{href:at.url,onClick:Lr=>ar(at,Lr)}),at.name),an]:[Ae.createElement("span",{key:"view",className:sn,onClick:Lr=>ar(at,Lr),title:at.name},at.name),an],Kt={pointerEvents:"none",opacity:.5},Er=pn?Ae.createElement("a",{href:at.url||at.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:at.url||at.thumbUrl?void 0:Kt,onClick:Lr=>ar(at,Lr),title:dt.previewFile},typeof Kr=="function"?Kr(at):Kr||Ae.createElement(Ve.Z,null)):null,Gr=(pt==="picture-card"||pt==="picture-circle")&&hn!=="uploading"&&Ae.createElement("span",{className:`${$e}-list-item-actions`},Er,hn==="done"&&Rn,An),{getPrefixCls:rn}=Ae.useContext(pe.E_),zr=rn(),xn=Ae.createElement("div",{className:Fr},on,gn,Gr,nn&&Ae.createElement(S.default,{motionName:`${zr}-fade`,visible:hn==="uploading",motionDeadline:2e3},Lr=>{let{className:Sr}=Lr;const Hr="percent"in at?Ae.createElement(et.Z,Object.assign({},Bt,{type:"line",percent:at.percent,"aria-label":at["aria-label"],"aria-labelledby":at["aria-labelledby"]})):null;return Ae.createElement("div",{className:N()(`${$e}-list-item-progress`,Sr)},Hr)})),ni=at.response&&typeof at.response=="string"?at.response:((xr=at.error)===null||xr===void 0?void 0:xr.statusText)||((wn=at.error)===null||wn===void 0?void 0:wn.message)||dt.uploadError,ii=hn==="error"?Ae.createElement(st.Z,{title:ni,getPopupContainer:Lr=>Lr.parentNode},xn):xn;return Ae.createElement("div",{className:N()(`${$e}-list-item-container`,lt),style:yt,ref:it},er?er(ii,at,Nt,{download:Rt.bind(null,at),preview:ar.bind(null,at),remove:_r.bind(null,at)}):ii)});const kt=(He,it)=>{const{listType:$e="text",previewFile:lt=Re,onPreview:yt,onDownload:dt,onRemove:pt,locale:at,iconRender:Nt,isImageUrl:Bt=We,prefixCls:vt,items:or=[],showPreviewIcon:er=!0,showRemoveIcon:Ar=!0,showDownloadIcon:pn=!1,removeIcon:Mr,previewIcon:jr,downloadIcon:Kr,progress:Zr={size:[-1,2],showInfo:!1},appendAction:Nr,appendActionVisible:ar=!0,itemRender:Rt,disabled:_r}=He,xr=(0,T.Z)(),[wn,_n]=Ae.useState(!1);Ae.useEffect(()=>{$e!=="picture"&&$e!=="picture-card"&&$e!=="picture-circle"||(or||[]).forEach(Kt=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(Kt.originFileObj instanceof File||Kt.originFileObj instanceof Blob)||Kt.thumbUrl!==void 0||(Kt.thumbUrl="",lt&&lt(Kt.originFileObj).then(Er=>{Kt.thumbUrl=Er||"",xr()}))})},[$e,or,lt]),Ae.useEffect(()=>{_n(!0)},[]);const hn=(Kt,Er)=>{if(yt)return Er==null||Er.preventDefault(),yt(Kt)},Xn=Kt=>{typeof dt=="function"?dt(Kt):Kt.url&&window.open(Kt.url)},nn=Kt=>{pt==null||pt(Kt)},ri=Kt=>{if(Nt)return Nt(Kt,$e);const Er=Kt.status==="uploading",Gr=Bt&&Bt(Kt)?Ae.createElement($,null):Ae.createElement(ge,null);let rn=Er?Ae.createElement(Ce.Z,null):Ae.createElement(be,null);return $e==="picture"?rn=Er?Ae.createElement(Ce.Z,null):Gr:($e==="picture-card"||$e==="picture-circle")&&(rn=Er?at.uploading:Gr),rn},Kn=(Kt,Er,Gr,rn)=>{const zr={type:"text",size:"small",title:rn,onClick:xn=>{Er(),(0,ne.l$)(Kt)&&Kt.props.onClick&&Kt.props.onClick(xn)},className:`${Gr}-list-item-action`,disabled:_r};if((0,ne.l$)(Kt)){const xn=(0,ne.Tm)(Kt,Object.assign(Object.assign({},Kt.props),{onClick:()=>{}}));return Ae.createElement(he.ZP,Object.assign({},zr,{icon:xn}))}return Ae.createElement(he.ZP,Object.assign({},zr),Ae.createElement("span",null,Kt))};Ae.useImperativeHandle(it,()=>({handlePreview:hn,handleDownload:Xn}));const{getPrefixCls:on}=Ae.useContext(pe.E_),Fr=on("upload",vt),Jn=on(),An=N()(`${Fr}-list`,`${Fr}-list-${$e}`),Rn=(0,Ye.Z)(or.map(Kt=>({key:Kt.uid,file:Kt})));let sn={motionDeadline:2e3,motionName:`${Fr}-${$e==="picture-card"||$e==="picture-circle"?"animate-inline":"animate"}`,keys:Rn,motionAppear:wn};const gn=Ae.useMemo(()=>{const Kt=Object.assign({},(0,z.Z)(Jn));return delete Kt.onAppearEnd,delete Kt.onEnterEnd,delete Kt.onLeaveEnd,Kt},[Jn]);return $e!=="picture-card"&&$e!=="picture-circle"&&(sn=Object.assign(Object.assign({},gn),sn)),Ae.createElement("div",{className:An},Ae.createElement(S.CSSMotionList,Object.assign({},sn,{component:!1}),Kt=>{let{key:Er,file:Gr,className:rn,style:zr}=Kt;return Ae.createElement(Ct,{key:Er,locale:at,prefixCls:Fr,className:rn,style:zr,file:Gr,items:or,progress:Zr,listType:$e,isImgUrl:Bt,showPreviewIcon:er,showRemoveIcon:Ar,showDownloadIcon:pn,removeIcon:Mr,previewIcon:jr,downloadIcon:Kr,iconRender:ri,actionIconRender:Kn,itemRender:Rt,onPreview:hn,onDownload:Xn,onClose:nn})}),Nr&&Ae.createElement(S.default,Object.assign({},sn,{visible:ar,forceRender:!0}),Kt=>{let{className:Er,style:Gr}=Kt;return(0,ne.Tm)(Nr,rn=>({className:N()(rn.className,Er),style:Object.assign(Object.assign(Object.assign({},Gr),{pointerEvents:Er?"none":void 0}),rn.style)}))}))};var _t=Ae.forwardRef(kt),Ot=Se(17313),Ht=Se(8378),Ft=Se(83116),Qt=Se(37613),zt=He=>{const{componentCls:it,iconCls:$e}=He;return{[`${it}-wrapper`]:{[`${it}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:He.colorFillAlter,border:`${He.lineWidth}px dashed ${He.colorBorder}`,borderRadius:He.borderRadiusLG,cursor:"pointer",transition:`border-color ${He.motionDurationSlow}`,[it]:{padding:`${He.padding}px 0`},[`${it}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${it}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${it}-disabled):hover`]:{borderColor:He.colorPrimaryHover},[`p${it}-drag-icon`]:{marginBottom:He.margin,[$e]:{color:He.colorPrimary,fontSize:He.uploadThumbnailSize}},[`p${it}-text`]:{margin:`0 0 ${He.marginXXS}px`,color:He.colorTextHeading,fontSize:He.fontSizeLG},[`p${it}-hint`]:{color:He.colorTextDescription,fontSize:He.fontSize},[`&${it}-disabled`]:{cursor:"not-allowed",[`p${it}-drag-icon ${$e},
p${it}-text,
p${it}-hint
`]:{color:He.colorTextDisabled}}}}}},Jt=He=>{const{componentCls:it,antCls:$e,iconCls:lt,fontSize:yt,lineHeight:dt}=He,pt=`${it}-list-item`,at=`${pt}-actions`,Nt=`${pt}-action`,Bt=Math.round(yt*dt);return{[`${it}-wrapper`]:{[`${it}-list`]:Object.assign(Object.assign({},(0,Ot.dF)()),{lineHeight:He.lineHeight,[pt]:{position:"relative",height:He.lineHeight*yt,marginTop:He.marginXS,fontSize:yt,display:"flex",alignItems:"center",transition:`background-color ${He.motionDurationSlow}`,"&:hover":{backgroundColor:He.controlItemBgHover},[`${pt}-name`]:Object.assign(Object.assign({},Ot.vS),{padding:`0 ${He.paddingXS}px`,lineHeight:dt,flex:"auto",transition:`all ${He.motionDurationSlow}`}),[at]:{[Nt]:{opacity:0},[`${Nt}${$e}-btn-sm`]:{height:Bt,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
${Nt}:focus-visible,
&.picture ${Nt}
`]:{opacity:1},[lt]:{color:He.actionsColor,transition:`all ${He.motionDurationSlow}`},[`&:hover ${lt}`]:{color:He.colorText}},[`${it}-icon ${lt}`]:{color:He.colorTextDescription,fontSize:yt},[`${pt}-progress`]:{position:"absolute",bottom:-He.uploadProgressOffset,width:"100%",paddingInlineStart:yt+He.paddingXS,fontSize:yt,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${pt}:hover ${Nt}`]:{opacity:1,color:He.colorText},[`${pt}-error`]:{color:He.colorError,[`${pt}-name, ${it}-icon ${lt}`]:{color:He.colorError},[at]:{[`${lt}, ${lt}:hover`]:{color:He.colorError},[Nt]:{opacity:1}}},[`${it}-list-item-container`]:{transition:`opacity ${He.motionDurationSlow}, height ${He.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},jt=Se(93083),Ke=Se(1950);const br=new jt.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Xt=new jt.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var Or=He=>{const{componentCls:it}=He,$e=`${it}-animate-inline`;return[{[`${it}-wrapper`]:{[`${$e}-appear, ${$e}-enter, ${$e}-leave`]:{animationDuration:He.motionDurationSlow,animationTimingFunction:He.motionEaseInOutCirc,animationFillMode:"forwards"},[`${$e}-appear, ${$e}-enter`]:{animationName:br},[`${$e}-leave`]:{animationName:Xt}}},{[`${it}-wrapper`]:(0,Ke.J$)(He)},br,Xt]},fn=Se(93398),kr=Se(64993);const Tr=He=>{const{componentCls:it,iconCls:$e,uploadThumbnailSize:lt,uploadProgressOffset:yt}=He,dt=`${it}-list`,pt=`${dt}-item`;return{[`${it}-wrapper`]:{[`
${dt}${dt}-picture,
${dt}${dt}-picture-card,
${dt}${dt}-picture-circle
`]:{[pt]:{position:"relative",height:lt+He.lineWidth*2+He.paddingXS*2,padding:He.paddingXS,border:`${He.lineWidth}px ${He.lineType} ${He.colorBorder}`,borderRadius:He.borderRadiusLG,"&:hover":{background:"transparent"},[`${pt}-thumbnail`]:Object.assign(Object.assign({},Ot.vS),{width:lt,height:lt,lineHeight:`${lt+He.paddingSM}px`,textAlign:"center",flex:"none",[$e]:{fontSize:He.fontSizeHeading2,color:He.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${pt}-progress`]:{bottom:yt,width:`calc(100% - ${He.paddingSM*2}px)`,marginTop:0,paddingInlineStart:lt+He.paddingXS}},[`${pt}-error`]:{borderColor:He.colorError,[`${pt}-thumbnail ${$e}`]:{[`svg path[fill='${fn.blue[0]}']`]:{fill:He.colorErrorBg},[`svg path[fill='${fn.blue.primary}']`]:{fill:He.colorError}}},[`${pt}-uploading`]:{borderStyle:"dashed",[`${pt}-name`]:{marginBottom:yt}}},[`${dt}${dt}-picture-circle ${pt}`]:{[`&, &::before, ${pt}-thumbnail`]:{borderRadius:"50%"}}}}},gr=He=>{const{componentCls:it,iconCls:$e,fontSizeLG:lt,colorTextLightSolid:yt}=He,dt=`${it}-list`,pt=`${dt}-item`,at=He.uploadPicCardSize;return{[`
${it}-wrapper${it}-picture-card-wrapper,
${it}-wrapper${it}-picture-circle-wrapper
`]:Object.assign(Object.assign({},(0,Ot.dF)()),{display:"inline-block",width:"100%",[`${it}${it}-select`]:{width:at,height:at,marginInlineEnd:He.marginXS,marginBottom:He.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:He.colorFillAlter,border:`${He.lineWidth}px dashed ${He.colorBorder}`,borderRadius:He.borderRadiusLG,cursor:"pointer",transition:`border-color ${He.motionDurationSlow}`,[`> ${it}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${it}-disabled):hover`]:{borderColor:He.colorPrimary}},[`${dt}${dt}-picture-card, ${dt}${dt}-picture-circle`]:{[`${dt}-item-container`]:{display:"inline-block",width:at,height:at,marginBlock:`0 ${He.marginXS}px`,marginInline:`0 ${He.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[pt]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${He.paddingXS*2}px)`,height:`calc(100% - ${He.paddingXS*2}px)`,backgroundColor:He.colorBgMask,opacity:0,transition:`all ${He.motionDurationSlow}`,content:'" "'}},[`${pt}:hover`]:{[`&::before, ${pt}-actions`]:{opacity:1}},[`${pt}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${He.motionDurationSlow}`,[`${$e}-eye, ${$e}-download, ${$e}-delete`]:{zIndex:10,width:lt,margin:`0 ${He.marginXXS}px`,fontSize:lt,cursor:"pointer",transition:`all ${He.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${pt}-actions, ${pt}-actions:hover`]:{[`${$e}-eye, ${$e}-download, ${$e}-delete`]:{color:new kr.C(yt).setAlpha(.65).toRgbString(),"&:hover":{color:yt}}},[`${pt}-thumbnail, ${pt}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${pt}-name`]:{display:"none",textAlign:"center"},[`${pt}-file + ${pt}-name`]:{position:"absolute",bottom:He.margin,display:"block",width:`calc(100% - ${He.paddingXS*2}px)`},[`${pt}-uploading`]:{[`&${pt}`]:{backgroundColor:He.colorFillAlter},[`&::before, ${$e}-eye, ${$e}-download, ${$e}-delete`]:{display:"none"}},[`${pt}-progress`]:{bottom:He.marginXL,width:`calc(100% - ${He.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${it}-wrapper${it}-picture-circle-wrapper`]:{[`${it}${it}-select`]:{borderRadius:"50%"}}}};var rr=He=>{const{componentCls:it}=He;return{[`${it}-rtl`]:{direction:"rtl"}}};const Wr=He=>{const{componentCls:it,colorTextDisabled:$e}=He;return{[`${it}-wrapper`]:Object.assign(Object.assign({},(0,Ot.Wf)(He)),{[it]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${it}-select`]:{display:"inline-block"},[`${it}-disabled`]:{color:$e,cursor:"not-allowed"}})}};var qt=(0,Ft.Z)("Upload",He=>{const{fontSizeHeading3:it,fontSize:$e,lineHeight:lt,lineWidth:yt,controlHeightLG:dt}=He,pt=Math.round($e*lt),at=(0,Qt.TS)(He,{uploadThumbnailSize:it*2,uploadProgressOffset:pt/2+yt,uploadPicCardSize:dt*2.55});return[Wr(at),zt(at),Tr(at),gr(at),Jt(at),Or(at),rr(at),(0,Ht.Z)(at)]},He=>({actionsColor:He.colorTextDescription})),$r=function(He,it,$e,lt){function yt(dt){return dt instanceof $e?dt:new $e(function(pt){pt(dt)})}return new($e||($e=Promise))(function(dt,pt){function at(vt){try{Bt(lt.next(vt))}catch(or){pt(or)}}function Nt(vt){try{Bt(lt.throw(vt))}catch(or){pt(or)}}function Bt(vt){vt.done?dt(vt.value):yt(vt.value).then(at,Nt)}Bt((lt=lt.apply(He,it||[])).next())})};const Tn=`__LIST_IGNORE_${Date.now()}__`,Wn=(He,it)=>{const{fileList:$e,defaultFileList:lt,onRemove:yt,showUploadList:dt=!0,listType:pt="text",onPreview:at,onDownload:Nt,onChange:Bt,onDrop:vt,previewFile:or,disabled:er,locale:Ar,iconRender:pn,isImageUrl:Mr,progress:jr,prefixCls:Kr,className:Zr,type:Nr="select",children:ar,style:Rt,itemRender:_r,maxCount:xr,data:wn={},multiple:_n=!1,action:hn="",accept:Xn="",supportServerRender:nn=!0,rootClassName:ri}=He,Kn=Ae.useContext(ie.Z),on=er!=null?er:Kn,[Fr,Jn]=(0,re.Z)(lt||[],{value:$e,postState:gt=>gt!=null?gt:[]}),[An,Rn]=Ae.useState("drop"),an=Ae.useRef(null);Ae.useMemo(()=>{const gt=Date.now();($e||[]).forEach((Yt,Vr)=>{!Yt.uid&&!Object.isFrozen(Yt)&&(Yt.uid=`__AUTO__${gt}_${Vr}__`)})},[$e]);const sn=(gt,Yt,Vr)=>{let cr=(0,Ye.Z)(Yt),Dr=!1;xr===1?cr=cr.slice(-1):xr&&(Dr=cr.length>xr,cr=cr.slice(0,xr)),(0,oe.flushSync)(()=>{Jn(cr)});const En={file:gt,fileList:cr};Vr&&(En.event=Vr),(!Dr||cr.some(pi=>pi.uid===gt.uid))&&(0,oe.flushSync)(()=>{Bt==null||Bt(En)})},gn=(gt,Yt)=>$r(void 0,void 0,void 0,function*(){const{beforeUpload:Vr,transformFile:cr}=He;let Dr=gt;if(Vr){const En=yield Vr(gt,Yt);if(En===!1)return!1;if(delete gt[Tn],En===Tn)return Object.defineProperty(gt,Tn,{value:!0,configurable:!0}),!1;typeof En=="object"&&En&&(Dr=En)}return cr&&(Dr=yield cr(Dr)),Dr}),Kt=gt=>{const Yt=gt.filter(Dr=>!Dr.file[Tn]);if(!Yt.length)return;const Vr=Yt.map(Dr=>Pe(Dr.file));let cr=(0,Ye.Z)(Fr);Vr.forEach(Dr=>{cr=Oe(Dr,cr)}),Vr.forEach((Dr,En)=>{let pi=Dr;if(Yt[En].parsedFile)Dr.status="uploading";else{const{originFileObj:hi}=Dr;let vi;try{vi=new File([hi],hi.name,{type:hi.type})}catch(qn){vi=new Blob([hi],{type:hi.type}),vi.name=hi.name,vi.lastModifiedDate=new Date,vi.lastModified=new Date().getTime()}vi.uid=Dr.uid,pi=vi}sn(pi,cr)})},Er=(gt,Yt,Vr)=>{try{typeof gt=="string"&&(gt=JSON.parse(gt))}catch(En){}if(!Ue(Yt,Fr))return;const cr=Pe(Yt);cr.status="done",cr.percent=100,cr.response=gt,cr.xhr=Vr;const Dr=Oe(cr,Fr);sn(cr,Dr)},Gr=(gt,Yt)=>{if(!Ue(Yt,Fr))return;const Vr=Pe(Yt);Vr.status="uploading",Vr.percent=gt.percent;const cr=Oe(Vr,Fr);sn(Vr,cr,gt)},rn=(gt,Yt,Vr)=>{if(!Ue(Vr,Fr))return;const cr=Pe(Vr);cr.error=gt,cr.response=Yt,cr.status="error";const Dr=Oe(cr,Fr);sn(cr,Dr)},zr=gt=>{let Yt;Promise.resolve(typeof yt=="function"?yt(gt):yt).then(Vr=>{var cr;if(Vr===!1)return;const Dr=nt(gt,Fr);Dr&&(Yt=Object.assign(Object.assign({},gt),{status:"removed"}),Fr==null||Fr.forEach(En=>{const pi=Yt.uid!==void 0?"uid":"name";En[pi]===Yt[pi]&&!Object.isFrozen(En)&&(En.status="removed")}),(cr=an.current)===null||cr===void 0||cr.abort(Yt),sn(Yt,Dr))})},xn=gt=>{Rn(gt.type),gt.type==="drop"&&(vt==null||vt(gt))};Ae.useImperativeHandle(it,()=>({onBatchStart:Kt,onSuccess:Er,onProgress:Gr,onError:rn,fileList:Fr,upload:an.current}));const{getPrefixCls:ni,direction:ii,upload:Lr}=Ae.useContext(pe.E_),Sr=ni("upload",Kr),Hr=Object.assign(Object.assign({onBatchStart:Kt,onError:rn,onProgress:Gr,onSuccess:Er},He),{data:wn,multiple:_n,action:hn,accept:Xn,supportServerRender:nn,prefixCls:Sr,disabled:on,beforeUpload:gn,onChange:void 0});delete Hr.className,delete Hr.style,(!ar||on)&&delete Hr.id;const[bi,oi]=qt(Sr),[Wi]=(0,Ie.Z)("Upload",ee.Z.Upload),{showRemoveIcon:fi,showPreviewIcon:Yn,showDownloadIcon:wi,removeIcon:Gt,previewIcon:zi,downloadIcon:di}=typeof dt=="boolean"?{}:dt,Hi=(gt,Yt)=>dt?Ae.createElement(_t,{prefixCls:Sr,listType:pt,items:Fr,previewFile:or,onPreview:at,onDownload:Nt,onRemove:zr,showRemoveIcon:!on&&fi,showPreviewIcon:Yn,showDownloadIcon:wi,removeIcon:Gt,previewIcon:zi,downloadIcon:di,iconRender:pn,locale:Object.assign(Object.assign({},Wi),Ar),isImageUrl:Mr,progress:jr,appendAction:gt,appendActionVisible:Yt,itemRender:_r,disabled:on}):gt,$n=N()(`${Sr}-wrapper`,Zr,ri,oi,Lr==null?void 0:Lr.className,{[`${Sr}-rtl`]:ii==="rtl",[`${Sr}-picture-card-wrapper`]:pt==="picture-card",[`${Sr}-picture-circle-wrapper`]:pt==="picture-circle"}),Ai=Object.assign(Object.assign({},Lr==null?void 0:Lr.style),Rt);if(Nr==="drag"){const gt=N()(oi,Sr,`${Sr}-drag`,{[`${Sr}-drag-uploading`]:Fr.some(Yt=>Yt.status==="uploading"),[`${Sr}-drag-hover`]:An==="dragover",[`${Sr}-disabled`]:on,[`${Sr}-rtl`]:ii==="rtl"});return bi(Ae.createElement("span",{className:$n},Ae.createElement("div",{className:gt,style:Ai,onDrop:xn,onDragOver:xn,onDragLeave:xn},Ae.createElement(X,Object.assign({},Hr,{ref:an,className:`${Sr}-btn`}),Ae.createElement("div",{className:`${Sr}-drag-container`},ar))),Hi()))}const go=N()(Sr,`${Sr}-select`,{[`${Sr}-disabled`]:on}),yo=(gt=>Ae.createElement("div",{className:go,style:gt},Ae.createElement(X,Object.assign({},Hr,{ref:an}))))(ar?void 0:{display:"none"});return bi(pt==="picture-card"||pt==="picture-circle"?Ae.createElement("span",{className:$n},Hi(yo,!!ar)):Ae.createElement("span",{className:$n},yo,Hi()))};var bn=Ae.forwardRef(Wn),yr=function(He,it){var $e={};for(var lt in He)Object.prototype.hasOwnProperty.call(He,lt)&&it.indexOf(lt)<0&&($e[lt]=He[lt]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,lt=Object.getOwnPropertySymbols(He);yt<lt.length;yt++)it.indexOf(lt[yt])<0&&Object.prototype.propertyIsEnumerable.call(He,lt[yt])&&($e[lt[yt]]=He[lt[yt]]);return $e},tn=Ae.forwardRef((He,it)=>{var{style:$e,height:lt}=He,yt=yr(He,["style","height"]);return Ae.createElement(bn,Object.assign({ref:it},yt,{type:"drag",style:Object.assign(Object.assign({},$e),{height:lt})}))});const dn=bn;dn.Dragger=tn,dn.LIST_IGNORE=Tn;var mn=dn},86251:function(Zt,ut){"use strict";ut.byteLength=c,ut.toByteArray=y,ut.fromByteArray=f;for(var Se=[],Ae=[],Ye=typeof Uint8Array!="undefined"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=0,j=a.length;N<j;++N)Se[N]=a[N],Ae[a.charCodeAt(N)]=N;Ae[45]=62,Ae[95]=63;function p(v){var m=v.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=v.indexOf("=");b===-1&&(b=m);var x=b===m?0:4-b%4;return[b,x]}function c(v){var m=p(v),b=m[0],x=m[1];return(b+x)*3/4-x}function h(v,m,b){return(m+b)*3/4-b}function y(v){var m,b=p(v),x=b[0],R=b[1],I=new Ye(h(v,x,R)),E=0,C=R>0?x-4:x,P;for(P=0;P<C;P+=4)m=Ae[v.charCodeAt(P)]<<18|Ae[v.charCodeAt(P+1)]<<12|Ae[v.charCodeAt(P+2)]<<6|Ae[v.charCodeAt(P+3)],I[E++]=m>>16&255,I[E++]=m>>8&255,I[E++]=m&255;return R===2&&(m=Ae[v.charCodeAt(P)]<<2|Ae[v.charCodeAt(P+1)]>>4,I[E++]=m&255),R===1&&(m=Ae[v.charCodeAt(P)]<<10|Ae[v.charCodeAt(P+1)]<<4|Ae[v.charCodeAt(P+2)]>>2,I[E++]=m>>8&255,I[E++]=m&255),I}function g(v){return Se[v>>18&63]+Se[v>>12&63]+Se[v>>6&63]+Se[v&63]}function w(v,m,b){for(var x,R=[],I=m;I<b;I+=3)x=(v[I]<<16&16711680)+(v[I+1]<<8&65280)+(v[I+2]&255),R.push(g(x));return R.join("")}function f(v){for(var m,b=v.length,x=b%3,R=[],I=16383,E=0,C=b-x;E<C;E+=I)R.push(w(v,E,E+I>C?C:E+I));return x===1?(m=v[b-1],R.push(Se[m>>2]+Se[m<<4&63]+"==")):x===2&&(m=(v[b-2]<<8)+v[b-1],R.push(Se[m>>10]+Se[m>>4&63]+Se[m<<2&63]+"=")),R.join("")}},19208:function(Zt,ut,Se){"use strict";var Ae;var Ye=Se(86251),a=Se(67467),N=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ut.lW=h,Ae=E,ut.h2=50;var j=2147483647;Ae=j,h.TYPED_ARRAY_SUPPORT=p(),!h.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function p(){try{var V=new Uint8Array(1),Q={foo:function(){return 42}};return Object.setPrototypeOf(Q,Uint8Array.prototype),Object.setPrototypeOf(V,Q),V.foo()===42}catch(L){return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function c(V){if(V>j)throw new RangeError('The value "'+V+'" is invalid for option "size"');var Q=new Uint8Array(V);return Object.setPrototypeOf(Q,h.prototype),Q}function h(V,Q,L){if(typeof V=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(V)}return y(V,Q,L)}h.poolSize=8192;function y(V,Q,L){if(typeof V=="string")return v(V,Q);if(ArrayBuffer.isView(V))return b(V);if(V==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof V);if(Y(V,ArrayBuffer)||V&&Y(V.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Y(V,SharedArrayBuffer)||V&&Y(V.buffer,SharedArrayBuffer)))return x(V,Q,L);if(typeof V=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var $=V.valueOf&&V.valueOf();if($!=null&&$!==V)return h.from($,Q,L);var S=R(V);if(S)return S;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof V[Symbol.toPrimitive]=="function")return h.from(V[Symbol.toPrimitive]("string"),Q,L);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof V)}h.from=function(V,Q,L){return y(V,Q,L)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function g(V){if(typeof V!="number")throw new TypeError('"size" argument must be of type number');if(V<0)throw new RangeError('The value "'+V+'" is invalid for option "size"')}function w(V,Q,L){return g(V),V<=0?c(V):Q!==void 0?typeof L=="string"?c(V).fill(Q,L):c(V).fill(Q):c(V)}h.alloc=function(V,Q,L){return w(V,Q,L)};function f(V){return g(V),c(V<0?0:I(V)|0)}h.allocUnsafe=function(V){return f(V)},h.allocUnsafeSlow=function(V){return f(V)};function v(V,Q){if((typeof Q!="string"||Q==="")&&(Q="utf8"),!h.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);var L=C(V,Q)|0,$=c(L),S=$.write(V,Q);return S!==L&&($=$.slice(0,S)),$}function m(V){for(var Q=V.length<0?0:I(V.length)|0,L=c(Q),$=0;$<Q;$+=1)L[$]=V[$]&255;return L}function b(V){if(Y(V,Uint8Array)){var Q=new Uint8Array(V);return x(Q.buffer,Q.byteOffset,Q.byteLength)}return m(V)}function x(V,Q,L){if(Q<0||V.byteLength<Q)throw new RangeError('"offset" is outside of buffer bounds');if(V.byteLength<Q+(L||0))throw new RangeError('"length" is outside of buffer bounds');var $;return Q===void 0&&L===void 0?$=new Uint8Array(V):L===void 0?$=new Uint8Array(V,Q):$=new Uint8Array(V,Q,L),Object.setPrototypeOf($,h.prototype),$}function R(V){if(h.isBuffer(V)){var Q=I(V.length)|0,L=c(Q);return L.length===0||V.copy(L,0,0,Q),L}if(V.length!==void 0)return typeof V.length!="number"||be(V.length)?c(0):m(V);if(V.type==="Buffer"&&Array.isArray(V.data))return m(V.data)}function I(V){if(V>=j)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j.toString(16)+" bytes");return V|0}function E(V){return+V!=V&&(V=0),h.alloc(+V)}h.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==h.prototype},h.compare=function(Q,L){if(Y(Q,Uint8Array)&&(Q=h.from(Q,Q.offset,Q.byteLength)),Y(L,Uint8Array)&&(L=h.from(L,L.offset,L.byteLength)),!h.isBuffer(Q)||!h.isBuffer(L))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===L)return 0;for(var $=Q.length,S=L.length,T=0,z=Math.min($,S);T<z;++T)if(Q[T]!==L[T]){$=Q[T],S=L[T];break}return $<S?-1:S<$?1:0},h.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(Q,L){if(!Array.isArray(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return h.alloc(0);var $;if(L===void 0)for(L=0,$=0;$<Q.length;++$)L+=Q[$].length;var S=h.allocUnsafe(L),T=0;for($=0;$<Q.length;++$){var z=Q[$];if(Y(z,Uint8Array))T+z.length>S.length?h.from(z).copy(S,T):Uint8Array.prototype.set.call(S,z,T);else if(h.isBuffer(z))z.copy(S,T);else throw new TypeError('"list" argument must be an Array of Buffers');T+=z.length}return S};function C(V,Q){if(h.isBuffer(V))return V.length;if(ArrayBuffer.isView(V)||Y(V,ArrayBuffer))return V.byteLength;if(typeof V!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof V);var L=V.length,$=arguments.length>2&&arguments[2]===!0;if(!$&&L===0)return 0;for(var S=!1;;)switch(Q){case"ascii":case"latin1":case"binary":return L;case"utf8":case"utf-8":return ge(V).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L*2;case"hex":return L>>>1;case"base64":return je(V).length;default:if(S)return $?-1:ge(V).length;Q=(""+Q).toLowerCase(),S=!0}}h.byteLength=C;function P(V,Q,L){var $=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((L===void 0||L>this.length)&&(L=this.length),L<=0)||(L>>>=0,Q>>>=0,L<=Q))return"";for(V||(V="utf8");;)switch(V){case"hex":return pe(this,Q,L);case"utf8":case"utf-8":return F(this,Q,L);case"ascii":return re(this,Q,L);case"latin1":case"binary":return oe(this,Q,L);case"base64":return G(this,Q,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,Q,L);default:if($)throw new TypeError("Unknown encoding: "+V);V=(V+"").toLowerCase(),$=!0}}h.prototype._isBuffer=!0;function Z(V,Q,L){var $=V[Q];V[Q]=V[L],V[L]=$}h.prototype.swap16=function(){var Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var L=0;L<Q;L+=2)Z(this,L,L+1);return this},h.prototype.swap32=function(){var Q=this.length;if(Q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var L=0;L<Q;L+=4)Z(this,L,L+3),Z(this,L+1,L+2);return this},h.prototype.swap64=function(){var Q=this.length;if(Q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var L=0;L<Q;L+=8)Z(this,L,L+7),Z(this,L+1,L+6),Z(this,L+2,L+5),Z(this,L+3,L+4);return this},h.prototype.toString=function(){var Q=this.length;return Q===0?"":arguments.length===0?F(this,0,Q):P.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(Q){if(!h.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q?!0:h.compare(this,Q)===0},h.prototype.inspect=function(){var Q="",L=ut.h2;return Q=this.toString("hex",0,L).replace(/(.{2})/g,"$1 ").trim(),this.length>L&&(Q+=" ... "),"<Buffer "+Q+">"},N&&(h.prototype[N]=h.prototype.inspect),h.prototype.compare=function(Q,L,$,S,T){if(Y(Q,Uint8Array)&&(Q=h.from(Q,Q.offset,Q.byteLength)),!h.isBuffer(Q))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if(L===void 0&&(L=0),$===void 0&&($=Q?Q.length:0),S===void 0&&(S=0),T===void 0&&(T=this.length),L<0||$>Q.length||S<0||T>this.length)throw new RangeError("out of range index");if(S>=T&&L>=$)return 0;if(S>=T)return-1;if(L>=$)return 1;if(L>>>=0,$>>>=0,S>>>=0,T>>>=0,this===Q)return 0;for(var z=T-S,ne=$-L,he=Math.min(z,ne),Pe=this.slice(S,T),Oe=Q.slice(L,$),Ue=0;Ue<he;++Ue)if(Pe[Ue]!==Oe[Ue]){z=Pe[Ue],ne=Oe[Ue];break}return z<ne?-1:ne<z?1:0};function M(V,Q,L,$,S){if(V.length===0)return-1;if(typeof L=="string"?($=L,L=0):L>2147483647?L=2147483647:L<-2147483648&&(L=-2147483648),L=+L,be(L)&&(L=S?0:V.length-1),L<0&&(L=V.length+L),L>=V.length){if(S)return-1;L=V.length-1}else if(L<0)if(S)L=0;else return-1;if(typeof Q=="string"&&(Q=h.from(Q,$)),h.isBuffer(Q))return Q.length===0?-1:J(V,Q,L,$,S);if(typeof Q=="number")return Q=Q&255,typeof Uint8Array.prototype.indexOf=="function"?S?Uint8Array.prototype.indexOf.call(V,Q,L):Uint8Array.prototype.lastIndexOf.call(V,Q,L):J(V,[Q],L,$,S);throw new TypeError("val must be string, number or Buffer")}function J(V,Q,L,$,S){var T=1,z=V.length,ne=Q.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(V.length<2||Q.length<2)return-1;T=2,z/=2,ne/=2,L/=2}function he(Qe,rt){return T===1?Qe[rt]:Qe.readUInt16BE(rt*T)}var Pe;if(S){var Oe=-1;for(Pe=L;Pe<z;Pe++)if(he(V,Pe)===he(Q,Oe===-1?0:Pe-Oe)){if(Oe===-1&&(Oe=Pe),Pe-Oe+1===ne)return Oe*T}else Oe!==-1&&(Pe-=Pe-Oe),Oe=-1}else for(L+ne>z&&(L=z-ne),Pe=L;Pe>=0;Pe--){for(var Ue=!0,nt=0;nt<ne;nt++)if(he(V,Pe+nt)!==he(Q,nt)){Ue=!1;break}if(Ue)return Pe}return-1}h.prototype.includes=function(Q,L,$){return this.indexOf(Q,L,$)!==-1},h.prototype.indexOf=function(Q,L,$){return M(this,Q,L,$,!0)},h.prototype.lastIndexOf=function(Q,L,$){return M(this,Q,L,$,!1)};function _(V,Q,L,$){L=Number(L)||0;var S=V.length-L;$?($=Number($),$>S&&($=S)):$=S;var T=Q.length;$>T/2&&($=T/2);for(var z=0;z<$;++z){var ne=parseInt(Q.substr(z*2,2),16);if(be(ne))return z;V[L+z]=ne}return z}function k(V,Q,L,$){return fe(ge(Q,V.length-L),V,L,$)}function B(V,Q,L,$){return fe(Ce(Q),V,L,$)}function U(V,Q,L,$){return fe(je(Q),V,L,$)}function K(V,Q,L,$){return fe(De(Q,V.length-L),V,L,$)}h.prototype.write=function(Q,L,$,S){if(L===void 0)S="utf8",$=this.length,L=0;else if($===void 0&&typeof L=="string")S=L,$=this.length,L=0;else if(isFinite(L))L=L>>>0,isFinite($)?($=$>>>0,S===void 0&&(S="utf8")):(S=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var T=this.length-L;if(($===void 0||$>T)&&($=T),Q.length>0&&($<0||L<0)||L>this.length)throw new RangeError("Attempt to write outside buffer bounds");S||(S="utf8");for(var z=!1;;)switch(S){case"hex":return _(this,Q,L,$);case"utf8":case"utf-8":return k(this,Q,L,$);case"ascii":case"latin1":case"binary":return B(this,Q,L,$);case"base64":return U(this,Q,L,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,Q,L,$);default:if(z)throw new TypeError("Unknown encoding: "+S);S=(""+S).toLowerCase(),z=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function G(V,Q,L){return Q===0&&L===V.length?Ye.fromByteArray(V):Ye.fromByteArray(V.slice(Q,L))}function F(V,Q,L){L=Math.min(V.length,L);for(var $=[],S=Q;S<L;){var T=V[S],z=null,ne=T>239?4:T>223?3:T>191?2:1;if(S+ne<=L){var he,Pe,Oe,Ue;switch(ne){case 1:T<128&&(z=T);break;case 2:he=V[S+1],(he&192)===128&&(Ue=(T&31)<<6|he&63,Ue>127&&(z=Ue));break;case 3:he=V[S+1],Pe=V[S+2],(he&192)===128&&(Pe&192)===128&&(Ue=(T&15)<<12|(he&63)<<6|Pe&63,Ue>2047&&(Ue<55296||Ue>57343)&&(z=Ue));break;case 4:he=V[S+1],Pe=V[S+2],Oe=V[S+3],(he&192)===128&&(Pe&192)===128&&(Oe&192)===128&&(Ue=(T&15)<<18|(he&63)<<12|(Pe&63)<<6|Oe&63,Ue>65535&&Ue<1114112&&(z=Ue))}}z===null?(z=65533,ne=1):z>65535&&(z-=65536,$.push(z>>>10&1023|55296),z=56320|z&1023),$.push(z),S+=ne}return X($)}var W=4096;function X(V){var Q=V.length;if(Q<=W)return String.fromCharCode.apply(String,V);for(var L="",$=0;$<Q;)L+=String.fromCharCode.apply(String,V.slice($,$+=W));return L}function re(V,Q,L){var $="";L=Math.min(V.length,L);for(var S=Q;S<L;++S)$+=String.fromCharCode(V[S]&127);return $}function oe(V,Q,L){var $="";L=Math.min(V.length,L);for(var S=Q;S<L;++S)$+=String.fromCharCode(V[S]);return $}function pe(V,Q,L){var $=V.length;(!Q||Q<0)&&(Q=0),(!L||L<0||L>$)&&(L=$);for(var S="",T=Q;T<L;++T)S+=q[V[T]];return S}function ie(V,Q,L){for(var $=V.slice(Q,L),S="",T=0;T<$.length-1;T+=2)S+=String.fromCharCode($[T]+$[T+1]*256);return S}h.prototype.slice=function(Q,L){var $=this.length;Q=~~Q,L=L===void 0?$:~~L,Q<0?(Q+=$,Q<0&&(Q=0)):Q>$&&(Q=$),L<0?(L+=$,L<0&&(L=0)):L>$&&(L=$),L<Q&&(L=Q);var S=this.subarray(Q,L);return Object.setPrototypeOf(S,h.prototype),S};function Ie(V,Q,L){if(V%1!==0||V<0)throw new RangeError("offset is not uint");if(V+Q>L)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(Q,L,$){Q=Q>>>0,L=L>>>0,$||Ie(Q,L,this.length);for(var S=this[Q],T=1,z=0;++z<L&&(T*=256);)S+=this[Q+z]*T;return S},h.prototype.readUintBE=h.prototype.readUIntBE=function(Q,L,$){Q=Q>>>0,L=L>>>0,$||Ie(Q,L,this.length);for(var S=this[Q+--L],T=1;L>0&&(T*=256);)S+=this[Q+--L]*T;return S},h.prototype.readUint8=h.prototype.readUInt8=function(Q,L){return Q=Q>>>0,L||Ie(Q,1,this.length),this[Q]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(Q,L){return Q=Q>>>0,L||Ie(Q,2,this.length),this[Q]|this[Q+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(Q,L){return Q=Q>>>0,L||Ie(Q,2,this.length),this[Q]<<8|this[Q+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(Q,L){return Q=Q>>>0,L||Ie(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(Q,L){return Q=Q>>>0,L||Ie(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},h.prototype.readIntLE=function(Q,L,$){Q=Q>>>0,L=L>>>0,$||Ie(Q,L,this.length);for(var S=this[Q],T=1,z=0;++z<L&&(T*=256);)S+=this[Q+z]*T;return T*=128,S>=T&&(S-=Math.pow(2,8*L)),S},h.prototype.readIntBE=function(Q,L,$){Q=Q>>>0,L=L>>>0,$||Ie(Q,L,this.length);for(var S=L,T=1,z=this[Q+--S];S>0&&(T*=256);)z+=this[Q+--S]*T;return T*=128,z>=T&&(z-=Math.pow(2,8*L)),z},h.prototype.readInt8=function(Q,L){return Q=Q>>>0,L||Ie(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},h.prototype.readInt16LE=function(Q,L){Q=Q>>>0,L||Ie(Q,2,this.length);var $=this[Q]|this[Q+1]<<8;return $&32768?$|4294901760:$},h.prototype.readInt16BE=function(Q,L){Q=Q>>>0,L||Ie(Q,2,this.length);var $=this[Q+1]|this[Q]<<8;return $&32768?$|4294901760:$},h.prototype.readInt32LE=function(Q,L){return Q=Q>>>0,L||Ie(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},h.prototype.readInt32BE=function(Q,L){return Q=Q>>>0,L||Ie(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},h.prototype.readFloatLE=function(Q,L){return Q=Q>>>0,L||Ie(Q,4,this.length),a.read(this,Q,!0,23,4)},h.prototype.readFloatBE=function(Q,L){return Q=Q>>>0,L||Ie(Q,4,this.length),a.read(this,Q,!1,23,4)},h.prototype.readDoubleLE=function(Q,L){return Q=Q>>>0,L||Ie(Q,8,this.length),a.read(this,Q,!0,52,8)},h.prototype.readDoubleBE=function(Q,L){return Q=Q>>>0,L||Ie(Q,8,this.length),a.read(this,Q,!1,52,8)};function ee(V,Q,L,$,S,T){if(!h.isBuffer(V))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>S||Q<T)throw new RangeError('"value" argument is out of bounds');if(L+$>V.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(Q,L,$,S){if(Q=+Q,L=L>>>0,$=$>>>0,!S){var T=Math.pow(2,8*$)-1;ee(this,Q,L,$,T,0)}var z=1,ne=0;for(this[L]=Q&255;++ne<$&&(z*=256);)this[L+ne]=Q/z&255;return L+$},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(Q,L,$,S){if(Q=+Q,L=L>>>0,$=$>>>0,!S){var T=Math.pow(2,8*$)-1;ee(this,Q,L,$,T,0)}var z=$-1,ne=1;for(this[L+z]=Q&255;--z>=0&&(ne*=256);)this[L+z]=Q/ne&255;return L+$},h.prototype.writeUint8=h.prototype.writeUInt8=function(Q,L,$){return Q=+Q,L=L>>>0,$||ee(this,Q,L,1,255,0),this[L]=Q&255,L+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(Q,L,$){return Q=+Q,L=L>>>0,$||ee(this,Q,L,2,65535,0),this[L]=Q&255,this[L+1]=Q>>>8,L+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(Q,L,$){return Q=+Q,L=L>>>0,$||ee(this,Q,L,2,65535,0),this[L]=Q>>>8,this[L+1]=Q&255,L+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(Q,L,$){return Q=+Q,L=L>>>0,$||ee(this,Q,L,4,4294967295,0),this[L+3]=Q>>>24,this[L+2]=Q>>>16,this[L+1]=Q>>>8,this[L]=Q&255,L+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(Q,L,$){return Q=+Q,L=L>>>0,$||ee(this,Q,L,4,4294967295,0),this[L]=Q>>>24,this[L+1]=Q>>>16,this[L+2]=Q>>>8,this[L+3]=Q&255,L+4},h.prototype.writeIntLE=function(Q,L,$,S){if(Q=+Q,L=L>>>0,!S){var T=Math.pow(2,8*$-1);ee(this,Q,L,$,T-1,-T)}var z=0,ne=1,he=0;for(this[L]=Q&255;++z<$&&(ne*=256);)Q<0&&he===0&&this[L+z-1]!==0&&(he=1),this[L+z]=(Q/ne>>0)-he&255;return L+$},h.prototype.writeIntBE=function(Q,L,$,S){if(Q=+Q,L=L>>>0,!S){var T=Math.pow(2,8*$-1);ee(this,Q,L,$,T-1,-T)}var z=$-1,ne=1,he=0;for(this[L+z]=Q&255;--z>=0&&(ne*=256);)Q<0&&he===0&&this[L+z+1]!==0&&(he=1),this[L+z]=(Q/ne>>0)-he&255;return L+$},h.prototype.writeInt8=function(Q,L,$){return Q=+Q,L=L>>>0,$||ee(this,Q,L,1,127,-128),Q<0&&(Q=255+Q+1),this[L]=Q&255,L+1},h.prototype.writeInt16LE=function(Q,L,$){return Q=+Q,L=L>>>0,$||ee(this,Q,L,2,32767,-32768),this[L]=Q&255,this[L+1]=Q>>>8,L+2},h.prototype.writeInt16BE=function(Q,L,$){return Q=+Q,L=L>>>0,$||ee(this,Q,L,2,32767,-32768),this[L]=Q>>>8,this[L+1]=Q&255,L+2},h.prototype.writeInt32LE=function(Q,L,$){return Q=+Q,L=L>>>0,$||ee(this,Q,L,4,2147483647,-2147483648),this[L]=Q&255,this[L+1]=Q>>>8,this[L+2]=Q>>>16,this[L+3]=Q>>>24,L+4},h.prototype.writeInt32BE=function(Q,L,$){return Q=+Q,L=L>>>0,$||ee(this,Q,L,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),this[L]=Q>>>24,this[L+1]=Q>>>16,this[L+2]=Q>>>8,this[L+3]=Q&255,L+4};function de(V,Q,L,$,S,T){if(L+$>V.length)throw new RangeError("Index out of range");if(L<0)throw new RangeError("Index out of range")}function me(V,Q,L,$,S){return Q=+Q,L=L>>>0,S||de(V,Q,L,4,34028234663852886e22,-34028234663852886e22),a.write(V,Q,L,$,23,4),L+4}h.prototype.writeFloatLE=function(Q,L,$){return me(this,Q,L,!0,$)},h.prototype.writeFloatBE=function(Q,L,$){return me(this,Q,L,!1,$)};function xe(V,Q,L,$,S){return Q=+Q,L=L>>>0,S||de(V,Q,L,8,17976931348623157e292,-17976931348623157e292),a.write(V,Q,L,$,52,8),L+8}h.prototype.writeDoubleLE=function(Q,L,$){return xe(this,Q,L,!0,$)},h.prototype.writeDoubleBE=function(Q,L,$){return xe(this,Q,L,!1,$)},h.prototype.copy=function(Q,L,$,S){if(!h.isBuffer(Q))throw new TypeError("argument should be a Buffer");if($||($=0),!S&&S!==0&&(S=this.length),L>=Q.length&&(L=Q.length),L||(L=0),S>0&&S<$&&(S=$),S===$||Q.length===0||this.length===0)return 0;if(L<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("sourceEnd out of bounds");S>this.length&&(S=this.length),Q.length-L<S-$&&(S=Q.length-L+$);var T=S-$;return this===Q&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(L,$,S):Uint8Array.prototype.set.call(Q,this.subarray($,S),L),T},h.prototype.fill=function(Q,L,$,S){if(typeof Q=="string"){if(typeof L=="string"?(S=L,L=0,$=this.length):typeof $=="string"&&(S=$,$=this.length),S!==void 0&&typeof S!="string")throw new TypeError("encoding must be a string");if(typeof S=="string"&&!h.isEncoding(S))throw new TypeError("Unknown encoding: "+S);if(Q.length===1){var T=Q.charCodeAt(0);(S==="utf8"&&T<128||S==="latin1")&&(Q=T)}}else typeof Q=="number"?Q=Q&255:typeof Q=="boolean"&&(Q=Number(Q));if(L<0||this.length<L||this.length<$)throw new RangeError("Out of range index");if($<=L)return this;L=L>>>0,$=$===void 0?this.length:$>>>0,Q||(Q=0);var z;if(typeof Q=="number")for(z=L;z<$;++z)this[z]=Q;else{var ne=h.isBuffer(Q)?Q:h.from(Q,S),he=ne.length;if(he===0)throw new TypeError('The value "'+Q+'" is invalid for argument "value"');for(z=0;z<$-L;++z)this[z+L]=ne[z%he]}return this};var ce=/[^+/0-9A-Za-z-_]/g;function le(V){if(V=V.split("=")[0],V=V.trim().replace(ce,""),V.length<2)return"";for(;V.length%4!==0;)V=V+"=";return V}function ge(V,Q){Q=Q||1/0;for(var L,$=V.length,S=null,T=[],z=0;z<$;++z){if(L=V.charCodeAt(z),L>55295&&L<57344){if(!S){if(L>56319){(Q-=3)>-1&&T.push(239,191,189);continue}else if(z+1===$){(Q-=3)>-1&&T.push(239,191,189);continue}S=L;continue}if(L<56320){(Q-=3)>-1&&T.push(239,191,189),S=L;continue}L=(S-55296<<10|L-56320)+65536}else S&&(Q-=3)>-1&&T.push(239,191,189);if(S=null,L<128){if((Q-=1)<0)break;T.push(L)}else if(L<2048){if((Q-=2)<0)break;T.push(L>>6|192,L&63|128)}else if(L<65536){if((Q-=3)<0)break;T.push(L>>12|224,L>>6&63|128,L&63|128)}else if(L<1114112){if((Q-=4)<0)break;T.push(L>>18|240,L>>12&63|128,L>>6&63|128,L&63|128)}else throw new Error("Invalid code point")}return T}function Ce(V){for(var Q=[],L=0;L<V.length;++L)Q.push(V.charCodeAt(L)&255);return Q}function De(V,Q){for(var L,$,S,T=[],z=0;z<V.length&&!((Q-=2)<0);++z)L=V.charCodeAt(z),$=L>>8,S=L%256,T.push(S),T.push($);return T}function je(V){return Ye.toByteArray(le(V))}function fe(V,Q,L,$){for(var S=0;S<$&&!(S+L>=Q.length||S>=V.length);++S)Q[S+L]=V[S];return S}function Y(V,Q){return V instanceof Q||V!=null&&V.constructor!=null&&V.constructor.name!=null&&V.constructor.name===Q.name}function be(V){return V!==V}var q=function(){for(var V="0123456789abcdef",Q=new Array(256),L=0;L<16;++L)for(var $=L*16,S=0;S<16;++S)Q[$+S]=V[L]+V[S];return Q}()},67467:function(Zt,ut){ut.read=function(Se,Ae,Ye,a,N){var j,p,c=N*8-a-1,h=(1<<c)-1,y=h>>1,g=-7,w=Ye?N-1:0,f=Ye?-1:1,v=Se[Ae+w];for(w+=f,j=v&(1<<-g)-1,v>>=-g,g+=c;g>0;j=j*256+Se[Ae+w],w+=f,g-=8);for(p=j&(1<<-g)-1,j>>=-g,g+=a;g>0;p=p*256+Se[Ae+w],w+=f,g-=8);if(j===0)j=1-y;else{if(j===h)return p?NaN:(v?-1:1)*(1/0);p=p+Math.pow(2,a),j=j-y}return(v?-1:1)*p*Math.pow(2,j-a)},ut.write=function(Se,Ae,Ye,a,N,j){var p,c,h,y=j*8-N-1,g=(1<<y)-1,w=g>>1,f=N===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=a?0:j-1,m=a?1:-1,b=Ae<0||Ae===0&&1/Ae<0?1:0;for(Ae=Math.abs(Ae),isNaN(Ae)||Ae===1/0?(c=isNaN(Ae)?1:0,p=g):(p=Math.floor(Math.log(Ae)/Math.LN2),Ae*(h=Math.pow(2,-p))<1&&(p--,h*=2),p+w>=1?Ae+=f/h:Ae+=f*Math.pow(2,1-w),Ae*h>=2&&(p++,h/=2),p+w>=g?(c=0,p=g):p+w>=1?(c=(Ae*h-1)*Math.pow(2,N),p=p+w):(c=Ae*Math.pow(2,w-1)*Math.pow(2,N),p=0));N>=8;Se[Ye+v]=c&255,v+=m,c/=256,N-=8);for(p=p<<N|c,y+=N;y>0;Se[Ye+v]=p&255,v+=m,p/=256,y-=8);Se[Ye+v-m]|=b*128}},31193:function(Zt,ut,Se){var Ae=Se(48955);function Ye(a){this.mode=Ae.MODE_8BIT_BYTE,this.data=a}Ye.prototype={getLength:function(a){return this.data.length},write:function(a){for(var N=0;N<this.data.length;N++)a.put(this.data.charCodeAt(N),8)}},Zt.exports=Ye},31144:function(Zt){function ut(){this.buffer=new Array,this.length=0}ut.prototype={get:function(Se){var Ae=Math.floor(Se/8);return(this.buffer[Ae]>>>7-Se%8&1)==1},put:function(Se,Ae){for(var Ye=0;Ye<Ae;Ye++)this.putBit((Se>>>Ae-Ye-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(Se){var Ae=Math.floor(this.length/8);this.buffer.length<=Ae&&this.buffer.push(0),Se&&(this.buffer[Ae]|=128>>>this.length%8),this.length++}},Zt.exports=ut},78485:function(Zt){Zt.exports={L:1,M:0,Q:3,H:2}},13679:function(Zt,ut,Se){var Ae=Se(87532);function Ye(a,N){if(a.length==null)throw new Error(a.length+"/"+N);for(var j=0;j<a.length&&a[j]==0;)j++;this.num=new Array(a.length-j+N);for(var p=0;p<a.length-j;p++)this.num[p]=a[p+j]}Ye.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var N=new Array(this.getLength()+a.getLength()-1),j=0;j<this.getLength();j++)for(var p=0;p<a.getLength();p++)N[j+p]^=Ae.gexp(Ae.glog(this.get(j))+Ae.glog(a.get(p)));return new Ye(N,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var N=Ae.glog(this.get(0))-Ae.glog(a.get(0)),j=new Array(this.getLength()),p=0;p<this.getLength();p++)j[p]=this.get(p);for(var p=0;p<a.getLength();p++)j[p]^=Ae.gexp(Ae.glog(a.get(p))+N);return new Ye(j,0).mod(a)}},Zt.exports=Ye},86397:function(Zt,ut,Se){var Ae=Se(31193),Ye=Se(84590),a=Se(31144),N=Se(28688),j=Se(13679);function p(h,y){this.typeNumber=h,this.errorCorrectLevel=y,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=p.prototype;c.addData=function(h){var y=new Ae(h);this.dataList.push(y),this.dataCache=null},c.isDark=function(h,y){if(h<0||this.moduleCount<=h||y<0||this.moduleCount<=y)throw new Error(h+","+y);return this.modules[h][y]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var h=1;for(h=1;h<40;h++){for(var y=Ye.getRSBlocks(h,this.errorCorrectLevel),g=new a,w=0,f=0;f<y.length;f++)w+=y[f].dataCount;for(var f=0;f<this.dataList.length;f++){var v=this.dataList[f];g.put(v.mode,4),g.put(v.getLength(),N.getLengthInBits(v.mode,h)),v.write(g)}if(g.getLengthInBits()<=w*8)break}this.typeNumber=h}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(h,y){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var g=0;g<this.moduleCount;g++){this.modules[g]=new Array(this.moduleCount);for(var w=0;w<this.moduleCount;w++)this.modules[g][w]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(h,y),this.typeNumber>=7&&this.setupTypeNumber(h),this.dataCache==null&&(this.dataCache=p.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,y)},c.setupPositionProbePattern=function(h,y){for(var g=-1;g<=7;g++)if(!(h+g<=-1||this.moduleCount<=h+g))for(var w=-1;w<=7;w++)y+w<=-1||this.moduleCount<=y+w||(0<=g&&g<=6&&(w==0||w==6)||0<=w&&w<=6&&(g==0||g==6)||2<=g&&g<=4&&2<=w&&w<=4?this.modules[h+g][y+w]=!0:this.modules[h+g][y+w]=!1)},c.getBestMaskPattern=function(){for(var h=0,y=0,g=0;g<8;g++){this.makeImpl(!0,g);var w=N.getLostPoint(this);(g==0||h>w)&&(h=w,y=g)}return y},c.createMovieClip=function(h,y,g){var w=h.createEmptyMovieClip(y,g),f=1;this.make();for(var v=0;v<this.modules.length;v++)for(var m=v*f,b=0;b<this.modules[v].length;b++){var x=b*f,R=this.modules[v][b];R&&(w.beginFill(0,100),w.moveTo(x,m),w.lineTo(x+f,m),w.lineTo(x+f,m+f),w.lineTo(x,m+f),w.endFill())}return w},c.setupTimingPattern=function(){for(var h=8;h<this.moduleCount-8;h++)this.modules[h][6]==null&&(this.modules[h][6]=h%2==0);for(var y=8;y<this.moduleCount-8;y++)this.modules[6][y]==null&&(this.modules[6][y]=y%2==0)},c.setupPositionAdjustPattern=function(){for(var h=N.getPatternPosition(this.typeNumber),y=0;y<h.length;y++)for(var g=0;g<h.length;g++){var w=h[y],f=h[g];if(this.modules[w][f]==null)for(var v=-2;v<=2;v++)for(var m=-2;m<=2;m++)v==-2||v==2||m==-2||m==2||v==0&&m==0?this.modules[w+v][f+m]=!0:this.modules[w+v][f+m]=!1}},c.setupTypeNumber=function(h){for(var y=N.getBCHTypeNumber(this.typeNumber),g=0;g<18;g++){var w=!h&&(y>>g&1)==1;this.modules[Math.floor(g/3)][g%3+this.moduleCount-8-3]=w}for(var g=0;g<18;g++){var w=!h&&(y>>g&1)==1;this.modules[g%3+this.moduleCount-8-3][Math.floor(g/3)]=w}},c.setupTypeInfo=function(h,y){for(var g=this.errorCorrectLevel<<3|y,w=N.getBCHTypeInfo(g),f=0;f<15;f++){var v=!h&&(w>>f&1)==1;f<6?this.modules[f][8]=v:f<8?this.modules[f+1][8]=v:this.modules[this.moduleCount-15+f][8]=v}for(var f=0;f<15;f++){var v=!h&&(w>>f&1)==1;f<8?this.modules[8][this.moduleCount-f-1]=v:f<9?this.modules[8][15-f-1+1]=v:this.modules[8][15-f-1]=v}this.modules[this.moduleCount-8][8]=!h},c.mapData=function(h,y){for(var g=-1,w=this.moduleCount-1,f=7,v=0,m=this.moduleCount-1;m>0;m-=2)for(m==6&&m--;;){for(var b=0;b<2;b++)if(this.modules[w][m-b]==null){var x=!1;v<h.length&&(x=(h[v]>>>f&1)==1);var R=N.getMask(y,w,m-b);R&&(x=!x),this.modules[w][m-b]=x,f--,f==-1&&(v++,f=7)}if(w+=g,w<0||this.moduleCount<=w){w-=g,g=-g;break}}},p.PAD0=236,p.PAD1=17,p.createData=function(h,y,g){for(var w=Ye.getRSBlocks(h,y),f=new a,v=0;v<g.length;v++){var m=g[v];f.put(m.mode,4),f.put(m.getLength(),N.getLengthInBits(m.mode,h)),m.write(f)}for(var b=0,v=0;v<w.length;v++)b+=w[v].dataCount;if(f.getLengthInBits()>b*8)throw new Error("code length overflow. ("+f.getLengthInBits()+">"+b*8+")");for(f.getLengthInBits()+4<=b*8&&f.put(0,4);f.getLengthInBits()%8!=0;)f.putBit(!1);for(;!(f.getLengthInBits()>=b*8||(f.put(p.PAD0,8),f.getLengthInBits()>=b*8));)f.put(p.PAD1,8);return p.createBytes(f,w)},p.createBytes=function(h,y){for(var g=0,w=0,f=0,v=new Array(y.length),m=new Array(y.length),b=0;b<y.length;b++){var x=y[b].dataCount,R=y[b].totalCount-x;w=Math.max(w,x),f=Math.max(f,R),v[b]=new Array(x);for(var I=0;I<v[b].length;I++)v[b][I]=255&h.buffer[I+g];g+=x;var E=N.getErrorCorrectPolynomial(R),C=new j(v[b],E.getLength()-1),P=C.mod(E);m[b]=new Array(E.getLength()-1);for(var I=0;I<m[b].length;I++){var Z=I+P.getLength()-m[b].length;m[b][I]=Z>=0?P.get(Z):0}}for(var M=0,I=0;I<y.length;I++)M+=y[I].totalCount;for(var J=new Array(M),_=0,I=0;I<w;I++)for(var b=0;b<y.length;b++)I<v[b].length&&(J[_++]=v[b][I]);for(var I=0;I<f;I++)for(var b=0;b<y.length;b++)I<m[b].length&&(J[_++]=m[b][I]);return J},Zt.exports=p},84590:function(Zt,ut,Se){var Ae=Se(78485);function Ye(a,N){this.totalCount=a,this.dataCount=N}Ye.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],Ye.getRSBlocks=function(a,N){var j=Ye.getRsBlockTable(a,N);if(j==null)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+N);for(var p=j.length/3,c=new Array,h=0;h<p;h++)for(var y=j[h*3+0],g=j[h*3+1],w=j[h*3+2],f=0;f<y;f++)c.push(new Ye(g,w));return c},Ye.getRsBlockTable=function(a,N){switch(N){case Ae.L:return Ye.RS_BLOCK_TABLE[(a-1)*4+0];case Ae.M:return Ye.RS_BLOCK_TABLE[(a-1)*4+1];case Ae.Q:return Ye.RS_BLOCK_TABLE[(a-1)*4+2];case Ae.H:return Ye.RS_BLOCK_TABLE[(a-1)*4+3];default:return}},Zt.exports=Ye},87532:function(Zt){for(var ut={glog:function(Ae){if(Ae<1)throw new Error("glog("+Ae+")");return ut.LOG_TABLE[Ae]},gexp:function(Ae){for(;Ae<0;)Ae+=255;for(;Ae>=256;)Ae-=255;return ut.EXP_TABLE[Ae]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},Se=0;Se<8;Se++)ut.EXP_TABLE[Se]=1<<Se;for(var Se=8;Se<256;Se++)ut.EXP_TABLE[Se]=ut.EXP_TABLE[Se-4]^ut.EXP_TABLE[Se-5]^ut.EXP_TABLE[Se-6]^ut.EXP_TABLE[Se-8];for(var Se=0;Se<255;Se++)ut.LOG_TABLE[ut.EXP_TABLE[Se]]=Se;Zt.exports=ut},48955:function(Zt){Zt.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},28688:function(Zt,ut,Se){var Ae=Se(48955),Ye=Se(13679),a=Se(87532),N={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},j={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(p){for(var c=p<<10;j.getBCHDigit(c)-j.getBCHDigit(j.G15)>=0;)c^=j.G15<<j.getBCHDigit(c)-j.getBCHDigit(j.G15);return(p<<10|c)^j.G15_MASK},getBCHTypeNumber:function(p){for(var c=p<<12;j.getBCHDigit(c)-j.getBCHDigit(j.G18)>=0;)c^=j.G18<<j.getBCHDigit(c)-j.getBCHDigit(j.G18);return p<<12|c},getBCHDigit:function(p){for(var c=0;p!=0;)c++,p>>>=1;return c},getPatternPosition:function(p){return j.PATTERN_POSITION_TABLE[p-1]},getMask:function(p,c,h){switch(p){case N.PATTERN000:return(c+h)%2==0;case N.PATTERN001:return c%2==0;case N.PATTERN010:return h%3==0;case N.PATTERN011:return(c+h)%3==0;case N.PATTERN100:return(Math.floor(c/2)+Math.floor(h/3))%2==0;case N.PATTERN101:return c*h%2+c*h%3==0;case N.PATTERN110:return(c*h%2+c*h%3)%2==0;case N.PATTERN111:return(c*h%3+(c+h)%2)%2==0;default:throw new Error("bad maskPattern:"+p)}},getErrorCorrectPolynomial:function(p){for(var c=new Ye([1],0),h=0;h<p;h++)c=c.multiply(new Ye([1,a.gexp(h)],0));return c},getLengthInBits:function(p,c){if(1<=c&&c<10)switch(p){case Ae.MODE_NUMBER:return 10;case Ae.MODE_ALPHA_NUM:return 9;case Ae.MODE_8BIT_BYTE:return 8;case Ae.MODE_KANJI:return 8;default:throw new Error("mode:"+p)}else if(c<27)switch(p){case Ae.MODE_NUMBER:return 12;case Ae.MODE_ALPHA_NUM:return 11;case Ae.MODE_8BIT_BYTE:return 16;case Ae.MODE_KANJI:return 10;default:throw new Error("mode:"+p)}else if(c<41)switch(p){case Ae.MODE_NUMBER:return 14;case Ae.MODE_ALPHA_NUM:return 13;case Ae.MODE_8BIT_BYTE:return 16;case Ae.MODE_KANJI:return 12;default:throw new Error("mode:"+p)}else throw new Error("type:"+c)},getLostPoint:function(p){for(var c=p.getModuleCount(),h=0,y=0;y<c;y++)for(var g=0;g<c;g++){for(var w=0,f=p.isDark(y,g),v=-1;v<=1;v++)if(!(y+v<0||c<=y+v))for(var m=-1;m<=1;m++)g+m<0||c<=g+m||v==0&&m==0||f==p.isDark(y+v,g+m)&&w++;w>5&&(h+=3+w-5)}for(var y=0;y<c-1;y++)for(var g=0;g<c-1;g++){var b=0;p.isDark(y,g)&&b++,p.isDark(y+1,g)&&b++,p.isDark(y,g+1)&&b++,p.isDark(y+1,g+1)&&b++,(b==0||b==4)&&(h+=3)}for(var y=0;y<c;y++)for(var g=0;g<c-6;g++)p.isDark(y,g)&&!p.isDark(y,g+1)&&p.isDark(y,g+2)&&p.isDark(y,g+3)&&p.isDark(y,g+4)&&!p.isDark(y,g+5)&&p.isDark(y,g+6)&&(h+=40);for(var g=0;g<c;g++)for(var y=0;y<c-6;y++)p.isDark(y,g)&&!p.isDark(y+1,g)&&p.isDark(y+2,g)&&p.isDark(y+3,g)&&p.isDark(y+4,g)&&!p.isDark(y+5,g)&&p.isDark(y+6,g)&&(h+=40);for(var x=0,g=0;g<c;g++)for(var y=0;y<c;y++)p.isDark(y,g)&&x++;var R=Math.abs(100*x/c/c-50)/5;return h+=R*10,h}};Zt.exports=j},15845:function(Zt,ut,Se){"use strict";function Ae(W){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ae=function(re){return typeof re}:Ae=function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},Ae(W)}function Ye(){return Ye=Object.assign||function(W){for(var X=1;X<arguments.length;X++){var re=arguments[X];for(var oe in re)Object.prototype.hasOwnProperty.call(re,oe)&&(W[oe]=re[oe])}return W},Ye.apply(this,arguments)}function a(W,X){var re=Object.keys(W);if(Object.getOwnPropertySymbols){var oe=Object.getOwnPropertySymbols(W);X&&(oe=oe.filter(function(pe){return Object.getOwnPropertyDescriptor(W,pe).enumerable})),re.push.apply(re,oe)}return re}function N(W){for(var X=1;X<arguments.length;X++){var re=arguments[X]!=null?arguments[X]:{};X%2?a(re,!0).forEach(function(oe){b(W,oe,re[oe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(re)):a(re).forEach(function(oe){Object.defineProperty(W,oe,Object.getOwnPropertyDescriptor(re,oe))})}return W}function j(W,X){if(W==null)return{};var re=p(W,X),oe,pe;if(Object.getOwnPropertySymbols){var ie=Object.getOwnPropertySymbols(W);for(pe=0;pe<ie.length;pe++)oe=ie[pe],!(X.indexOf(oe)>=0)&&Object.prototype.propertyIsEnumerable.call(W,oe)&&(re[oe]=W[oe])}return re}function p(W,X){if(W==null)return{};var re={},oe=Object.keys(W),pe,ie;for(ie=0;ie<oe.length;ie++)pe=oe[ie],!(X.indexOf(pe)>=0)&&(re[pe]=W[pe]);return re}function c(W,X){if(!(W instanceof X))throw new TypeError("Cannot call a class as a function")}function h(W,X){for(var re=0;re<X.length;re++){var oe=X[re];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(W,oe.key,oe)}}function y(W,X,re){return X&&h(W.prototype,X),re&&h(W,re),W}function g(W,X){return X&&(Ae(X)==="object"||typeof X=="function")?X:f(W)}function w(W){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(re){return re.__proto__||Object.getPrototypeOf(re)},w(W)}function f(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function v(W,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(X&&X.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),X&&m(W,X)}function m(W,X){return m=Object.setPrototypeOf||function(oe,pe){return oe.__proto__=pe,oe},m(W,X)}function b(W,X,re){return X in W?Object.defineProperty(W,X,{value:re,enumerable:!0,configurable:!0,writable:!0}):W[X]=re,W}var x=Se(59301),R=Se(12708),I=Se(86397),E=Se(78485);function C(W){for(var X="",re=0;re<W.length;re++){var oe=W.charCodeAt(re);oe<128?X+=String.fromCharCode(oe):oe<2048?(X+=String.fromCharCode(192|oe>>6),X+=String.fromCharCode(128|oe&63)):oe<55296||oe>=57344?(X+=String.fromCharCode(224|oe>>12),X+=String.fromCharCode(128|oe>>6&63),X+=String.fromCharCode(128|oe&63)):(re++,oe=65536+((oe&1023)<<10|W.charCodeAt(re)&1023),X+=String.fromCharCode(240|oe>>18),X+=String.fromCharCode(128|oe>>12&63),X+=String.fromCharCode(128|oe>>6&63),X+=String.fromCharCode(128|oe&63))}return X}var P={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},Z={},M=4,J=.1;function _(W){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,re=[];return W.forEach(function(oe,pe){var ie=null;oe.forEach(function(Ie,ee){if(!Ie&&ie!==null){re.push("M".concat(ie+X," ").concat(pe+X,"h").concat(ee-ie,"v1H").concat(ie+X,"z")),ie=null;return}if(ee===oe.length-1){if(!Ie)return;ie===null?re.push("M".concat(ee+X,",").concat(pe+X," h1v1H").concat(ee+X,"z")):re.push("M".concat(ie+X,",").concat(pe+X," h").concat(ee+1-ie,"v1H").concat(ie+X,"z"));return}Ie&&ie===null&&(ie=ee)})}),re.join("")}function k(W,X){return W.slice().map(function(re,oe){return oe<X.y||oe>=X.y+X.h?re:re.map(function(pe,ie){return ie<X.x||ie>=X.x+X.w?pe:!1})})}function B(W,X){var re=W.imageSettings,oe=W.size,pe=W.includeMargin;if(re==null)return null;var ie=pe?M:0,Ie=X.length+ie*2,ee=Math.floor(oe*J),de=Ie/oe,me=(re.width||ee)*de,xe=(re.height||ee)*de,ce=re.x==null?X.length/2-me/2:re.x*de,le=re.y==null?X.length/2-xe/2:re.y*de,ge=null;if(re.excavate){var Ce=Math.floor(ce),De=Math.floor(le),je=Math.ceil(me+ce-Ce),fe=Math.ceil(xe+le-De);ge={x:Ce,y:De,w:je,h:fe}}return{x:ce,y:le,h:xe,w:me,excavation:ge}}var U=function(){try{new Path2D().addPath(new Path2D)}catch(W){return!1}return!0}(),K=function(W){v(X,W);function X(){var re,oe;c(this,X);for(var pe=arguments.length,ie=new Array(pe),Ie=0;Ie<pe;Ie++)ie[Ie]=arguments[Ie];return oe=g(this,(re=w(X)).call.apply(re,[this].concat(ie))),b(f(oe),"_canvas",void 0),b(f(oe),"_image",void 0),b(f(oe),"state",{imgLoaded:!1}),b(f(oe),"handleImageLoad",function(){oe.setState({imgLoaded:!0})}),oe}return y(X,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var oe=this.props,pe=oe.value,ie=oe.size,Ie=oe.level,ee=oe.bgColor,de=oe.fgColor,me=oe.includeMargin,xe=oe.imageSettings,ce=new I(-1,E[Ie]);if(ce.addData(C(pe)),ce.make(),this._canvas!=null){var le=this._canvas,ge=le.getContext("2d");if(!ge)return;var Ce=ce.modules;if(Ce===null)return;var De=me?M:0,je=Ce.length+De*2,fe=B(this.props,Ce);xe!=null&&fe!=null&&fe.excavation!=null&&(Ce=k(Ce,fe.excavation));var Y=window.devicePixelRatio||1;le.height=le.width=ie*Y;var be=ie/je*Y;ge.scale(be,be),ge.fillStyle=ee,ge.fillRect(0,0,je,je),ge.fillStyle=de,U?ge.fill(new Path2D(_(Ce,De))):Ce.forEach(function(q,V){q.forEach(function(Q,L){Q&&ge.fillRect(L+De,V+De,1,1)})}),this.state.imgLoaded&&this._image&&fe!=null&&ge.drawImage(this._image,fe.x+De,fe.y+De,fe.w,fe.h)}}},{key:"render",value:function(){var oe=this,pe=this.props,ie=pe.value,Ie=pe.size,ee=pe.level,de=pe.bgColor,me=pe.fgColor,xe=pe.style,ce=pe.includeMargin,le=pe.imageSettings,ge=j(pe,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),Ce=N({height:Ie,width:Ie},xe),De=null,je=le&&le.src;return le!=null&&je!=null&&(De=x.createElement("img",{src:je,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(Y){return oe._image=Y}})),x.createElement(x.Fragment,null,x.createElement("canvas",Ye({style:Ce,height:Ie,width:Ie,ref:function(Y){return oe._canvas=Y}},ge)),De)}}]),X}(x.PureComponent);b(K,"defaultProps",P);var G=function(W){v(X,W);function X(){return c(this,X),g(this,w(X).apply(this,arguments))}return y(X,[{key:"render",value:function(){var oe=this.props,pe=oe.value,ie=oe.size,Ie=oe.level,ee=oe.bgColor,de=oe.fgColor,me=oe.includeMargin,xe=oe.imageSettings,ce=j(oe,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),le=new I(-1,E[Ie]);le.addData(C(pe)),le.make();var ge=le.modules;if(ge===null)return null;var Ce=me?M:0,De=ge.length+Ce*2,je=B(this.props,ge),fe=null;xe!=null&&je!=null&&(je.excavation!=null&&(ge=k(ge,je.excavation)),fe=x.createElement("image",{xlinkHref:xe.src,height:je.h,width:je.w,x:je.x+Ce,y:je.y+Ce,preserveAspectRatio:"none"}));var Y=_(ge,Ce);return x.createElement("svg",Ye({shapeRendering:"crispEdges",height:ie,width:ie,viewBox:"0 0 ".concat(De," ").concat(De)},ce),x.createElement("path",{fill:ee,d:"M0,0 h".concat(De,"v").concat(De,"H0z")}),x.createElement("path",{fill:de,d:Y}),fe)}}]),X}(x.PureComponent);b(G,"defaultProps",P);var F=function(X){var re=X.renderAs,oe=j(X,["renderAs"]),pe=re==="svg"?G:K;return x.createElement(pe,oe)};F.defaultProps=N({renderAs:"canvas"},P),Zt.exports=F},29301:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return G}});var Ae=Se(96663),Ye=Se(59301),a=Se(11592),N=Se(48736),j=Se(44127),p=Se(20135),c=Se(76846),h=Se(8654),y=Ye.createContext(null);function g(F){var W=F.children,X=F.onBatchResize,re=Ye.useRef(0),oe=Ye.useRef([]),pe=Ye.useContext(y),ie=Ye.useCallback(function(Ie,ee,de){re.current+=1;var me=re.current;oe.current.push({size:Ie,element:ee,data:de}),Promise.resolve().then(function(){me===re.current&&(X==null||X(oe.current),oe.current=[])}),pe==null||pe(Ie,ee,de)},[X,pe]);return Ye.createElement(y.Provider,{value:ie},W)}var w=Se(76374),f=new Map;function v(F){F.forEach(function(W){var X,re=W.target;(X=f.get(re))===null||X===void 0||X.forEach(function(oe){return oe(re)})})}var m=new w.Z(v),b=null,x=null;function R(F,W){f.has(F)||(f.set(F,new Set),m.observe(F)),f.get(F).add(W)}function I(F,W){f.has(F)&&(f.get(F).delete(W),f.get(F).size||(m.unobserve(F),f.delete(F)))}var E=Se(52884),C=Se(95727),P=Se(65711),Z=Se(85745),M=function(F){(0,P.Z)(X,F);var W=(0,Z.Z)(X);function X(){return(0,E.Z)(this,X),W.apply(this,arguments)}return(0,C.Z)(X,[{key:"render",value:function(){return this.props.children}}]),X}(Ye.Component);function J(F,W){var X=F.children,re=F.disabled,oe=Ye.useRef(null),pe=Ye.useRef(null),ie=Ye.useContext(y),Ie=typeof X=="function",ee=Ie?X(oe):X,de=Ye.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),me=!Ie&&Ye.isValidElement(ee)&&(0,h.Yr)(ee),xe=me?(0,h.C4)(ee):null,ce=(0,h.x1)(xe,oe),le=function(){var je;return(0,c.ZP)(oe.current)||(oe.current&&(0,p.Z)(oe.current)==="object"?(0,c.ZP)((je=oe.current)===null||je===void 0?void 0:je.nativeElement):null)||(0,c.ZP)(pe.current)};Ye.useImperativeHandle(W,function(){return le()});var ge=Ye.useRef(F);ge.current=F;var Ce=Ye.useCallback(function(De){var je=ge.current,fe=je.onResize,Y=je.data,be=De.getBoundingClientRect(),q=be.width,V=be.height,Q=De.offsetWidth,L=De.offsetHeight,$=Math.floor(q),S=Math.floor(V);if(de.current.width!==$||de.current.height!==S||de.current.offsetWidth!==Q||de.current.offsetHeight!==L){var T={width:$,height:S,offsetWidth:Q,offsetHeight:L};de.current=T;var z=Q===Math.round(q)?q:Q,ne=L===Math.round(V)?V:L,he=(0,j.Z)((0,j.Z)({},T),{},{offsetWidth:z,offsetHeight:ne});ie==null||ie(he,De,Y),fe&&Promise.resolve().then(function(){fe(he,De)})}},[]);return Ye.useEffect(function(){var De=le();return De&&!re&&R(De,Ce),function(){return I(De,Ce)}},[oe.current,re]),Ye.createElement(M,{ref:pe},me?Ye.cloneElement(ee,{ref:ce}):ee)}var _=Ye.forwardRef(J),k=_,B="rc-observer-key";function U(F,W){var X=F.children,re=typeof X=="function"?[X]:(0,a.Z)(X);return re.map(function(oe,pe){var ie=(oe==null?void 0:oe.key)||"".concat(B,"-").concat(pe);return Ye.createElement(k,(0,Ae.Z)({},F,{key:ie,ref:pe===0?W:void 0}),oe)})}var K=Ye.forwardRef(U);K.Collection=g;var G=K},55477:function(Zt,ut,Se){"use strict";Se.d(ut,{G:function(){return v},Z:function(){return R}});var Ae=Se(96663),Ye=Se(44127),a=Se(6620),N=Se(35593),j=Se(59301),p={shiftX:64,adjustY:1},c={adjustX:1,shiftY:!0},h=[0,0],y={left:{points:["cr","cl"],overflow:c,offset:[-4,0],targetOffset:h},right:{points:["cl","cr"],overflow:c,offset:[4,0],targetOffset:h},top:{points:["bc","tc"],overflow:p,offset:[0,-4],targetOffset:h},bottom:{points:["tc","bc"],overflow:p,offset:[0,4],targetOffset:h},topLeft:{points:["bl","tl"],overflow:p,offset:[0,-4],targetOffset:h},leftTop:{points:["tr","tl"],overflow:c,offset:[-4,0],targetOffset:h},topRight:{points:["br","tr"],overflow:p,offset:[0,-4],targetOffset:h},rightTop:{points:["tl","tr"],overflow:c,offset:[4,0],targetOffset:h},bottomRight:{points:["tr","br"],overflow:p,offset:[0,4],targetOffset:h},rightBottom:{points:["bl","br"],overflow:c,offset:[4,0],targetOffset:h},bottomLeft:{points:["tl","bl"],overflow:p,offset:[0,4],targetOffset:h},leftBottom:{points:["br","bl"],overflow:c,offset:[-4,0],targetOffset:h}},g=null,w=Se(92310),f=Se.n(w);function v(I){var E=I.children,C=I.prefixCls,P=I.id,Z=I.overlayInnerStyle,M=I.className,J=I.style;return j.createElement("div",{className:f()("".concat(C,"-content"),M),style:J},j.createElement("div",{className:"".concat(C,"-inner"),id:P,role:"tooltip",style:Z},typeof E=="function"?E():E))}var m=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],b=function(E,C){var P=E.overlayClassName,Z=E.trigger,M=Z===void 0?["hover"]:Z,J=E.mouseEnterDelay,_=J===void 0?0:J,k=E.mouseLeaveDelay,B=k===void 0?.1:k,U=E.overlayStyle,K=E.prefixCls,G=K===void 0?"rc-tooltip":K,F=E.children,W=E.onVisibleChange,X=E.afterVisibleChange,re=E.transitionName,oe=E.animation,pe=E.motion,ie=E.placement,Ie=ie===void 0?"right":ie,ee=E.align,de=ee===void 0?{}:ee,me=E.destroyTooltipOnHide,xe=me===void 0?!1:me,ce=E.defaultVisible,le=E.getTooltipContainer,ge=E.overlayInnerStyle,Ce=E.arrowContent,De=E.overlay,je=E.id,fe=E.showArrow,Y=fe===void 0?!0:fe,be=(0,a.Z)(E,m),q=(0,j.useRef)(null);(0,j.useImperativeHandle)(C,function(){return q.current});var V=(0,Ye.Z)({},be);"visible"in E&&(V.popupVisible=E.visible);var Q=function(){return j.createElement(v,{key:"content",prefixCls:G,id:je,overlayInnerStyle:ge},De)};return j.createElement(N.Z,(0,Ae.Z)({popupClassName:P,prefixCls:G,popup:Q,action:M,builtinPlacements:y,popupPlacement:Ie,ref:q,popupAlign:de,getPopupContainer:le,onPopupVisibleChange:W,afterPopupVisibleChange:X,popupTransitionName:re,popupAnimation:oe,popupMotion:pe,defaultPopupVisible:ce,autoDestroy:xe,mouseLeaveDelay:B,popupStyle:U,mouseEnterDelay:_,arrow:Y},V),F)},x=(0,j.forwardRef)(b),R=x},49658:function(Zt,ut){"use strict";ut.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Se=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Se)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Se==null?void 0:Se.substr(0,4))}},76374:function(Zt,ut,Se){"use strict";var Ae=function(){if(typeof Map!="undefined")return Map;function G(F,W){var X=-1;return F.some(function(re,oe){return re[0]===W?(X=oe,!0):!1}),X}return function(){function F(){this.__entries__=[]}return Object.defineProperty(F.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),F.prototype.get=function(W){var X=G(this.__entries__,W),re=this.__entries__[X];return re&&re[1]},F.prototype.set=function(W,X){var re=G(this.__entries__,W);~re?this.__entries__[re][1]=X:this.__entries__.push([W,X])},F.prototype.delete=function(W){var X=this.__entries__,re=G(X,W);~re&&X.splice(re,1)},F.prototype.has=function(W){return!!~G(this.__entries__,W)},F.prototype.clear=function(){this.__entries__.splice(0)},F.prototype.forEach=function(W,X){X===void 0&&(X=null);for(var re=0,oe=this.__entries__;re<oe.length;re++){var pe=oe[re];W.call(X,pe[1],pe[0])}},F}()}(),Ye=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,a=function(){return typeof Se.g!="undefined"&&Se.g.Math===Math?Se.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),N=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(a):function(G){return setTimeout(function(){return G(Date.now())},1e3/60)}}(),j=2;function p(G,F){var W=!1,X=!1,re=0;function oe(){W&&(W=!1,G()),X&&ie()}function pe(){N(oe)}function ie(){var Ie=Date.now();if(W){if(Ie-re<j)return;X=!0}else W=!0,X=!1,setTimeout(pe,F);re=Ie}return ie}var c=20,h=["top","right","bottom","left","width","height","size","weight"],y=typeof MutationObserver!="undefined",g=function(){function G(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=p(this.refresh.bind(this),c)}return G.prototype.addObserver=function(F){~this.observers_.indexOf(F)||this.observers_.push(F),this.connected_||this.connect_()},G.prototype.removeObserver=function(F){var W=this.observers_,X=W.indexOf(F);~X&&W.splice(X,1),!W.length&&this.connected_&&this.disconnect_()},G.prototype.refresh=function(){var F=this.updateObservers_();F&&this.refresh()},G.prototype.updateObservers_=function(){var F=this.observers_.filter(function(W){return W.gatherActive(),W.hasActive()});return F.forEach(function(W){return W.broadcastActive()}),F.length>0},G.prototype.connect_=function(){!Ye||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),y?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},G.prototype.disconnect_=function(){!Ye||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},G.prototype.onTransitionEnd_=function(F){var W=F.propertyName,X=W===void 0?"":W,re=h.some(function(oe){return!!~X.indexOf(oe)});re&&this.refresh()},G.getInstance=function(){return this.instance_||(this.instance_=new G),this.instance_},G.instance_=null,G}(),w=function(G,F){for(var W=0,X=Object.keys(F);W<X.length;W++){var re=X[W];Object.defineProperty(G,re,{value:F[re],enumerable:!1,writable:!1,configurable:!0})}return G},f=function(G){var F=G&&G.ownerDocument&&G.ownerDocument.defaultView;return F||a},v=M(0,0,0,0);function m(G){return parseFloat(G)||0}function b(G){for(var F=[],W=1;W<arguments.length;W++)F[W-1]=arguments[W];return F.reduce(function(X,re){var oe=G["border-"+re+"-width"];return X+m(oe)},0)}function x(G){for(var F=["top","right","bottom","left"],W={},X=0,re=F;X<re.length;X++){var oe=re[X],pe=G["padding-"+oe];W[oe]=m(pe)}return W}function R(G){var F=G.getBBox();return M(0,0,F.width,F.height)}function I(G){var F=G.clientWidth,W=G.clientHeight;if(!F&&!W)return v;var X=f(G).getComputedStyle(G),re=x(X),oe=re.left+re.right,pe=re.top+re.bottom,ie=m(X.width),Ie=m(X.height);if(X.boxSizing==="border-box"&&(Math.round(ie+oe)!==F&&(ie-=b(X,"left","right")+oe),Math.round(Ie+pe)!==W&&(Ie-=b(X,"top","bottom")+pe)),!C(G)){var ee=Math.round(ie+oe)-F,de=Math.round(Ie+pe)-W;Math.abs(ee)!==1&&(ie-=ee),Math.abs(de)!==1&&(Ie-=de)}return M(re.left,re.top,ie,Ie)}var E=function(){return typeof SVGGraphicsElement!="undefined"?function(G){return G instanceof f(G).SVGGraphicsElement}:function(G){return G instanceof f(G).SVGElement&&typeof G.getBBox=="function"}}();function C(G){return G===f(G).document.documentElement}function P(G){return Ye?E(G)?R(G):I(G):v}function Z(G){var F=G.x,W=G.y,X=G.width,re=G.height,oe=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,pe=Object.create(oe.prototype);return w(pe,{x:F,y:W,width:X,height:re,top:W,right:F+X,bottom:re+W,left:F}),pe}function M(G,F,W,X){return{x:G,y:F,width:W,height:X}}var J=function(){function G(F){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=M(0,0,0,0),this.target=F}return G.prototype.isActive=function(){var F=P(this.target);return this.contentRect_=F,F.width!==this.broadcastWidth||F.height!==this.broadcastHeight},G.prototype.broadcastRect=function(){var F=this.contentRect_;return this.broadcastWidth=F.width,this.broadcastHeight=F.height,F},G}(),_=function(){function G(F,W){var X=Z(W);w(this,{target:F,contentRect:X})}return G}(),k=function(){function G(F,W,X){if(this.activeObservations_=[],this.observations_=new Ae,typeof F!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=F,this.controller_=W,this.callbackCtx_=X}return G.prototype.observe=function(F){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(F instanceof f(F).Element))throw new TypeError('parameter 1 is not of type "Element".');var W=this.observations_;W.has(F)||(W.set(F,new J(F)),this.controller_.addObserver(this),this.controller_.refresh())}},G.prototype.unobserve=function(F){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(F instanceof f(F).Element))throw new TypeError('parameter 1 is not of type "Element".');var W=this.observations_;W.has(F)&&(W.delete(F),W.size||this.controller_.removeObserver(this))}},G.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},G.prototype.gatherActive=function(){var F=this;this.clearActive(),this.observations_.forEach(function(W){W.isActive()&&F.activeObservations_.push(W)})},G.prototype.broadcastActive=function(){if(this.hasActive()){var F=this.callbackCtx_,W=this.activeObservations_.map(function(X){return new _(X.target,X.broadcastRect())});this.callback_.call(F,W,F),this.clearActive()}},G.prototype.clearActive=function(){this.activeObservations_.splice(0)},G.prototype.hasActive=function(){return this.activeObservations_.length>0},G}(),B=typeof WeakMap!="undefined"?new WeakMap:new Ae,U=function(){function G(F){if(!(this instanceof G))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var W=g.getInstance(),X=new k(F,W,this);B.set(this,X)}return G}();["observe","unobserve","disconnect"].forEach(function(G){U.prototype[G]=function(){var F;return(F=B.get(this))[G].apply(F,arguments)}});var K=function(){return typeof a.ResizeObserver!="undefined"?a.ResizeObserver:U}();ut.Z=K},1012:function(Zt,ut,Se){"use strict";Se.d(ut,{Z:function(){return f}});var Ae=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Ye=new Uint8Array(16);function a(){if(!Ae)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ae(Ye)}var N=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function j(v){return typeof v=="string"&&N.test(v)}for(var p=j,c=[],h=0;h<256;++h)c.push((h+256).toString(16).substr(1));function y(v){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,b=(c[v[m+0]]+c[v[m+1]]+c[v[m+2]]+c[v[m+3]]+"-"+c[v[m+4]]+c[v[m+5]]+"-"+c[v[m+6]]+c[v[m+7]]+"-"+c[v[m+8]]+c[v[m+9]]+"-"+c[v[m+10]]+c[v[m+11]]+c[v[m+12]]+c[v[m+13]]+c[v[m+14]]+c[v[m+15]]).toLowerCase();if(!p(b))throw TypeError("Stringified UUID is invalid");return b}var g=y;function w(v,m,b){v=v||{};var x=v.random||(v.rng||a)();if(x[6]=x[6]&15|64,x[8]=x[8]&63|128,m){b=b||0;for(var R=0;R<16;++R)m[b+R]=x[R];return m}return g(x)}var f=w},91423:function(){},22591:function(){},24726:function(){},90872:function(){}}]);